Ignore:
Timestamp:
12/12/24 17:06:06 (5 weeks ago)
Author:
stefan toskovski <stefantoska84@…>
Branches:
main
Parents:
d565449
Message:

Pred finalna verzija

File:
1 edited

Legend:

Unmodified
Added
Removed
  • imaps-frontend/node_modules/eslint-plugin-react/lib/rules/forbid-elements.js

    rd565449 r0c6b92a  
    2121};
    2222
     23/** @type {import('eslint').Rule.RuleModule} */
    2324module.exports = {
    2425  meta: {
     
    106107        }
    107108
    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)) {
    111110          reportIfForbidden(argument.name, argument);
    112         } else if (argType === 'Literal' && /^[a-z][^.]*$/.test(argument.value)) {
     111        } else if (argument.type === 'Literal' && /^[a-z][^.]*$/.test(String(argument.value))) {
    113112          reportIfForbidden(argument.value, argument);
    114         } else if (argType === 'MemberExpression') {
     113        } else if (argument.type === 'MemberExpression') {
    115114          reportIfForbidden(getText(context, argument), argument);
    116115        }
Note: See TracChangeset for help on using the changeset viewer.