diff --git a/lib/rules/no-literal-string.js b/lib/rules/no-literal-string.js
index 30bbb08..c9c48e4 100644
--- a/lib/rules/no-literal-string.js
+++ b/lib/rules/no-literal-string.js
@@ -203,8 +203,11 @@ module.exports = {
//
JSXElement(node) {
+ const fullComponentName = context
+ .getSourceCode()
+ .getText(node.openingElement.name);
indicatorStack.push(
- shouldSkip(options['jsx-components'], node.openingElement.name.name)
+ shouldSkip(options['jsx-components'], fullComponentName)
);
},
'JSXElement:exit': endIndicator,
diff --git a/tests/lib/rules/no-literal-string/jsx-components.js b/tests/lib/rules/no-literal-string/jsx-components.js
index 2f98b45..f2a0244 100644
--- a/tests/lib/rules/no-literal-string/jsx-components.js
+++ b/tests/lib/rules/no-literal-string/jsx-components.js
@@ -8,6 +8,10 @@ const cases = {
code: '
{i18next.t("KEY")}
>', options: [{ 'jsx-components': { include: ['p'] } }],