Legend:
- Unmodified
- Added
- Removed
-
imaps-frontend/node_modules/eslint-plugin-react/lib/rules/forbid-elements.js
rd565449 r0c6b92a 21 21 }; 22 22 23 /** @type {import('eslint').Rule.RuleModule} */ 23 24 module.exports = { 24 25 meta: { … … 106 107 } 107 108 108 const argType = argument.type; 109 110 if (argType === 'Identifier' && /^[A-Z_]/.test(argument.name)) { 109 if (argument.type === 'Identifier' && /^[A-Z_]/.test(argument.name)) { 111 110 reportIfForbidden(argument.name, argument); 112 } else if (arg Type === 'Literal' && /^[a-z][^.]*$/.test(argument.value)) {111 } else if (argument.type === 'Literal' && /^[a-z][^.]*$/.test(String(argument.value))) { 113 112 reportIfForbidden(argument.value, argument); 114 } else if (arg Type === 'MemberExpression') {113 } else if (argument.type === 'MemberExpression') { 115 114 reportIfForbidden(getText(context, argument), argument); 116 115 }
Note:
See TracChangeset
for help on using the changeset viewer.