We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4a99c2a commit 4ae24a2Copy full SHA for 4ae24a2
lib/rules/forbid-elements.js
@@ -106,7 +106,7 @@ module.exports = {
106
107
if (argument.type === 'Identifier' && /^[A-Z_]/.test(argument.name)) {
108
reportIfForbidden(argument.name, argument);
109
- } else if (argument.type === 'Literal' && /^[a-z][^.]*$/.test(argument.value.toString())) {
+ } else if (argument.type === 'Literal' && /^[a-z][^.]*$/.test(String(argument.value))) {
110
reportIfForbidden(argument.value, argument);
111
} else if (argument.type === 'MemberExpression') {
112
reportIfForbidden(context.getSourceCode().getText(argument), argument);
0 commit comments