@nfq/eslint-config 4.0.0-beta.12 → 4.0.0-beta.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/esm/index.js +30 -0
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/rules/storybook/overrides/resets.js +14 -0
- package/dist/esm/rules/storybook/overrides/resets.js.map +1 -0
- package/dist/index.js +41 -0
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/types/index.d.ts +1261 -0
- package/types/rules/index.d.ts +1 -0
- package/types/rules/storybook/index.d.ts +1 -0
- package/types/rules/storybook/overrides/index.d.ts +1 -0
- package/types/rules/storybook/overrides/resets.d.ts +11 -0
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../src/rules/common/eslint/code-quality.ts","../src/rules/common/eslint/complexity.ts","../src/rules/common/eslint/error-prevention.ts","../src/rules/common/eslint/modern-javascript.ts","../src/rules/common/eslint/strict-mode.ts","../src/rules/common/eslint/variables.ts","../src/rules/common/eslint/index.ts","../src/rules/common/plugins/array-func.ts","../src/rules/common/plugins/emotion.ts","../src/rules/common/plugins/import.ts","../src/rules/common/plugins/jsdoc.ts","../src/rules/common/plugins/nfq.ts","../src/rules/common/plugins/promise.ts","../src/rules/common/plugins/redos.ts","../src/rules/common/plugins/sanitize.ts","../src/rules/common/plugins/security.ts","../src/rules/common/plugins/stylistic.ts","../src/rules/common/plugins/index.ts","../src/rules/cypress/plugins/cypress.ts","../src/rules/cypress/plugins/nfq.ts","../src/rules/cypress/plugins/index.ts","../src/rules/cypress/overrides/resets.ts","../src/rules/node/plugins/node.ts","../src/rules/react/plugins/nfq.ts","../src/rules/react/plugins/react.ts","../src/rules/react/plugins/react-a11y.ts","../src/rules/react/plugins/react-hooks.ts","../src/rules/react/plugins/index.ts","../src/rules/typescript/overrides/eslint.ts","../src/rules/typescript/overrides/react.ts","../src/rules/typescript/overrides/security.ts","../src/rules/typescript/overrides/index.ts","../src/rules/typescript/plugins/nfq.ts","../src/rules/typescript/plugins/ts-eslint.ts","../src/rules/typescript/plugins/index.ts","../src/settings/globals.ts","../src/rules/custom/utils/expression-utils.ts","../src/rules/custom/utils/component-utils.ts","../src/rules/custom/utils/component-file-structure-utils.ts","../src/rules/custom/component-file-structure.ts","../src/rules/custom/utils/hook-utils.ts","../src/rules/custom/utils/component-single-hook-utils.ts","../src/rules/custom/component-single-hook.ts","../src/rules/custom/utils/cypress-mount-hook-utils.ts","../src/rules/custom/cypress-mount-hook.ts","../src/rules/custom/utils/hexagonal-dependency-direction-utils.ts","../src/rules/custom/hexagonal-dependency-direction.ts","../src/rules/custom/no-empty-lines-in-objects.ts","../src/rules/custom/no-empty-lines-in-types.ts","../src/rules/custom/utils/ast-utils.ts","../src/rules/custom/utils/no-magic-numbers-utils.ts","../src/rules/custom/no-magic-numbers.ts","../src/rules/custom/utils/no-unbound-method-utils.ts","../src/rules/custom/no-unbound-method.ts","../src/rules/custom/object-property-newline.ts","../src/rules/custom/utils/require-getcy-utils.ts","../src/rules/custom/require-getcy.ts","../src/rules/custom/utils/isValidOrders.ts","../src/rules/custom/utils/sort-keys-utils.ts","../src/rules/custom/sort-keys.ts","../src/rules/custom/utils/styled-components-order-utils.ts","../src/rules/custom/styled-components-order.ts","../src/rules/custom/index.ts","../src/settings/plugins.ts","../src/settings/settings.ts","../src/settings/tsPlugins.ts","../src/index.ts"],"sourcesContent":["export const codeQuality = {\n 'accessor-pairs': [\n 'error',\n {\n getWithoutSet: false,\n setWithoutGet: true\n }\n ],\n 'array-callback-return': ['error', {allowImplicit: true}],\n 'block-scoped-var': 'error',\n camelcase: [\n 'error',\n {\n ignoreDestructuring: false,\n properties: 'always'\n }\n ],\n 'consistent-return': 'error',\n 'consistent-this': ['error', 'self'],\n curly: ['error', 'multi-line', 'consistent'],\n 'default-case': ['warn', {commentPattern: '^no default$'}],\n 'default-param-last': 'error',\n 'dot-notation': ['error', {allowKeywords: true}],\n 'func-name-matching': [\n 'off',\n 'always',\n {\n considerPropertyDescriptor: true,\n includeCommonJSModuleExports: false\n }\n ],\n 'func-names': ['warn', 'as-needed'],\n 'func-style': ['off', 'expression'],\n 'guard-for-in': 'warn',\n 'id-denylist': 'off',\n 'id-length': 'off',\n 'id-match': 'off',\n 'max-depth': ['error', {max: 5}],\n 'max-lines': [\n 'error',\n {\n max: 500,\n skipBlankLines: true,\n skipComments: true\n }\n ],\n 'max-lines-per-function': [\n 'warn',\n {\n IIFEs: true,\n max: 200,\n skipBlankLines: true,\n skipComments: true\n }\n ],\n 'max-nested-callbacks': 'off',\n 'max-statements': ['off', {max: 10}],\n 'multiline-comment-style': ['off', 'starred-block'],\n 'new-cap': [\n 'error',\n {\n capIsNew: false,\n capIsNewExceptions: ['Immutable.Map', 'Immutable.Set', 'Immutable.List'],\n newIsCap: true,\n newIsCapExceptions: []\n }\n ],\n 'no-alert': 'error',\n 'no-array-constructor': 'error',\n 'no-bitwise': 'error',\n 'no-caller': 'error',\n 'no-case-declarations': 'error',\n 'no-console': 'warn',\n 'no-constructor-return': 'off',\n 'no-continue': 'off',\n 'no-div-regex': 'error',\n 'no-else-return': ['error', {allowElseIf: true}],\n 'no-empty-function': ['error', {allow: ['arrowFunctions', 'methods', 'asyncMethods']}],\n 'no-empty-pattern': 'error',\n 'no-eq-null': 'error',\n 'no-extend-native': 'error',\n 'no-extra-bind': 'error',\n 'no-extra-label': 'error',\n 'no-fallthrough': 'error',\n 'no-implicit-coercion': 'error',\n 'no-implicit-globals': 'error',\n 'no-inline-comments': [\n 'error',\n {ignorePattern: '(@type|css) .+'}\n ],\n 'no-invalid-this': 'error',\n 'no-iterator': 'error',\n 'no-labels': 'error',\n 'no-lone-blocks': 'error',\n 'no-lonely-if': 'error',\n 'no-loop-func': 'error',\n 'no-multi-assign': 'error',\n 'no-multi-str': 'error',\n 'no-negated-condition': 'error',\n 'no-nested-ternary': 'error',\n 'no-new': 'error',\n 'no-new-func': 'error',\n 'no-new-object': 'error',\n 'no-new-wrappers': 'error',\n 'no-octal': 'error',\n 'no-octal-escape': 'error',\n 'no-plusplus': 'off',\n 'no-proto': 'error',\n 'no-restricted-properties': [\n 'error',\n {\n message: 'arguments.callee is deprecated',\n object: 'arguments',\n property: 'callee'\n },\n {\n message: 'Please use Number.isFinite instead',\n object: 'global',\n property: 'isFinite'\n },\n {\n message: 'Please use Number.isFinite instead',\n object: 'self',\n property: 'isFinite'\n },\n {\n message: 'Please use Number.isFinite instead',\n object: 'window',\n property: 'isFinite'\n },\n {\n message: 'Please use Number.isNaN instead',\n object: 'global',\n property: 'isNaN'\n },\n {\n message: 'Please use Number.isNaN instead',\n object: 'self',\n property: 'isNaN'\n },\n {\n message: 'Please use Number.isNaN instead',\n object: 'window',\n property: 'isNaN'\n },\n {\n message: 'Please use Object.defineProperty instead.',\n property: '__defineGetter__'\n },\n {\n message: 'Please use Object.defineProperty instead.',\n property: '__defineSetter__'\n },\n {\n message: 'Use the exponentiation operator (**) instead.',\n object: 'Math',\n property: 'pow'\n }\n ],\n 'no-restricted-syntax': [\n 'error',\n {\n message: 'Labels are a form of GOTO; using them makes code confusing and hard to maintain'\n + ' and understand.',\n selector: 'LabeledStatement'\n },\n {\n message: '`with` is disallowed in strict mode because it makes code'\n + ' impossible to predict and optimize.',\n selector: 'WithStatement'\n }\n ],\n 'no-return-assign': ['error', 'except-parens'],\n 'no-return-await': 'error',\n 'no-script-url': 'error',\n 'no-sequences': 'error',\n 'no-ternary': 'off',\n 'no-unneeded-ternary': [\n 'error',\n {defaultAssignment: false}\n ],\n 'no-unused-expressions': [\n 'error',\n {\n allowShortCircuit: true,\n allowTaggedTemplates: false,\n allowTernary: true\n }\n ],\n 'no-unused-labels': 'error',\n 'no-useless-call': 'error',\n 'no-useless-concat': 'error',\n 'no-useless-escape': 'error',\n 'no-useless-return': 'error',\n 'no-void': ['error', {allowAsStatement: true}],\n 'no-warning-comments': [\n 'off',\n {\n location: 'start',\n terms: [\n 'todo',\n 'fixme',\n 'xxx'\n ]\n }\n ],\n 'no-with': 'error',\n 'one-var': ['off', 'never'],\n 'operator-assignment': ['error', 'always'],\n 'prefer-exponentiation-operator': 'error',\n 'prefer-named-capture-group': 'off',\n 'prefer-object-spread': 'error',\n 'prefer-promise-reject-errors': ['error', {allowEmptyReject: true}],\n 'prefer-regex-literals': 'error',\n 'require-await': 'off',\n 'require-unicode-regexp': 'error',\n 'sort-destructure-keys/sort-destructure-keys': ['error', {caseSensitive: false}],\n 'sort-vars': 'error',\n 'unicode-bom': ['error', 'never'],\n yoda: 'error'\n};","/* eslint-disable no-inline-comments */\nexport const complexity = {\n 'class-methods-use-this': ['off', {exceptMethods: []}],\n complexity: ['warn', {max: 20}],\n 'max-classes-per-file': ['error', 1],\n 'no-param-reassign': [\n 'error',\n {\n ignorePropertyModificationsFor: [\n '$scope', // for Angular 1 scopes\n 'acc', // for reduce accumulators\n 'accumulator', // for reduce accumulators\n 'ctx', // for Koa routing\n 'descriptor', // for decorators\n 'e', // for e.returnvalue\n 'item', // array foreach\n 'key', // for reduce key value pairs\n 'req', // for Express requests\n 'request', // for Express requests\n 'res', // for Express responses\n 'response', // for Express responses\n 'staticContext', // for ReactRouter context\n 'value' // for reduce key value pairs\n ],\n props: true\n }\n ],\n 'vars-on-top': 'error'\n};","export const errorPrevention = {\n eqeqeq: ['error', 'always'],\n 'for-direction': 'error',\n 'getter-return': ['error', {allowImplicit: false}],\n 'no-async-promise-executor': 'error',\n 'no-await-in-loop': 'warn',\n 'no-compare-neg-zero': 'error',\n 'no-cond-assign': 'error',\n 'no-constant-condition': ['warn', {checkLoops: false}],\n 'no-control-regex': 'error',\n 'no-debugger': 'error',\n 'no-dupe-args': 'error',\n 'no-dupe-else-if': 'error',\n 'no-dupe-keys': 'error',\n 'no-duplicate-case': 'error',\n 'no-empty-character-class': 'error',\n 'no-eval': 'error',\n 'no-ex-assign': 'error',\n 'no-extra-boolean-cast': 'error',\n 'no-func-assign': 'error',\n 'no-global-assign': 'error',\n 'no-implied-eval': 'error',\n 'no-import-assign': 'error',\n 'no-inner-declarations': 'error',\n 'no-invalid-regexp': 'error',\n 'no-irregular-whitespace': 'error',\n 'no-misleading-character-class': 'error',\n 'no-obj-calls': 'error',\n 'no-prototype-builtins': 'error',\n 'no-redeclare': 'error',\n 'no-regex-spaces': 'error',\n 'no-self-assign': ['error', {props: true}],\n 'no-self-compare': 'error',\n 'no-setter-return': 'error',\n 'no-sparse-arrays': 'error',\n 'no-template-curly-in-string': 'error',\n 'no-throw-literal': 'error',\n 'no-unexpected-multiline': 'error',\n 'no-unmodified-loop-condition': 'error',\n 'no-unreachable': 'error',\n 'no-unsafe-finally': 'error',\n 'no-unsafe-negation': 'error',\n 'no-useless-catch': 'error',\n radix: ['error', 'always'],\n 'require-atomic-updates': 'off',\n 'use-isnan': 'error',\n 'valid-typeof': ['error', {requireStringLiterals: true}]\n};","export const modernJavaScript = {\n 'arrow-body-style': ['error', 'as-needed', {requireReturnForObjectLiteral: false}],\n 'constructor-super': 'error',\n 'no-class-assign': 'error',\n 'no-const-assign': 'error',\n 'no-dupe-class-members': 'error',\n 'no-new-symbol': 'error',\n 'no-restricted-imports': [\n 'off',\n {\n paths: [],\n patterns: []\n }\n ],\n 'no-this-before-super': 'error',\n 'no-useless-computed-key': 'error',\n 'no-useless-constructor': 'error',\n 'no-useless-rename': [\n 'error',\n {\n ignoreDestructuring: false,\n ignoreExport: false,\n ignoreImport: false\n }\n ],\n 'no-var': 'error',\n 'object-shorthand': [\n 'error',\n 'always',\n {\n avoidExplicitReturnArrows: true,\n avoidQuotes: true,\n ignoreConstructors: false\n }\n ],\n 'prefer-arrow-callback': [\n 'error',\n {\n allowNamedFunctions: false,\n allowUnboundThis: true\n }\n ],\n 'prefer-const': [\n 'error',\n {\n destructuring: 'any',\n ignoreReadBeforeAssign: true\n }\n ],\n 'prefer-destructuring': [\n 'error',\n {\n AssignmentExpression: {\n array: true,\n object: false\n },\n VariableDeclarator: {\n array: false,\n object: true\n }\n },\n {enforceForRenamedProperties: false}\n ],\n 'prefer-numeric-literals': 'error',\n 'prefer-rest-params': 'error',\n 'prefer-spread': 'error',\n 'prefer-template': 'error',\n 'require-yield': 'error',\n 'sort-imports': [\n 'error',\n {\n ignoreCase: true,\n ignoreDeclarationSort: true,\n ignoreMemberSort: false\n }\n ],\n 'symbol-description': 'error'\n};","export const strictMode = {\n strict: [\n 'error',\n 'never'\n ]\n};","// @ts-expect-error\nimport confusingBrowserGlobals from 'confusing-browser-globals';\n\nexport const variables = {\n 'init-declarations': 'off',\n 'no-delete-var': 'error',\n 'no-label-var': 'error',\n 'no-restricted-globals': ['error', 'isFinite', 'isNaN'].concat(confusingBrowserGlobals as ConcatArray<string>),\n 'no-shadow': 'error',\n 'no-shadow-restricted-names': 'error',\n 'no-undef': 'error',\n 'no-undef-init': 'error',\n 'no-undefined': 'error',\n 'no-unused-vars': [\n 'error',\n {\n args: 'after-used',\n argsIgnorePattern: '^e$',\n caughtErrors: 'none',\n ignoreRestSiblings: true,\n vars: 'all'\n }\n ],\n 'no-use-before-define': [\n 'error',\n {\n classes: false,\n functions: false,\n variables: false\n }\n ]\n};","import {codeQuality} from './code-quality';\nimport {complexity} from './complexity';\nimport {errorPrevention} from './error-prevention';\nimport {modernJavaScript} from './modern-javascript';\nimport {strictMode} from './strict-mode';\nimport {variables} from './variables';\n\nexport const commonEslintRules = {\n ...errorPrevention,\n ...codeQuality,\n ...modernJavaScript,\n ...complexity,\n ...variables,\n ...strictMode\n};\n\nexport {\n codeQuality,\n complexity,\n errorPrevention,\n modernJavaScript,\n strictMode,\n variables\n};","export const arrayFunc = {\n 'array-func/avoid-reverse': 'error',\n 'array-func/from-map': 'error',\n 'array-func/no-unnecessary-this-arg': 'error',\n 'array-func/prefer-array-from': 'error',\n 'array-func/prefer-flat': 'error',\n 'array-func/prefer-flat-map': 'error'\n};","export const emotion = {\n '@emotion/jsx-import': 'off',\n '@emotion/no-vanilla': 'error',\n '@emotion/styled-import': 'error',\n '@emotion/syntax-preference': ['error', 'string'],\n 'styled-components-order/sort-declarations-alphabetically': 'error'\n};","/* eslint-disable no-inline-comments */\nexport const importRules = {\n 'import/default': 2,\n 'import/dynamic-import-chunkname': [\n 2,\n {\n importFunctions: [],\n webpackChunknameFormat: '[0-9a-zA-Z-_/.]+'\n }\n ],\n 'import/export': 2,\n 'import/exports-last': 0,\n 'import/extensions': [\n 2,\n 'never',\n {\n eot: 'always',\n otf: 'always',\n ttf: 'always',\n woff: 'always',\n woff2: 'always'\n }\n ],\n 'import/first': 2,\n 'import/group-exports': 0,\n 'import/max-dependencies': [\n 1,\n {\n ignoreTypeImports: true,\n max: 20\n }\n ],\n 'import/named': 2,\n 'import/namespace': [2, {allowComputed: true}],\n 'import/newline-after-import': 2,\n 'import/no-absolute-path': 2,\n 'import/no-amd': 2,\n 'import/no-anonymous-default-export': [\n 0,\n {\n allowAnonymousClass: false,\n allowAnonymousFunction: false,\n allowArray: false,\n allowArrowFunction: false,\n allowLiteral: false,\n allowObject: false\n }\n ],\n 'import/no-commonjs': 0,\n 'import/no-cycle': [\n 0,\n {maxDepth: Infinity}\n ],\n 'import/no-default-export': 0,\n 'import/no-deprecated': 1,\n 'import/no-duplicates': ['error', {considerQueryString: true}],\n 'import/no-dynamic-require': 0,\n 'import/no-extraneous-dependencies': [\n 0,\n {\n devDependencies: [\n 'test/**', // tape, common npm pattern\n 'tests/**', // also common npm pattern\n 'spec/**', // mocha, rspec-like pattern\n '**/__tests__/**', // jest pattern\n '**/__mocks__/**', // jest pattern\n 'test.{js,jsx}', // repos with a single test file\n 'test-*.{js,jsx}', // repos with multiple top-level test files\n '**/*{.,_}{test,spec}.{js,jsx}', // tests where the extension or filename suffix denotes that it is a test\n '**/jest.config.js', // jest config\n '**/jest.setup.js', // jest setup\n '**/vue.config.js', // vue-cli config\n '**/webpack.config.js', // webpack config\n '**/webpack.config.*.js', // webpack config\n '**/rollup.config.js', // rollup config\n '**/rollup.config.*.js', // rollup config\n '**/gulpfile.js', // gulp config\n '**/gulpfile.*.js', // gulp config\n '**/Gruntfile{,.js}', // grunt config\n '**/protractor.conf.js', // protractor config\n '**/protractor.conf.*.js', // protractor config\n '**/karma.conf.js' // karma config\n ],\n optionalDependencies: false\n }\n ],\n 'import/no-internal-modules': [0, {allow: []}],\n 'import/no-mutable-exports': 2,\n 'import/no-named-as-default': 2,\n 'import/no-named-as-default-member': 2,\n 'import/no-named-default': 2,\n 'import/no-named-export': 0,\n 'import/no-namespace': 0,\n 'import/no-nodejs-modules': 0,\n 'import/no-relative-parent-imports': 0,\n 'import/no-restricted-paths': 0,\n 'import/no-self-import': 2,\n 'import/no-unassigned-import': 0,\n 'import/no-unresolved': [\n 2,\n {\n caseSensitive: true,\n commonjs: true,\n ignore: ['@app/features']\n }\n ],\n 'import/no-unused-modules': [\n 0,\n {\n ignoreExports: [],\n missingExports: true,\n unusedExports: true\n }\n ],\n 'import/no-useless-path-segments': [2, {commonjs: true}],\n 'import/no-webpack-loader-syntax': 2,\n 'import/order': [\n 2,\n {\n alphabetize: {\n caseInsensitive: true,\n order: 'asc'\n },\n groups: ['builtin', 'external', 'parent', 'internal', 'sibling', 'type'],\n 'newlines-between': 'always',\n pathGroups: [\n {\n group: 'external',\n pattern: 'react',\n position: 'before'\n },\n {\n group: 'external',\n pattern: 'react-dom',\n position: 'before'\n },\n {\n group: 'parent',\n pattern: '**/classes/**'\n },\n {\n group: 'parent',\n pattern: 'Classes/**'\n },\n {\n group: 'parent',\n pattern: '**/screens/**'\n },\n {\n group: 'parent',\n pattern: 'Screens/**'\n },\n {\n group: 'parent',\n pattern: '**/containers/**'\n },\n {\n group: 'parent',\n pattern: 'Containers/**'\n },\n {\n group: 'parent',\n pattern: '**/components/**'\n },\n {\n group: 'parent',\n pattern: 'Components/**'\n },\n {\n group: 'parent',\n pattern: '**/stores/**'\n },\n {\n group: 'parent',\n pattern: 'Stores/**'\n },\n {\n group: 'sibling',\n pattern: '**/utils/**'\n },\n {\n group: 'sibling',\n pattern: 'Utils/**'\n },\n {\n group: 'sibling',\n pattern: '**/configs/**'\n },\n {\n group: 'sibling',\n pattern: 'Configs'\n },\n {\n group: 'sibling',\n pattern: '**/fonts/**'\n },\n {\n group: 'sibling',\n pattern: 'Fonts/**'\n },\n {\n group: 'sibling',\n pattern: '**/images/**'\n },\n {\n group: 'sibling',\n pattern: 'Images/**'\n }\n ],\n pathGroupsExcludedImportTypes: ['react', 'react-dom']\n }\n ],\n 'import/prefer-default-export': 0,\n 'import/unambiguous': 0\n};","export const jsdoc = {\n 'jsdoc/check-access': 'off',\n 'jsdoc/check-alignment': 'error',\n 'jsdoc/check-examples': 'off',\n 'jsdoc/check-indentation': 'error',\n 'jsdoc/check-line-alignment': [\n 'error',\n 'always',\n {tags: ['param', 'arg', 'argument', 'property', 'prop']}\n ],\n 'jsdoc/check-param-names': [\n 'error',\n {\n checkDestructured: false,\n checkRestProperty: false,\n enableFixer: true\n }\n ],\n 'jsdoc/check-property-names': [\n 'error',\n {enableFixer: true}\n ],\n 'jsdoc/check-syntax': 'error',\n 'jsdoc/check-tag-names': 'error',\n 'jsdoc/check-types': 'error',\n 'jsdoc/check-values': 'error',\n 'jsdoc/empty-tags': 'error',\n 'jsdoc/implements-on-classes': 'error',\n 'jsdoc/match-description': 'error',\n 'jsdoc/match-name': 'off',\n 'jsdoc/multiline-blocks': [\n 'error',\n {\n noFinalLineText: true,\n noMultilineBlocks: false,\n noSingleLineBlocks: false,\n noZeroLineText: true\n }\n ],\n 'jsdoc/no-bad-blocks': 'error',\n 'jsdoc/no-defaults': 'off',\n 'jsdoc/no-missing-syntax': 'off',\n 'jsdoc/no-multi-asterisks': 'error',\n 'jsdoc/no-restricted-syntax': 'off',\n 'jsdoc/no-types': 'off',\n 'jsdoc/no-undefined-types': 'off',\n 'jsdoc/require-asterisk-prefix': ['error', 'always'],\n 'jsdoc/require-description': ['error', {exemptedBy: ['type', 'inheritdoc']}],\n 'jsdoc/require-description-complete-sentence': 'error',\n 'jsdoc/require-example': 'off',\n 'jsdoc/require-file-overview': 'off',\n 'jsdoc/require-hyphen-before-param-description': ['error', 'never'],\n 'jsdoc/require-jsdoc': [\n 'error',\n {\n contexts: ['VariableDeclaration > VariableDeclarator > ArrowFunctionExpression'],\n publicOnly: false,\n require: {\n ArrowFunctionExpression: false,\n ClassDeclaration: true,\n ClassExpression: true,\n FunctionDeclaration: true,\n FunctionExpression: true,\n MethodDefinition: true\n }\n }\n ],\n 'jsdoc/require-param': [\n 'error',\n {\n checkDestructured: true,\n checkDestructuredRoots: true,\n checkRestProperty: false,\n enableFixer: true,\n enableRestElementFixer: true,\n enableRootFixer: true,\n unnamedRootBase: ['props', 'obj', 'root'],\n useDefaultObjectProperties: true\n }\n ],\n 'jsdoc/require-param-description': 'error',\n 'jsdoc/require-param-name': 'error',\n 'jsdoc/require-param-type': 'error',\n 'jsdoc/require-property': 'error',\n 'jsdoc/require-property-description': 'error',\n 'jsdoc/require-property-name': 'error',\n 'jsdoc/require-property-type': 'error',\n 'jsdoc/require-returns': 'error',\n 'jsdoc/require-returns-check': 'error',\n 'jsdoc/require-returns-description': 'error',\n 'jsdoc/require-returns-type': 'error',\n 'jsdoc/require-throws': 'error',\n 'jsdoc/require-yields': 'error',\n 'jsdoc/require-yields-check': 'error',\n 'jsdoc/sort-tags': 'off',\n 'jsdoc/tag-lines': ['error', 'any', {startLines: 1}]\n};","export const nfq = {\n '@nfq/no-empty-lines-in-objects': 'error',\n '@nfq/no-magic-numbers': [\n 'error',\n {\n detectObjects: false,\n enforceConst: true,\n ignore: [0, 1, -1],\n ignoreArrayIndexes: true,\n ignoreArrays: true,\n ignoreClassFieldInitialValues: true,\n ignoreConstDeclarations: false,\n ignoreDefaultValues: true,\n ignoreFunctions: [\n 'darken',\n 'lighten',\n 'setTimeout',\n 'setInterval',\n 'spacing',\n 'translucify',\n 'wait',\n 'toFixed'\n ]\n }\n ],\n '@nfq/no-unbound-method': ['error', {decoratorNames: ['autobind']}],\n '@nfq/object-property-newline': 'error',\n '@nfq/sort-keys': [\n 'error',\n 'asc',\n {\n caseSensitive: false,\n ignorePropTypes: true,\n methodsExtra: true,\n natural: true\n }\n ]\n};","export const promise = {\n 'promise/always-return': 'error',\n 'promise/avoid-new': 'off',\n 'promise/catch-or-return': 'error',\n 'promise/no-callback-in-promise': 'error',\n 'promise/no-native': 'off',\n 'promise/no-nesting': 'error',\n 'promise/no-new-statics': 'error',\n 'promise/no-promise-in-callback': 'error',\n 'promise/no-return-in-finally': 'error',\n 'promise/no-return-wrap': 'error',\n 'promise/param-names': 'error',\n 'promise/prefer-await-to-callbacks': 'error',\n 'promise/prefer-await-to-then': 'error',\n 'promise/valid-params': 'warn'\n};","/* eslint-disable no-inline-comments */\nexport const redos = {\n 'redos/no-vulnerable': [\n 'error',\n {\n cache: true,\n checker: 'auto',\n ignoreErrors: true,\n permittableComplexities: ['polynomial', 'exponential'],\n timeout: 10000\n }\n ] // Superior ReDoS detection using advanced algorithms (automaton + fuzzing) with caching. Replaces security/detect-unsafe-regex. https://github.com/MakeNowJust-Labo/recheck\n};","/* eslint-disable no-inline-comments */\nexport const sanitize = {\n 'no-unsanitized/method': 'error', // The method rule in eslint-plugin-no-unsanitized perform basic security checks for function calls. https://github.com/mozilla/eslint-plugin-no-unsanitized/blob/master/docs/rules/method.md\n 'no-unsanitized/property': 'error' // The property rule in eslint-plugin-no-unsanitized perform basic security checks for property assignments. https://github.com/mozilla/eslint-plugin-no-unsanitized/blob/master/docs/rules/property.md\n};","/* eslint-disable no-inline-comments */\nexport const security = {\n 'security/detect-bidi-characters': 'error',\n 'security/detect-buffer-noassert': 'error', // Detects calls to buffer with noAssert flag set https://github.com/nodesecurity/eslint-plugin-security\n 'security/detect-child-process': 'error', // Detects instances of child_process & non-literal exec() https://github.com/nodesecurity/eslint-plugin-security/blob/master/docs/avoid-command-injection-node.md\n 'security/detect-disable-mustache-escape': 'error', // Detects object.escapeMarkup = false, which can be used with some template engines to disable escaping of HTML entities. This can lead to Cross-Site Scripting (XSS) vulnerabilities. https://github.com/nodesecurity/eslint-plugin-security\n 'security/detect-eval-with-expression': 'error', // Detects eval(variable) which can allow an attacker to run arbitary code inside your process. https://github.com/nodesecurity/eslint-plugin-security\n 'security/detect-new-buffer': 'error', // Detects buffer instantiation https://github.com/nodesecurity/eslint-plugin-security\n 'security/detect-no-csrf-before-method-override': 'error', // Detects Express csrf middleware setup before method-override middleware. This can allow GET requests (which are not checked by csrf) to turn into POST requests later. https://github.com/nodesecurity/eslint-plugin-security\n 'security/detect-non-literal-fs-filename': 'warn', // Detects variable in filename argument of fs calls, which might allow an attacker to access anything on your system. https://github.com/nodesecurity/eslint-plugin-security\n 'security/detect-non-literal-regexp': 'warn', // Detects RegExp(variable), which might allow an attacker to DOS your server with a long-running regular expression. https://github.com/nodesecurity/eslint-plugin-security\n 'security/detect-non-literal-require': 'warn', // Detects require(variable), which might allow an attacker to load and run arbitrary code, or access arbitrary files on disk. https://github.com/nodesecurity/eslint-plugin-security\n 'security/detect-object-injection': 'warn', // Detects variable[key] as a left- or right-hand assignment operand. https://github.com/nodesecurity/eslint-plugin-security\n 'security/detect-possible-timing-attacks': 'warn', // Detects insecure comparisons (==, !=, !== and ===), which check input sequentially. https://github.com/nodesecurity/eslint-plugin-security\n 'security/detect-pseudoRandomBytes': 'warn', // Detects if pseudoRandomBytes() is in use, which might not give you the randomness you need and expect. https://github.com/nodesecurity/eslint-plugin-security\n 'security/detect-unsafe-regex': 'off' // Locates potentially unsafe regular expressions, which may take a very long time to run, blocking the event loop. https://github.com/nodesecurity/eslint-plugin-security\n};","export const stylistic = {\n '@stylistic/array-bracket-newline': ['error', 'consistent'],\n '@stylistic/array-bracket-spacing': ['error', 'never'],\n '@stylistic/array-element-newline': ['error', 'consistent'],\n '@stylistic/arrow-parens': ['error', 'as-needed'],\n '@stylistic/arrow-spacing': ['error', {\n after: true,\n before: true\n }],\n '@stylistic/block-spacing': ['error', 'never'],\n '@stylistic/brace-style': ['error', '1tbs', {allowSingleLine: false}],\n '@stylistic/comma-dangle': ['error', 'never'],\n '@stylistic/comma-spacing': ['error', {\n after: true,\n before: false\n }],\n '@stylistic/comma-style': [\n 'error',\n 'last',\n {\n exceptions: {\n ArrayExpression: false,\n ArrayPattern: false,\n ArrowFunctionExpression: false,\n CallExpression: false,\n FunctionDeclaration: false,\n FunctionExpression: false,\n ImportDeclaration: false,\n NewExpression: false,\n ObjectExpression: false,\n ObjectPattern: false,\n VariableDeclaration: false\n }\n }\n ],\n '@stylistic/computed-property-spacing': ['error', 'never'],\n '@stylistic/dot-location': ['error', 'property'],\n '@stylistic/eol-last': ['error', 'never'],\n '@stylistic/function-call-argument-newline': ['error', 'consistent'],\n '@stylistic/function-call-spacing': ['error', 'never'],\n '@stylistic/function-paren-newline': ['error', 'consistent'],\n '@stylistic/generator-star-spacing': ['error', {\n after: true,\n before: false\n }],\n '@stylistic/implicit-arrow-linebreak': ['error', 'beside'],\n '@stylistic/indent': [\n 'error',\n 4,\n {\n ArrayExpression: 'first',\n CallExpression: {arguments: 'first'},\n flatTernaryExpressions: false,\n FunctionDeclaration: {\n body: 1,\n parameters: 'first'\n },\n FunctionExpression: {\n body: 1,\n parameters: 'first'\n },\n ignoreComments: false,\n ignoredNodes: [\n 'JSXElement',\n 'JSXElement > *',\n 'JSXAttribute',\n 'JSXIdentifier',\n 'JSXNamespacedName',\n 'JSXMemberExpression',\n 'JSXSpreadAttribute',\n 'JSXExpressionContainer',\n 'JSXOpeningElement',\n 'JSXClosingElement',\n 'JSXFragment',\n 'JSXOpeningFragment',\n 'JSXClosingFragment',\n 'JSXText',\n 'JSXEmptyExpression',\n 'JSXSpreadChild'\n ],\n ImportDeclaration: 'first',\n ObjectExpression: 'first',\n outerIIFEBody: 1,\n SwitchCase: 1,\n VariableDeclarator: 'first'\n }\n ],\n '@stylistic/indent-binary-ops': ['error', 4],\n '@stylistic/jsx-quotes': ['error', 'prefer-double'],\n '@stylistic/key-spacing': [\n 'error',\n {\n afterColon: true,\n beforeColon: false,\n mode: 'minimum'\n }\n ],\n '@stylistic/keyword-spacing': ['error', {\n after: true,\n before: true\n }],\n '@stylistic/line-comment-position': [\n 'off',\n {\n applyDefaultPatterns: true,\n ignorePattern: '',\n position: 'above'\n }\n ],\n '@stylistic/linebreak-style': ['error', 'unix'],\n '@stylistic/lines-around-comment': 'off',\n '@stylistic/lines-between-class-members': [\n 'error',\n 'always',\n {exceptAfterSingleLine: false}\n ],\n '@stylistic/max-len': [\n 'error',\n {\n code: 120,\n ignoreComments: true,\n ignoreRegExpLiterals: true,\n ignoreTemplateLiterals: true,\n ignoreUrls: true\n }\n ],\n '@stylistic/max-statements-per-line': ['error', {max: 1}],\n '@stylistic/member-delimiter-style': [\n 'error',\n {\n multiline: {\n delimiter: 'semi',\n requireLast: true\n },\n multilineDetection: 'brackets',\n singleline: {\n delimiter: 'semi',\n requireLast: false\n }\n }\n ],\n '@stylistic/multiline-ternary': ['off', 'never'],\n '@stylistic/new-parens': ['error', 'always'],\n '@stylistic/newline-per-chained-call': ['error', {ignoreChainWithDepth: 4}],\n '@stylistic/no-confusing-arrow': ['error', {allowParens: true}],\n '@stylistic/no-extra-parens': 'off',\n '@stylistic/no-extra-semi': 'error',\n '@stylistic/no-floating-decimal': 'error',\n '@stylistic/no-mixed-operators': [\n 'error',\n {\n allowSamePrecedence: false,\n groups: [\n ['%', '**'],\n ['%', '+'],\n ['%', '-'],\n ['%', '*'],\n ['%', '/'],\n ['/', '*'],\n ['&', '|', '<<', '>>', '>>>'],\n ['==', '!=', '===', '!=='],\n ['&&', '||']\n ]\n }\n ],\n '@stylistic/no-mixed-spaces-and-tabs': 'error',\n '@stylistic/no-multi-spaces': 'error',\n '@stylistic/no-multiple-empty-lines': ['error', {\n max: 1,\n maxBOF: 0,\n maxEOF: 0\n }],\n '@stylistic/no-tabs': 'error',\n '@stylistic/no-trailing-spaces': 'error',\n '@stylistic/no-whitespace-before-property': 'error',\n '@stylistic/nonblock-statement-body-position': ['error', 'beside', {overrides: {}}],\n '@stylistic/object-curly-newline': [\n 'error', {\n ExportDeclaration: {consistent: true},\n ImportDeclaration: {consistent: true},\n ObjectExpression: {\n minProperties: 2,\n multiline: true\n },\n ObjectPattern: {consistent: true},\n TSEnumBody: {consistent: true},\n TSInterfaceBody: {consistent: true},\n TSTypeLiteral: {consistent: true}\n }\n ],\n '@stylistic/object-curly-spacing': ['error', 'never'],\n '@stylistic/object-property-newline': 'off',\n '@stylistic/one-var-declaration-per-line': ['error', 'always'],\n '@stylistic/operator-linebreak': ['error', 'before'],\n '@stylistic/padded-blocks': ['error', 'never'],\n '@stylistic/padding-line-between-statements': [\n 'error',\n {\n blankLine: 'always',\n next: '*',\n prev: ['const', 'let', 'var']\n },\n {\n blankLine: 'any',\n next: ['const', 'let', 'var'],\n prev: ['const', 'let', 'var']\n },\n {\n blankLine: 'always',\n next: '*',\n prev: 'directive'\n },\n {\n blankLine: 'any',\n next: 'directive',\n prev: 'directive'\n },\n {\n blankLine: 'always',\n next: 'return',\n prev: '*'\n }\n ],\n '@stylistic/quote-props': [\n 'error',\n 'as-needed',\n {\n keywords: false,\n numbers: false,\n unnecessary: true\n }\n ],\n '@stylistic/quotes': ['error', 'single', {avoidEscape: true}],\n '@stylistic/rest-spread-spacing': ['error', 'never'],\n '@stylistic/semi': ['error', 'always'],\n '@stylistic/semi-spacing': ['error', {\n after: true,\n before: false\n }],\n '@stylistic/semi-style': ['error', 'last'],\n '@stylistic/space-before-blocks': ['error', 'always'],\n '@stylistic/space-before-function-paren': [\n 'error',\n {\n anonymous: 'never',\n asyncArrow: 'always',\n named: 'never'\n }\n ],\n '@stylistic/space-in-parens': ['error', 'never'],\n '@stylistic/space-infix-ops': 'error',\n '@stylistic/space-unary-ops': [\n 'error',\n {\n nonwords: false,\n overrides: {},\n words: true\n }\n ],\n '@stylistic/spaced-comment': [\n 'error',\n 'always',\n {\n block: {\n balanced: true,\n exceptions: ['-', '+'],\n markers: ['=', '!', ':', '::']\n },\n line: {\n exceptions: ['-', '+'],\n markers: ['=', '!', '/']\n }\n }\n ],\n '@stylistic/switch-colon-spacing': ['error', {\n after: true,\n before: false\n }],\n '@stylistic/template-curly-spacing': ['error', 'never'],\n '@stylistic/template-tag-spacing': ['error', 'never'],\n '@stylistic/type-annotation-spacing': 'error',\n '@stylistic/type-generic-spacing': 'error',\n '@stylistic/type-named-tuple-spacing': 'error',\n '@stylistic/wrap-iife': ['error', 'outside', {functionPrototypeMethods: false}],\n '@stylistic/wrap-regex': 'error',\n '@stylistic/yield-star-spacing': ['error', 'after']\n};","import {arrayFunc} from './array-func';\nimport {emotion} from './emotion';\nimport {importRules} from './import';\nimport {jsdoc} from './jsdoc';\nimport {nfq} from './nfq';\nimport {promise} from './promise';\nimport {redos} from './redos';\nimport {sanitize} from './sanitize';\nimport {security} from './security';\nimport {stylistic} from './stylistic';\n\nexport const commonPluginRules = {\n ...arrayFunc,\n ...emotion,\n ...importRules,\n ...jsdoc,\n ...nfq,\n ...promise,\n ...redos,\n ...sanitize,\n ...security,\n ...stylistic\n};\n\nexport {\n arrayFunc,\n emotion,\n importRules,\n jsdoc,\n nfq,\n promise,\n redos,\n sanitize,\n security,\n stylistic\n}","export const cypress = {\n 'cypress/assertion-before-screenshot': 'error',\n 'cypress/no-assigning-return-values': 'error',\n 'cypress/no-async-before': 'error',\n 'cypress/no-async-tests': 'error',\n 'cypress/no-chained-get': 'error',\n 'cypress/no-debug': 'error',\n 'cypress/no-force': 'error',\n 'cypress/no-pause': 'error',\n 'cypress/no-unnecessary-waiting': 'error',\n 'cypress/no-xpath': 'error',\n 'cypress/require-data-selectors': 'off',\n 'cypress/unsafe-to-chain-command': 'off'\n};","export const nfqPluginRules = {\n '@nfq/cypress-mount-hook': 'error',\n '@nfq/require-getcy': 'error'\n};","import {cypress} from './cypress';\nimport {nfqPluginRules} from './nfq';\n\nexport const cypressPluginRules = {\n ...cypress,\n ...nfqPluginRules\n};\n\nexport {cypress as cypressRules, nfqPluginRules as cypressNfqRules};","export const cypressResets = {\n '@nfq/no-magic-numbers': 'off',\n '@stylistic/max-len': 'off',\n '@stylistic/newline-per-chained-call': 'off',\n '@typescript-eslint/no-unused-expression': 'off',\n '@typescript-eslint/no-unused-expressions': 'off',\n 'max-lines': 'off',\n 'max-lines-per-function': 'off',\n 'promise/always-return': 'off',\n 'promise/catch-or-return': 'off',\n 'promise/prefer-await-to-callbacks': 'off',\n 'promise/prefer-await-to-then': 'off'\n};","export const nodeRules = {\n 'n/callback-return': 'off',\n 'n/exports-style': ['error', 'module.exports'],\n 'n/file-extension-in-import': 'off',\n 'n/global-require': 'off',\n 'n/handle-callback-err': 'error',\n 'n/hashbang': 'error',\n 'n/no-callback-literal': 'error',\n 'n/no-deprecated-api': 'error',\n 'n/no-exports-assign': 'error',\n 'n/no-extraneous-import': 'off',\n 'n/no-extraneous-require': 'off',\n 'n/no-missing-import': 'off',\n 'n/no-missing-require': 'off',\n 'n/no-mixed-requires': 'error',\n 'n/no-new-require': 'error',\n 'n/no-path-concat': 'error',\n 'n/no-process-env': 'off',\n 'n/no-process-exit': 'off',\n 'n/no-restricted-import': 'off',\n 'n/no-restricted-require': 'off',\n 'n/no-sync': 'warn',\n 'n/no-top-level-await': 'error',\n 'n/no-unpublished-bin': 'off',\n 'n/no-unpublished-import': 'off',\n 'n/no-unpublished-require': 'off',\n 'n/no-unsupported-features/es-builtins': 'error',\n 'n/no-unsupported-features/es-syntax': ['error', {ignores: ['dynamicImport']}],\n 'n/no-unsupported-features/node-builtins': 'error',\n 'n/prefer-global/buffer': ['error', 'always'],\n 'n/prefer-global/console': ['error', 'always'],\n 'n/prefer-global/process': ['error', 'always'],\n 'n/prefer-global/text-decoder': ['error', 'always'],\n 'n/prefer-global/text-encoder': ['error', 'always'],\n 'n/prefer-global/url': ['error', 'always'],\n 'n/prefer-global/url-search-params': ['error', 'always'],\n 'n/prefer-node-protocol': 'off',\n 'n/prefer-promises/dns': 'error',\n 'n/prefer-promises/fs': 'error',\n 'n/process-exit-as-throw': 'error'\n};","export const nfqPluginRules = {\n '@nfq/component-file-structure': 'error',\n '@nfq/component-single-hook': 'error',\n '@nfq/styled-components-order': 'error'\n};","const SPACE_INDENT = 4;\n\nexport const reactRules = {\n 'no-underscore-dangle': [\n 'error',\n {\n allow: ['_id', '__REDUX_DEVTOOLS_EXTENSION_COMPOSE__'],\n allowAfterSuper: false,\n allowAfterThis: false,\n enforceInMethodNames: true\n }\n ],\n 'react/boolean-prop-naming': [\n 'warn',\n {\n message: 'It is better if your prop ({{ propName }}) matches an common boolean pattern!',\n propTypeNames: ['bool', 'mutuallyExclusiveTrueProps'],\n rule: '^(is|has)[A-Z]([A-Za-z0-9]?)+'\n }\n ],\n 'react/button-has-type': [\n 'error',\n {\n button: true,\n reset: true,\n submit: true\n }\n ],\n 'react/checked-requires-onchange-or-readonly': 'error',\n 'react/default-props-match-prop-types': ['error', {allowRequiredDefaults: false}],\n 'react/destructuring-assignment': ['error', 'always'],\n 'react/display-name': ['off', {ignoreTranspilerName: true}],\n 'react/forbid-component-props': ['off', {forbid: []}],\n 'react/forbid-dom-props': ['off', {forbid: []}],\n 'react/forbid-elements': ['off', {forbid: []}],\n 'react/forbid-foreign-prop-types': ['warn', {allowInPropTypes: true}],\n 'react/forbid-prop-types': [\n 'error',\n {\n checkChildContextTypes: true,\n checkContextTypes: true,\n forbid: ['any']\n }\n ],\n 'react/function-component-definition': [\n 'error',\n {\n namedComponents: 'arrow-function',\n unnamedComponents: 'arrow-function'\n }\n ],\n 'react/iframe-missing-sandbox': 'error',\n 'react/jsx-boolean-value': ['error', 'never', {always: []}],\n 'react/jsx-child-element-spacing': 'error',\n 'react/jsx-closing-bracket-location': ['error', 'line-aligned'],\n 'react/jsx-closing-tag-location': 'error',\n 'react/jsx-curly-brace-presence': [\n 'error',\n {\n children: 'never',\n props: 'never'\n }\n ],\n 'react/jsx-curly-newline': [\n 'error',\n {\n multiline: 'consistent',\n singleline: 'consistent'\n }\n ],\n 'react/jsx-curly-spacing': ['error', 'never', {allowMultiline: true}],\n 'react/jsx-equals-spacing': ['error', 'never'],\n 'react/jsx-filename-extension': ['error', {extensions: ['.jsx', '.tsx']}],\n 'react/jsx-first-prop-new-line': ['error', 'multiline-multiprop'],\n 'react/jsx-fragments': ['error', 'syntax'],\n 'react/jsx-handler-names': [\n 'error',\n {\n eventHandlerPrefix: 'handle',\n eventHandlerPropPrefix: 'on'\n }\n ],\n 'react/jsx-indent': [\n 'error',\n SPACE_INDENT,\n {\n checkAttributes: true,\n indentLogicalExpressions: true\n }\n ],\n 'react/jsx-indent-props': ['error', SPACE_INDENT],\n 'react/jsx-key': [\n 'error',\n {\n checkFragmentShorthand: true,\n checkKeyMustBeforeSpread: true,\n warnOnDuplicates: true\n }\n ],\n 'react/jsx-max-depth': 'off',\n 'react/jsx-max-props-per-line': [\n 'error',\n {\n maximum: 1,\n when: 'multiline'\n }\n ],\n 'react/jsx-newline': ['error', {prevent: true}],\n 'react/jsx-no-bind': [\n 'error',\n {\n allowArrowFunctions: true,\n allowBind: false,\n allowFunctions: false,\n ignoreDOMComponents: false,\n ignoreRefs: true\n }\n ],\n 'react/jsx-no-comment-textnodes': 'error',\n 'react/jsx-no-duplicate-props': ['error', {ignoreCase: true}],\n 'react/jsx-no-leaked-render': 'off',\n 'react/jsx-no-literals': ['off', {noStrings: true}],\n 'react/jsx-no-script-url': [\n 'error',\n [\n {\n name: 'Link',\n props: ['to']\n }\n ]\n ],\n 'react/jsx-no-target-blank': ['error', {enforceDynamicLinks: 'always'}],\n 'react/jsx-no-undef': ['error', {allowGlobals: true}],\n 'react/jsx-no-useless-fragment': 'error',\n 'react/jsx-one-expression-per-line': ['off', {allow: 'single-child'}],\n 'react/jsx-pascal-case': [\n 'error',\n {\n allowAllCaps: false,\n ignore: []\n }\n ],\n 'react/jsx-props-no-multi-spaces': 'error',\n 'react/jsx-props-no-spread-multi': 'error',\n 'react/jsx-props-no-spreading': [\n 'error',\n {\n custom: 'enforce',\n exceptions: [],\n explicitSpread: 'ignore',\n html: 'enforce'\n }\n ],\n 'react/jsx-sort-props': [\n 'error',\n {\n callbacksLast: true,\n ignoreCase: true,\n noSortAlphabetically: false,\n reservedFirst: true,\n shorthandFirst: false,\n shorthandLast: true\n }\n ],\n 'react/jsx-tag-spacing': [\n 'error',\n {\n afterOpening: 'never',\n beforeClosing: 'never',\n beforeSelfClosing: 'always',\n closingSlash: 'never'\n }\n ],\n 'react/jsx-uses-react': 'error',\n 'react/jsx-uses-vars': 'error',\n 'react/jsx-wrap-multilines': [\n 'error',\n {\n arrow: 'parens-new-line',\n assignment: 'parens-new-line',\n condition: 'parens-new-line',\n declaration: 'parens-new-line',\n logical: 'parens-new-line',\n prop: 'parens-new-line',\n return: 'parens-new-line'\n }\n ],\n 'react/no-access-state-in-setstate': 'error',\n 'react/no-adjacent-inline-elements': 'off',\n 'react/no-array-index-key': 'error',\n 'react/no-arrow-function-lifecycle': 'error',\n 'react/no-children-prop': 'error',\n 'react/no-danger': 'warn',\n 'react/no-danger-with-children': 'error',\n 'react/no-deprecated': 'error',\n 'react/no-did-mount-set-state': 'off',\n 'react/no-did-update-set-state': 'error',\n 'react/no-direct-mutation-state': 'error',\n 'react/no-find-dom-node': 'error',\n 'react/no-is-mounted': 'error',\n 'react/no-multi-comp': ['error', {ignoreStateless: true}],\n 'react/no-namespace': 'error',\n 'react/no-redundant-should-component-update': 'error',\n 'react/no-render-return-value': 'error',\n 'react/no-set-state': 'off',\n 'react/no-string-refs': 'error',\n 'react/no-this-in-sfc': 'error',\n 'react/no-typos': 'error',\n 'react/no-unescaped-entities': 'error',\n 'react/no-unknown-property': 'error',\n 'react/no-unsafe': ['error', {checkAliases: true}],\n 'react/no-unused-class-component-methods': 'off',\n 'react/no-unused-prop-types': [\n 'error',\n {\n customValidators: [],\n skipShapeProps: true\n }\n ],\n 'react/no-unused-state': 'error',\n 'react/no-will-update-set-state': 'error',\n 'react/prefer-es6-class': ['error', 'always'],\n 'react/prefer-read-only-props': 'off',\n 'react/prefer-stateless-function': ['off', {ignorePureComponents: true}],\n 'react/prop-types': [\n 'off',\n {\n customValidators: [],\n ignore: [],\n skipUndeclared: false\n }\n ],\n 'react/react-in-jsx-scope': 'off',\n 'react/require-default-props': ['error', {forbidDefaultForRequired: true}],\n 'react/require-optimization': ['off', {allowDecorators: ['viewRender']}],\n 'react/require-render-return': 'error',\n 'react/self-closing-comp': 'error',\n 'react/sort-comp': [\n 'error',\n {\n groups: {\n lifecycle: [\n 'displayName',\n 'propTypes',\n 'contextTypes',\n 'childContextTypes',\n 'mixins',\n 'statics',\n 'defaultProps',\n 'constructor',\n 'getDefaultProps',\n 'getInitialState',\n 'state',\n 'getChildContext',\n 'getDerivedStateFromProps',\n 'componentWillMount',\n 'UNSAFE_componentWillMount',\n 'componentDidMount',\n 'componentWillReceiveProps',\n 'UNSAFE_componentWillReceiveProps',\n 'shouldComponentUpdate',\n 'componentWillUpdate',\n 'UNSAFE_componentWillUpdate',\n 'getSnapshotBeforeUpdate',\n 'componentDidUpdate',\n 'componentDidCatch',\n 'componentWillUnmount'\n ],\n rendering: [\n '/^render.+$/',\n 'render'\n ]\n },\n order: [\n 'static-variables',\n 'static-methods',\n 'instance-variables',\n 'lifecycle',\n '/^on.+$/',\n 'getters',\n 'setters',\n '/^(get|set)(?!(InitialState$|DefaultProps$|ChildContext$)).+$/',\n 'instance-methods',\n 'everything-else',\n 'rendering'\n ]\n }\n ],\n 'react/sort-default-props': ['error', {ignoreCase: true}],\n 'react/sort-prop-types': [\n 'error',\n {\n callbacksLast: true,\n ignoreCase: true,\n requiredFirst: true,\n sortShapeProp: true\n }\n ],\n 'react/state-in-constructor': ['error', 'always'],\n 'react/static-property-placement': ['error', 'static public field'],\n 'react/style-prop-object': 'off',\n 'react/void-dom-elements-no-children': 'error'\n};","export const reactA11y = {\n 'jsx-a11y/accessible-emoji': 'error',\n 'jsx-a11y/alt-text': [\n 'error',\n {\n area: [],\n elements: [\n 'img',\n 'object',\n 'area',\n 'input[type=\"image\"]'\n ],\n img: [],\n 'input[type=\"image\"]': [],\n object: []\n }\n ],\n 'jsx-a11y/anchor-has-content': ['error', {components: []}],\n 'jsx-a11y/anchor-is-valid': [\n 'error',\n {\n aspects: ['noHref', 'invalidHref', 'preferButton'],\n components: ['Link'],\n specialLink: ['to']\n }\n ],\n 'jsx-a11y/aria-activedescendant-has-tabindex': 'error',\n 'jsx-a11y/aria-props': 'error',\n 'jsx-a11y/aria-proptypes': 'error',\n 'jsx-a11y/aria-role': ['error', {ignoreNonDom: false}],\n 'jsx-a11y/aria-unsupported-elements': 'error',\n 'jsx-a11y/click-events-have-key-events': 'error',\n 'jsx-a11y/heading-has-content': ['error', {components: []}],\n 'jsx-a11y/html-has-lang': 'error',\n 'jsx-a11y/iframe-has-title': 'error',\n 'jsx-a11y/img-redundant-alt': 'error',\n 'jsx-a11y/interactive-supports-focus': 'error',\n 'jsx-a11y/label-has-associated-control': [\n 'error',\n {\n assert: 'both',\n controlComponents: [],\n depth: 25,\n labelAttributes: [],\n labelComponents: []\n }\n ],\n 'jsx-a11y/lang': 'error',\n 'jsx-a11y/media-has-caption': [\n 'error',\n {\n audio: [],\n track: [],\n video: []\n }\n ],\n 'jsx-a11y/mouse-events-have-key-events': 'error',\n 'jsx-a11y/no-access-key': 'error',\n 'jsx-a11y/no-autofocus': ['error', {ignoreNonDOM: true}],\n 'jsx-a11y/no-distracting-elements': ['error', {elements: ['marquee', 'blink']}],\n 'jsx-a11y/no-interactive-element-to-noninteractive-role': ['error', {tr: ['none', 'presentation']}],\n 'jsx-a11y/no-noninteractive-element-interactions': [\n 'error',\n {\n handlers: [\n 'onClick',\n 'onMouseDown',\n 'onMouseUp',\n 'onKeyPress',\n 'onKeyDown',\n 'onKeyUp'\n ]\n }\n ],\n 'jsx-a11y/no-noninteractive-element-to-interactive-role': [\n 'error',\n {\n li: ['menuitem', 'option', 'row', 'tab', 'treeitem'],\n ol: ['listbox', 'menu', 'menubar', 'radiogroup', 'tablist', 'tree', 'treegrid'],\n table: ['grid'],\n td: ['gridcell'],\n ul: ['listbox', 'menu', 'menubar', 'radiogroup', 'tablist', 'tree', 'treegrid']\n }\n ],\n 'jsx-a11y/no-noninteractive-tabindex': [\n 'error',\n {\n roles: ['tabpanel'],\n tags: []\n }\n ],\n 'jsx-a11y/no-onchange': 'error',\n 'jsx-a11y/no-redundant-roles': 'error',\n 'jsx-a11y/no-static-element-interactions': [\n 'error',\n {\n handlers: [\n 'onClick',\n 'onMouseDown',\n 'onMouseUp',\n 'onKeyPress',\n 'onKeyDown',\n 'onKeyUp'\n ]\n }\n ],\n 'jsx-a11y/role-has-required-aria-props': 'error',\n 'jsx-a11y/role-supports-aria-props': 'error',\n 'jsx-a11y/scope': 'error',\n 'jsx-a11y/tabindex-no-positive': 'error'\n};","export const reactHooks = {\n 'react-hooks/component-hook-factories': 'warn',\n 'react-hooks/error-boundaries': 'error',\n 'react-hooks/exhaustive-deps': 'warn',\n 'react-hooks/globals': 'error',\n 'react-hooks/immutability': 'off',\n 'react-hooks/purity': 'error',\n 'react-hooks/rules-of-hooks': 'error',\n 'react-hooks/set-state-in-effect': 'error',\n 'react-hooks/set-state-in-render': 'error',\n 'react-hooks/static-components': 'error',\n 'react-hooks/use-memo': 'error'\n};","import {nfqPluginRules} from './nfq';\nimport {reactRules} from './react';\nimport {reactA11y} from './react-a11y';\nimport {reactHooks} from './react-hooks';\n\nexport const reactPluginRules = {\n ...nfqPluginRules,\n ...reactRules,\n ...reactA11y,\n ...reactHooks\n};\n\nexport {\n nfqPluginRules,\n reactRules,\n reactA11y,\n reactHooks\n}","export const eslint = {\n '@stylistic/brace-style': 'off',\n '@stylistic/comma-dangle': 'off',\n '@stylistic/comma-spacing': 'off',\n '@stylistic/function-call-spacing': 'off',\n '@stylistic/keyword-spacing': 'off',\n '@stylistic/lines-between-class-members': 'off',\n '@stylistic/no-extra-semi': 'off',\n '@stylistic/object-curly-spacing': 'off',\n '@stylistic/padding-line-between-statements': 'off',\n '@stylistic/quotes': 'off',\n '@stylistic/semi': 'off',\n '@stylistic/space-before-blocks': 'off',\n '@stylistic/space-before-function-paren': 'off',\n '@stylistic/space-infix-ops': 'off',\n 'default-param-last': 'off',\n 'dot-notation': 'off',\n 'jsdoc/require-param-type': 'off',\n 'jsdoc/require-returns-type': 'off',\n 'no-array-constructor': 'off',\n 'no-dupe-class-members': 'off',\n 'no-empty-function': 'off',\n 'no-implied-eval': 'off',\n 'no-invalid-this': 'off',\n 'no-loop-func': 'off',\n 'no-loss-of-precision': 'off',\n 'no-redeclare': 'off',\n 'no-return-await': 'off',\n 'no-shadow': 'off',\n 'no-throw-literal': 'off',\n 'no-undefined': 'off',\n 'no-unused-expressions': 'off',\n 'no-unused-vars': 'off',\n 'no-use-before-define': 'off',\n 'no-useless-constructor': 'off'\n};","export const react = {\n 'react/default-props-match-prop-types': 'off',\n 'react/require-default-props': 'off'\n};","/* eslint-disable @stylistic/object-curly-newline */\nexport const security = {\n 'security/detect-object-injection': 'off'\n};","import {eslint} from './eslint';\nimport {react} from './react';\nimport {security} from './security';\n\nexport const typescriptRuleResets = {\n ...react,\n ...eslint,\n ...security\n};\n\nexport {\n eslint as typescriptEslintRules,\n react as typescriptReactRules,\n security as typescriptSecurityRules\n}","/* eslint-disable @stylistic/object-curly-newline */\nexport const nfqRules = {\n '@nfq/no-empty-lines-in-types': 'error'\n};","export const tsEslint = {\n '@typescript-eslint/adjacent-overload-signatures': 'error',\n '@typescript-eslint/array-type': ['error', {default: 'array'}],\n '@typescript-eslint/class-literal-property-style': 'error',\n '@typescript-eslint/consistent-generic-constructors': ['error', 'constructor'],\n '@typescript-eslint/consistent-indexed-object-style': ['error', 'record'],\n '@typescript-eslint/consistent-type-assertions': ['error', {assertionStyle: 'as'}],\n '@typescript-eslint/consistent-type-definitions': 'off',\n '@typescript-eslint/consistent-type-exports': 'error',\n '@typescript-eslint/consistent-type-imports': [\n 'error',\n {\n disallowTypeAnnotations: true,\n prefer: 'type-imports'\n }\n ],\n '@typescript-eslint/default-param-last': 'error',\n '@typescript-eslint/dot-notation': ['error', {allowKeywords: true}],\n '@typescript-eslint/explicit-function-return-type': 'off',\n '@typescript-eslint/explicit-member-accessibility': ['error', {accessibility: 'no-public'}],\n '@typescript-eslint/explicit-module-boundary-types': 'off',\n '@typescript-eslint/indent': 'off',\n '@typescript-eslint/init-declarations': 'off',\n '@typescript-eslint/member-ordering': [\n 'error',\n {\n default: {order: 'as-written'},\n interfaces: {order: 'alphabetically-case-insensitive'},\n typeLiterals: {order: 'alphabetically-case-insensitive'}\n }\n ],\n '@typescript-eslint/method-signature-style': ['error', 'method'],\n '@typescript-eslint/no-array-constructor': 'error',\n '@typescript-eslint/no-base-to-string': 'error',\n '@typescript-eslint/no-confusing-non-null-assertion': 'warn',\n '@typescript-eslint/no-confusing-void-expression': 'off',\n '@typescript-eslint/no-dupe-class-members': 'error',\n '@typescript-eslint/no-duplicate-enum-values': 'warn',\n '@typescript-eslint/no-dynamic-delete': 'off',\n '@typescript-eslint/no-empty-function': ['error', {allow: ['arrowFunctions', 'methods', 'asyncMethods']}],\n '@typescript-eslint/no-empty-interface': 'error',\n '@typescript-eslint/no-empty-object-type': 'error',\n '@typescript-eslint/no-explicit-any': 'off',\n '@typescript-eslint/no-extra-non-null-assertion': 'error',\n '@typescript-eslint/no-extraneous-class': 'off',\n '@typescript-eslint/no-floating-promises': 'error',\n '@typescript-eslint/no-for-in-array': 'error',\n '@typescript-eslint/no-implied-eval': 'error',\n '@typescript-eslint/no-inferrable-types': 'error',\n '@typescript-eslint/no-invalid-this': 'error',\n '@typescript-eslint/no-invalid-void-type': 'off',\n '@typescript-eslint/no-loop-func': 'error',\n '@typescript-eslint/no-loss-of-precision': 'error',\n '@typescript-eslint/no-misused-new': 'error',\n '@typescript-eslint/no-misused-promises': ['error', {checksVoidReturn: false}],\n '@typescript-eslint/no-namespace': [\n 'error',\n {\n allowDeclarations: true,\n allowDefinitionFiles: true\n }\n ],\n '@typescript-eslint/no-non-null-asserted-nullish-coalescing': 'error',\n '@typescript-eslint/no-non-null-asserted-optional-chain': 'error',\n '@typescript-eslint/no-non-null-assertion': 'off',\n '@typescript-eslint/no-redeclare': 'error',\n '@typescript-eslint/no-redundant-type-constituents': 'warn',\n '@typescript-eslint/no-require-imports': 'warn',\n '@typescript-eslint/no-shadow': 'error',\n '@typescript-eslint/no-this-alias': ['error', {allowedNames: ['self']}],\n '@typescript-eslint/no-unnecessary-boolean-literal-compare': 'error',\n '@typescript-eslint/no-unnecessary-condition': 'error',\n '@typescript-eslint/no-unnecessary-qualifier': 'error',\n '@typescript-eslint/no-unnecessary-type-arguments': 'warn',\n '@typescript-eslint/no-unnecessary-type-assertion': 'warn',\n '@typescript-eslint/no-unnecessary-type-constraint': 'error',\n '@typescript-eslint/no-unsafe-argument': 'error',\n '@typescript-eslint/no-unsafe-assignment': 'off',\n '@typescript-eslint/no-unsafe-call': 'error',\n '@typescript-eslint/no-unsafe-function-type': 'error',\n '@typescript-eslint/no-unsafe-member-access': 'error',\n '@typescript-eslint/no-unsafe-return': 'error',\n '@typescript-eslint/no-unused-expressions': [\n 'error',\n {\n allowShortCircuit: true,\n allowTaggedTemplates: false,\n allowTernary: true\n }\n ],\n '@typescript-eslint/no-unused-vars': [\n 'error',\n {\n args: 'after-used',\n argsIgnorePattern: '^e$',\n caughtErrors: 'none',\n ignoreRestSiblings: true,\n vars: 'all'\n }\n ],\n '@typescript-eslint/no-use-before-define': [\n 'error',\n {\n classes: false,\n functions: false,\n variables: false\n }\n ],\n '@typescript-eslint/no-useless-constructor': 'error',\n '@typescript-eslint/no-useless-empty-export': 'error',\n '@typescript-eslint/no-var-requires': 'error',\n '@typescript-eslint/no-wrapper-object-types': 'error',\n '@typescript-eslint/non-nullable-type-assertion-style': 'error',\n '@typescript-eslint/only-throw-error': 'error',\n '@typescript-eslint/prefer-as-const': 'error',\n '@typescript-eslint/prefer-enum-initializers': 'off',\n '@typescript-eslint/prefer-for-of': 'error',\n '@typescript-eslint/prefer-function-type': 'off',\n '@typescript-eslint/prefer-includes': 'error',\n '@typescript-eslint/prefer-literal-enum-member': 'error',\n '@typescript-eslint/prefer-namespace-keyword': 'error',\n '@typescript-eslint/prefer-nullish-coalescing': 'error',\n '@typescript-eslint/prefer-optional-chain': 'error',\n '@typescript-eslint/prefer-readonly': 'error',\n '@typescript-eslint/prefer-readonly-parameter-types': 'off',\n '@typescript-eslint/prefer-reduce-type-parameter': 'error',\n '@typescript-eslint/prefer-return-this-type': 'error',\n '@typescript-eslint/prefer-string-starts-ends-with': 'error',\n '@typescript-eslint/prefer-ts-expect-error': 'error',\n '@typescript-eslint/promise-function-async': 'error',\n '@typescript-eslint/require-array-sort-compare': 'off',\n '@typescript-eslint/require-await': 'error',\n '@typescript-eslint/restrict-plus-operands': 'error',\n '@typescript-eslint/restrict-template-expressions': 'error',\n '@typescript-eslint/return-await': 'error',\n '@typescript-eslint/sort-type-constituents': ['error', {checkIntersections: false}],\n '@typescript-eslint/strict-boolean-expressions': 'off',\n '@typescript-eslint/switch-exhaustiveness-check': [\n 'error',\n {\n allowDefaultCaseForExhaustiveSwitch: true,\n considerDefaultExhaustiveForUnions: true\n }\n ],\n '@typescript-eslint/triple-slash-reference': 'error',\n '@typescript-eslint/unified-signatures': 'error'\n};","import {nfqRules} from './nfq';\nimport {tsEslint} from './ts-eslint';\n\nexport const tsRules = {\n ...tsEslint,\n ...nfqRules\n};\n\nexport {nfqRules as tsNfqRules, tsEslint as tsEslintRules};","import globalsEslint from 'globals';\n\nexport const globals: Record<string, boolean> = {\n after: false,\n afterEach: false,\n before: false,\n beforeEach: false,\n chai: false,\n Chai: false,\n context: false,\n cy: false,\n Cypress: false,\n describe: false,\n it: false,\n JQuery: false,\n JSX: false,\n NodeJS: false,\n ...globalsEslint.browser,\n ...globalsEslint.node,\n ...globalsEslint.builtin,\n ...globalsEslint.chai,\n ...globalsEslint.es2026\n};","import type {TSESTree} from '@typescript-eslint/utils';\n\n/**\n * Unwraps nested wrapper expressions to reach the underlying expression node. It handles common TypeScript and\n * chain wrappers that can obscure the real expression. The function returns the first non-wrapper expression encountered.\n *\n * @param expression The expression that may be wrapped by TypeScript or chain nodes.\n * @returns The unwrapped expression node.\n *\n * @example\n * ```tsx\n * const base = unwrapExpression(expr);\n * ```\n */\nexport const unwrapExpression = (expression: TSESTree.Expression): TSESTree.Expression => {\n let current = expression;\n\n while (\n current.type === 'ChainExpression'\n || current.type === 'TSAsExpression'\n || current.type === 'TSNonNullExpression'\n || current.type === 'TSInstantiationExpression'\n ) {\n current = current.expression as TSESTree.Expression;\n }\n\n return current;\n};","import {unwrapExpression} from './expression-utils';\n\nimport type {TSESTree} from '@typescript-eslint/utils';\n\n/**\n * Checks whether a provided name starts with an uppercase letter. It is used to detect component-like identifiers by\n * convention. The function returns a boolean that reflects the naming rule.\n *\n * @param name The identifier name to validate.\n * @returns True when the name begins with an uppercase character.\n *\n * @example\n * ```tsx\n * const ok = isUppercaseName('Header');\n * ```\n */\nexport const isUppercaseName = (name: string) => (/^[A-Z]/u).test(name);\n\nconst COMPONENT_WRAPPERS = new Set(['observer', 'memo', 'forwardRef']);\n\nconst isComponentWrapperCall = (expression: TSESTree.Expression): boolean => {\n const callee = unwrapExpression(expression);\n\n if (callee.type === 'Identifier') {\n return COMPONENT_WRAPPERS.has(callee.name);\n }\n\n if (\n callee.type === 'MemberExpression'\n && callee.object.type === 'Identifier'\n && callee.object.name === 'React'\n && callee.property.type === 'Identifier'\n ) {\n return COMPONENT_WRAPPERS.has(callee.property.name);\n }\n\n return false;\n};\n\n/**\n * Extracts a function expression from a provided expression node by unwrapping common wrappers and scanning call\n * arguments. It supports arrow functions and traditional function expressions, including those nested inside call\n * expressions. It returns the first matching function expression found or null when none is present.\n *\n * @param expression The expression node that may contain a function expression.\n * @returns The discovered function expression or null when none is found.\n *\n * @remarks\n * This helper is used to locate inline component factories in initializer expressions.\n *\n * @example\n * ```tsx\n * const fn = getFunctionFromExpression(factory(() => null));\n * ```\n */\nexport const getFunctionFromExpression = (\n expression: TSESTree.Expression\n): TSESTree.ArrowFunctionExpression | TSESTree.FunctionExpression | null => {\n const node = unwrapExpression(expression);\n\n if (node.type === 'ArrowFunctionExpression' || node.type === 'FunctionExpression') {\n return node;\n }\n\n if (node.type === 'CallExpression') {\n if (!isComponentWrapperCall(node.callee)) {\n return null;\n }\n\n for (const argument of node.arguments) {\n if (argument.type === 'CallExpression') {\n const nested = getFunctionFromExpression(argument);\n\n if (nested) {\n return nested;\n }\n }\n\n if (argument.type === 'ArrowFunctionExpression' || argument.type === 'FunctionExpression') {\n return argument;\n }\n }\n }\n\n return null;\n};","import {ASTUtils} from '@typescript-eslint/utils';\n\nimport {getFunctionFromExpression, isUppercaseName} from './component-utils';\nimport {unwrapExpression} from './expression-utils';\n\nimport type {TSESTree} from '@typescript-eslint/utils';\n\nexport type ComponentInfo = {\n componentTypeNode?: TSESTree.Node | null;\n name: string;\n propsTypeNode?: TSESTree.Node | null;\n statement: TSESTree.Node;\n};\n\nexport type TypeDeclarationInfo = {\n name: string;\n statement: TSESTree.Node;\n};\n\n/**\n * Determines whether a given AST node tree contains any JSX elements or fragments. It performs a depth-first traversal\n * using an explicit stack to avoid recursion and scans all child nodes except parent links. It returns true as soon as\n * a JSXElement or JSXFragment node is found and otherwise returns false after fully traversing the tree.\n *\n * @param node The AST node to scan for JSX content.\n * @returns True when the tree contains JSX elements or fragments, otherwise false.\n *\n * @remarks\n * This helper is used to detect component-like render bodies that include JSX.\n *\n * @example\n * ```tsx\n * const hasJsx = containsJsx(node);\n * ```\n */\nconst containsJsx = (node: TSESTree.Node | null | undefined): boolean => {\n if (!node) {\n return false;\n }\n\n const stack: TSESTree.Node[] = [node];\n\n while (stack.length) {\n const current = stack.pop()!;\n\n if (current.type === 'JSXElement' || current.type === 'JSXFragment') {\n return true;\n }\n\n for (const key of Object.keys(current) as (keyof TSESTree.Node)[]) {\n if (key === 'parent') {\n continue;\n }\n\n const value = current[key];\n\n // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition\n if (!value || typeof value !== 'object') {\n continue;\n }\n\n if (Array.isArray(value)) {\n for (const item of value) {\n if (item && typeof item === 'object' && 'type' in item) {\n stack.push(item as TSESTree.Node);\n }\n }\n } else if ('type' in value) {\n stack.push(value as unknown as TSESTree.Node);\n }\n }\n }\n\n return false;\n};\n\n/**\n * Determines whether the provided AST node represents a React component superclass. It checks for both direct\n * identifiers and React namespace member expressions. It returns true only when the name matches Component or\n * PureComponent and otherwise returns false.\n *\n * @param node The AST node to test for a component superclass reference.\n * @returns True when the node matches Component or PureComponent, otherwise false.\n *\n * @remarks\n * This helper is used to recognize React class component inheritance patterns.\n *\n * @example\n * ```tsx\n * const ok = isComponentSuperclass(node);\n * ```\n */\nconst isComponentSuperclass = (node: TSESTree.Node | null | undefined): boolean => {\n if (!node) {\n return false;\n }\n\n if (node.type === 'Identifier') {\n return node.name === 'Component' || node.name === 'PureComponent';\n }\n\n if (\n node.type === 'MemberExpression'\n && node.object.type === 'Identifier'\n && node.object.name === 'React'\n && node.property.type === 'Identifier'\n ) {\n return node.property.name === 'Component' || node.property.name === 'PureComponent';\n }\n\n return false;\n};\n\n/**\n * Determines whether a class declaration or expression represents a React class component. It validates the superclass\n * against React Component or PureComponent and then checks for a render method that returns JSX. It returns true only\n * when both conditions are satisfied.\n *\n * @param node The class declaration or expression node to inspect.\n * @returns True when the class extends a React component superclass and defines a JSX-producing render method.\n *\n * @remarks\n * This helper relies on a render method presence and JSX detection to identify class components.\n *\n * @example\n * ```tsx\n * const ok = isClassComponent(classNode);\n * ```\n */\nconst isClassComponent = (node: TSESTree.ClassDeclaration | TSESTree.ClassExpression): boolean => {\n if (!isComponentSuperclass(node.superClass)) {\n return false;\n }\n\n const renderMethod = node.body.body.find(\n member => member.type === 'MethodDefinition'\n && member.key.type === 'Identifier'\n && member.key.name === 'render'\n );\n\n // eslint-disable-next-line @typescript-eslint/prefer-optional-chain\n if (!renderMethod || renderMethod.type !== 'MethodDefinition') {\n return false;\n }\n\n return containsJsx(renderMethod.value.body);\n};\n\n/**\n * Retrieves the props type node from the superclass type parameters of a class.\n *\n * @param node The class declaration or expression to inspect.\n * @returns The first type parameter node from the superclass, or `null` if none exists.\n */\nconst getSuperclassPropsType = (\n node: TSESTree.ClassDeclaration | TSESTree.ClassExpression\n): TSESTree.Node | null => {\n const withSuperParams = node as unknown as {\n superTypeArguments?: {params?: TSESTree.Node[]};\n superTypeParameters?: {params?: TSESTree.Node[]};\n };\n\n const superParams = withSuperParams.superTypeArguments ?? withSuperParams.superTypeParameters;\n\n return superParams?.params?.[0] ?? null;\n};\n\nconst getTypeArguments = (node: TSESTree.CallExpression): TSESTree.Node[] | null => {\n const withTypeArgs = node as unknown as {\n typeArguments?: {params?: TSESTree.Node[]};\n typeParameters?: {params?: TSESTree.Node[]};\n };\n\n const typeArgs = withTypeArgs.typeArguments ?? withTypeArgs.typeParameters;\n\n return typeArgs?.params ?? null;\n};\n\nconst isForwardRefCallee = (callee: TSESTree.Expression): boolean => {\n if (callee.type === 'Identifier') {\n return callee.name === 'forwardRef';\n }\n\n return callee.type === 'MemberExpression'\n && callee.object.type === 'Identifier'\n && callee.object.name === 'React'\n && callee.property.type === 'Identifier'\n && callee.property.name === 'forwardRef';\n};\n\nconst getForwardRefPropsType = (expression: TSESTree.Expression): TSESTree.Node | null => {\n const node = unwrapExpression(expression);\n\n if (node.type !== 'CallExpression') {\n return null;\n }\n\n if (isForwardRefCallee(node.callee)) {\n const typeArgs = getTypeArguments(node);\n\n if (!typeArgs || typeArgs.length === 0) {\n return null;\n }\n\n if (typeArgs.length > 1) {\n return typeArgs[1] ?? null;\n }\n\n return typeArgs[0] ?? null;\n }\n\n for (const argument of node.arguments) {\n if (argument.type === 'CallExpression') {\n const nested = getForwardRefPropsType(argument);\n\n if (nested) {\n return nested;\n }\n }\n }\n\n return null;\n};\n\n/**\n * Determines whether a statement declares a component-like function and returns structured details when it does.\n * It checks for uppercase-named function declarations and variable declarations initialized with arrow functions or\n * function expressions. It returns null when the statement does not match the expected component patterns.\n *\n * @param node The statement node to analyze for component declarations.\n * @returns The component information when a match is found, or null when no component is detected.\n *\n * @remarks\n * This helper relies on naming conventions and initializer inspection to infer component declarations.\n *\n * @example\n * ```tsx\n * const info = getComponentInfoFromStatement(statement);\n * ```\n */\nexport const getComponentInfoFromStatement = (node: TSESTree.Statement): ComponentInfo | null => {\n if (node.type === 'FunctionDeclaration' && isUppercaseName(node.id.name)) {\n if (!containsJsx(node.body)) {\n return null;\n }\n\n return {\n componentTypeNode: node.returnType?.typeAnnotation ?? null,\n name: node.id.name,\n propsTypeNode: node.params[0] && 'typeAnnotation' in node.params[0]\n ? node.params[0].typeAnnotation\n : null,\n statement: node\n };\n }\n\n // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition\n if (node.type === 'ClassDeclaration' && node.id && isUppercaseName(node.id.name)) {\n if (!isClassComponent(node)) {\n return null;\n }\n\n return {\n componentTypeNode: null,\n name: node.id.name,\n propsTypeNode: getSuperclassPropsType(node),\n statement: node\n };\n }\n\n if (node.type !== 'VariableDeclaration') {\n return null;\n }\n\n for (const declarator of node.declarations) {\n if (!ASTUtils.isIdentifier(declarator.id)) {\n continue;\n }\n\n const {name} = declarator.id;\n\n if (!isUppercaseName(name) || !declarator.init) {\n continue;\n }\n\n const init = unwrapExpression(declarator.init);\n\n if (init.type === 'ClassExpression') {\n if (!isClassComponent(init)) {\n continue;\n }\n\n return {\n componentTypeNode: null,\n name,\n propsTypeNode: getSuperclassPropsType(init),\n statement: node\n };\n }\n\n const functionNode = getFunctionFromExpression(init);\n\n if (functionNode && containsJsx(functionNode.body)) {\n const initPropsType = functionNode.params[0] && 'typeAnnotation' in functionNode.params[0]\n ? functionNode.params[0].typeAnnotation\n : null;\n const forwardRefPropsType = getForwardRefPropsType(init);\n\n return {\n componentTypeNode: declarator.id.typeAnnotation?.typeAnnotation ?? null,\n name,\n propsTypeNode: initPropsType ?? forwardRefPropsType,\n statement: node\n };\n }\n }\n\n return null;\n};\n\n/**\n * Determines whether a statement assigns a display name to a component identifier. It narrows the statement to an\n * expression statement that performs an assignment and validates the left-hand side member access. It returns a boolean\n * indicating whether the assignment targets the specified component's displayName property.\n *\n * @param node The statement node to inspect.\n * @param componentName The expected component identifier name.\n * @returns True when the statement assigns to the component's displayName property.\n *\n * @remarks\n * This helper is used to recognize explicit displayName assignments.\n *\n * @example\n * ```tsx\n * const ok = isDisplayNameAssignment(statement, 'Header');\n * ```\n */\nexport const isDisplayNameAssignment = (node: TSESTree.Statement, componentName: string) => {\n if (node.type !== 'ExpressionStatement') {\n return false;\n }\n\n const {expression} = node;\n\n if (expression.type !== 'AssignmentExpression') {\n return false;\n }\n\n const {left} = expression;\n\n if (left.type !== 'MemberExpression' || left.property.type !== 'Identifier') {\n return false;\n }\n\n return ASTUtils.isIdentifier(left.object)\n && left.object.name === componentName\n && left.property.name === 'displayName';\n};\n\n/**\n * Determines whether a statement is an export that re-exports a component identifier with the same name.\n * It inspects named export specifiers and verifies that both the local and exported names match the provided component\n * name. It returns false for non-named exports or when no matching specifier is found.\n *\n * @param node The statement node to inspect.\n * @param componentName The expected component identifier name.\n * @returns True when the statement exports the component identifier by name.\n *\n * @remarks\n * This helper is used to detect explicit named exports of component identifiers.\n *\n * @example\n * ```tsx\n * const ok = isComponentExport(statement, 'Header');\n * ```\n */\nexport const isComponentExport = (node: TSESTree.Statement, componentName: string) => {\n if (node.type !== 'ExportNamedDeclaration' || !node.specifiers.length) {\n return false;\n }\n\n return node.specifiers.some(specifier => (\n specifier.local.type === 'Identifier'\n && specifier.local.name === componentName\n && specifier.exported.type === 'Identifier'\n && specifier.exported.name === componentName\n ));\n};\n\n/**\n * Determines whether a statement is a default export that targets a component identifier.\n * It supports `export default Identifier` and `export default class/function` declarations\n * with matching names.\n *\n * @param node The statement node to inspect.\n * @param componentName The expected component identifier name.\n * @returns True when the statement default-exports the component.\n *\n * @example\n * ```tsx\n * const ok = isDefaultComponentExport(statement, 'App');\n * ```\n */\nexport const isDefaultComponentExport = (node: TSESTree.Statement, componentName: string) => {\n if (node.type !== 'ExportDefaultDeclaration') {\n return false;\n }\n\n const {declaration} = node;\n\n if (declaration.type === 'Identifier') {\n return declaration.name === componentName;\n }\n\n if (declaration.type === 'ClassDeclaration' || declaration.type === 'FunctionDeclaration') {\n // eslint-disable-next-line @typescript-eslint/prefer-optional-chain\n return Boolean(declaration.id && declaration.id.name === componentName);\n }\n\n return false;\n};\n\n/**\n * Determines whether a statement declares a styled component variable using the styled tag factory. It inspects variable\n * declarations and checks tagged template expressions for identifiers, member expressions, or call expressions that\n * resolve to `styled`. It returns a boolean that indicates whether any declarator matches the styled component pattern.\n *\n * @param node The statement node to inspect for a styled component declaration.\n * @returns True when the statement contains a styled tagged template declaration.\n *\n * @remarks\n * This helper recognizes multiple `styled` invocation forms used in styled-components.\n *\n * @example\n * ```tsx\n * const ok = isStyledDeclaration(statement);\n * ```\n */\nexport const isStyledDeclaration = (node: TSESTree.Statement) => {\n if (node.type !== 'VariableDeclaration') {\n return false;\n }\n\n /**\n * Determines whether an expression represents a styled-components tagged template pattern. It unwraps the expression\n * to handle nested constructs and then checks identifiers, member expressions, and call expressions. It walks up the\n * tag chain until it can confirm the tag originates from `styled`, otherwise it reports false. This helper is scoped\n * to styled tagged template detection within variable declarations.\n *\n * @param expression The expression node to inspect for a styled tag origin.\n * @returns True when the expression resolves to a styled tag, otherwise false.\n *\n * @remarks\n * This helper tolerates chained member accesses and factory calls by recursively inspecting the tag origin.\n *\n * @example\n * ```tsx\n * const ok = isStyledTagExpression(tagExpression);\n * ```\n */\n const isStyledTagExpression = (expression: TSESTree.Expression): boolean => {\n const current = unwrapExpression(expression);\n\n if (ASTUtils.isIdentifier(current)) {\n return current.name === 'styled';\n }\n\n if (current.type === 'MemberExpression') {\n return current.object.type !== 'Super'\n && isStyledTagExpression(current.object as TSESTree.Expression);\n }\n\n if (current.type === 'CallExpression') {\n if (current.callee.type === 'Super') {\n return false;\n }\n\n return isStyledTagExpression(current.callee as TSESTree.Expression);\n }\n\n return false;\n };\n\n return node.declarations.some(declarator => {\n if (declarator.init?.type !== 'TaggedTemplateExpression') {\n return false;\n }\n\n return isStyledTagExpression(declarator.init.tag);\n });\n};\n\nconst STYLED_FACTORY_NAMES = new Set(['motion', 'styled']);\n\n/**\n * Determines whether a callee expression represents a styled component factory. It checks identifiers against a known\n * set of factory names and also recognizes motion member expressions. It returns true only when the callee matches one\n * of the supported styled factory patterns.\n *\n * @param callee The callee expression to inspect.\n * @returns True when the callee matches a supported styled factory.\n *\n * @remarks\n * This helper supports both direct factory identifiers and motion namespace member expressions.\n *\n * @example\n * ```tsx\n * const ok = isStyledFactory(unwrapExpression(call.callee));\n * ```\n */\nconst isStyledFactory = (callee: TSESTree.Expression): boolean => {\n if (ASTUtils.isIdentifier(callee)) {\n return STYLED_FACTORY_NAMES.has(callee.name);\n }\n\n if (\n callee.type === 'MemberExpression'\n && callee.object.type === 'Identifier'\n && callee.object.name === 'motion'\n ) {\n return true;\n }\n\n return false;\n};\n\n/**\n * Determines whether a statement declares a component factory call (motion(H1)).\n * These are treated similarly to styled components for ordering purposes.\n *\n * @param node The statement node to inspect.\n * @returns True when the statement contains a supported factory call declaration.\n *\n * @example\n * ```tsx\n * const ok = isStyledFactoryDeclaration(statement);\n * ```\n */\nexport const isStyledFactoryDeclaration = (node: TSESTree.Statement) => {\n if (node.type !== 'VariableDeclaration') {\n return false;\n }\n\n return node.declarations.some(declarator => {\n if (!declarator.init) {\n return false;\n }\n\n const init = unwrapExpression(declarator.init);\n\n if (init.type !== 'CallExpression') {\n return false;\n }\n\n return isStyledFactory(unwrapExpression(init.callee));\n });\n};\n\n/**\n * Extracts type declaration details from a statement when it represents a TypeScript interface or type alias.\n * It supports both direct declarations and named exports that wrap those declarations. It returns structured metadata\n * so callers can quickly access the declared name and statement node.\n *\n * @param node The statement node to inspect for a type declaration.\n * @returns The type declaration info when found, or null when the statement does not declare a type.\n *\n * @remarks\n * This helper simplifies handling exported and non-exported type declarations in AST traversal.\n *\n * @example\n * ```tsx\n * const info = getTypeDeclarationInfo(statement);\n * ```\n */\nexport const getTypeDeclarationInfo = (node: TSESTree.Statement): TypeDeclarationInfo | null => {\n if (node.type === 'TSInterfaceDeclaration' || node.type === 'TSTypeAliasDeclaration') {\n return {\n name: node.id.name,\n statement: node\n };\n }\n\n if (node.type === 'ExportNamedDeclaration' && node.declaration) {\n const {declaration} = node;\n\n if (declaration.type === 'TSInterfaceDeclaration' || declaration.type === 'TSTypeAliasDeclaration') {\n return {\n name: declaration.id.name,\n statement: node\n };\n }\n }\n\n return null;\n};\n\n/**\n * Collects type reference identifiers from a TypeScript AST node and records them in a provided set. It walks the node\n * recursively, skipping parent links to avoid cycles, and handles both singular child nodes and arrays of nodes. It\n * updates the provided set in place and does not return a value.\n *\n * @param typeNode The AST node to scan for type references.\n * @param names The set that receives discovered type reference names.\n *\n * @remarks\n * This helper is intended for internal traversal of TypeScript type nodes.\n *\n * @example\n * ```tsx\n * const names = new Set<string>();\n * collectTypeReferences(typeNode, names);\n * ```\n */\nexport const collectTypeReferences = (typeNode: TSESTree.Node, names: Set<string>) => {\n if (typeNode.type === 'TSTypeReference') {\n if (typeNode.typeName.type === 'Identifier') {\n names.add(typeNode.typeName.name);\n }\n }\n\n for (const key of Object.keys(typeNode) as (keyof typeof typeNode)[]) {\n if (key === 'parent') {\n continue;\n }\n const value = typeNode[key];\n\n if (typeof value !== 'object') {\n continue;\n }\n\n if (Array.isArray(value)) {\n for (const item of value) {\n if (item && typeof item === 'object') {\n collectTypeReferences(item as TSESTree.Node, names);\n }\n }\n } else {\n collectTypeReferences(value as unknown as TSESTree.Node, names);\n }\n }\n};","import {ESLintUtils} from '@typescript-eslint/utils';\n\nimport {\n collectTypeReferences,\n getComponentInfoFromStatement,\n getTypeDeclarationInfo,\n isComponentExport,\n isDefaultComponentExport,\n isDisplayNameAssignment,\n isStyledDeclaration,\n isStyledFactoryDeclaration\n} from './utils/component-file-structure-utils';\n\nimport type {ComponentInfo} from './utils/component-file-structure-utils';\nimport type {TSESLint, TSESTree} from '@typescript-eslint/utils';\n\nconst createRule = ESLintUtils.RuleCreator(\n name => `https://github.com/nfqde/eslint-config-nfq/blob/master/docs/rules/${name}.md`\n);\n\ntype MessageIds = 'invalidOrder' | 'missingDisplayName' | 'missingNamedExport';\n\nconst ORDER_LABELS = [\n 'Imports',\n 'Optional declarations',\n 'Props types',\n 'Component',\n 'Component helpers and displayName',\n 'Exports',\n 'Styled components and local helper types'\n];\nconst ORDER_MESSAGE = ORDER_LABELS.join(' -> ');\n// eslint-disable-next-line jsdoc/require-jsdoc\nconst getSectionLabel = (section: number) => ORDER_LABELS[section - 1] ?? 'Unknown';\nconst PAGE_TYPE_NAMES = new Set([\n 'NextPage',\n 'NextPageWithLayout',\n 'NextSSRPage',\n 'NextSSRPageWithLayout',\n 'NextSSGPageWithLayout'\n]);\n\nexport const componentFileStructure = createRule<[], MessageIds>({\n defaultOptions: [],\n meta: {\n docs: {description: 'Enforce file structure order for React component files.'},\n messages: {\n // eslint-disable-next-line @stylistic/max-len\n invalidOrder: 'This file structure block is out of order. {{currentName}} is a {{current}} and should be before {{previousName}}. Expected order: {{order}}.',\n missingDisplayName: 'Component {{name}} must set displayName.',\n missingNamedExport: 'Component {{name}} must be exported by name.'\n },\n schema: [],\n type: 'suggestion'\n },\n name: 'component-file-structure',\n /**\n * Creates the rule listener for enforcing component file structure ordering. It analyzes the program body to\n * identify the primary component, its props types, and structural sections. It then reports ordering issues and\n * missing requirements like displayName or named exports.\n *\n * @param context The ESLint rule context used to access source code and report diagnostics.\n * @returns A rule listener that validates component file structure and reports issues.\n *\n * @example\n * ```tsx\n * // eslint-disable-next-line @nfq/component-file-structure\n * const listener = componentFileStructure.create(context);\n * ```\n */\n // eslint-disable-next-line max-lines-per-function\n create(context) {\n const {sourceCode} = context;\n const programBody = sourceCode.ast.body;\n const componentCandidates = programBody\n .filter((statement): statement is TSESTree.Statement => statement.type !== 'TSModuleDeclaration')\n .map(statement => getComponentInfoFromStatement(statement))\n .filter((info): info is ComponentInfo => Boolean(info));\n\n if (componentCandidates.length === 0) {\n return {};\n }\n\n const componentInfo = componentCandidates.sort(\n (left, right) => left.statement.range[0] - right.statement.range[0]\n )[0];\n const componentName = componentInfo.name;\n const typeDeclarations = new Map<string, TSESTree.Node>();\n\n for (const statement of programBody) {\n const info = getTypeDeclarationInfo(statement as TSESTree.Statement);\n\n if (info) {\n typeDeclarations.set(info.name, info.statement);\n }\n }\n\n const propsTypeNames = new Set<string>();\n const propsTypeRefs = new Set<string>();\n const propsTypeNode = componentInfo.propsTypeNode ?? null;\n /**\n * Determines whether the component uses a page-specific type alias. It inspects the component type node\n * and collects all referenced type names. It then checks if any of those names match known page types to\n * decide if the component is a page component.\n *\n * @returns True when the component type includes a known page type; otherwise false.\n *\n * @example\n * ```tsx\n * const isPage = isPageType();\n * ```\n */\n const isPageType = () => {\n const typeNode = componentInfo.componentTypeNode ?? null;\n\n if (!typeNode) {\n return false;\n }\n\n const typeRefs = new Set<string>();\n\n collectTypeReferences(typeNode, typeRefs);\n\n return Array.from(typeRefs).some(name => PAGE_TYPE_NAMES.has(name));\n };\n\n /**\n * Checks whether a statement assigns a page layout helper to the component. It ensures the statement is\n * an assignment expression targeting a member of the component identifier. It then verifies the member name\n * matches supported layout assignment properties.\n *\n * @param statement The statement to inspect for a layout assignment.\n * @returns True when the statement assigns a layout helper on the component; otherwise false.\n *\n * @example\n * ```tsx\n * const hasLayout = isPageLayoutAssignment(statement);\n * ```\n */\n const isPageLayoutAssignment = (statement: TSESTree.Statement) => {\n if (statement.type !== 'ExpressionStatement') {\n return false;\n }\n\n const {expression} = statement;\n\n if (expression.type !== 'AssignmentExpression') {\n return false;\n }\n\n const {left} = expression;\n\n if (left.type !== 'MemberExpression' || left.object.type !== 'Identifier') {\n return false;\n }\n\n if (left.object.name !== componentName || left.property.type !== 'Identifier') {\n return false;\n }\n\n return left.property.name === 'getLayout' || left.property.name === 'getLayoutKey';\n };\n\n const hasDefaultExport = programBody\n .some(statement => isDefaultComponentExport(statement as TSESTree.Statement, componentName));\n const hasLayoutAssignment = programBody\n .some(statement => isPageLayoutAssignment(statement as TSESTree.Statement));\n const isPageComponent = hasDefaultExport && (hasLayoutAssignment || isPageType());\n\n /**\n * Determines whether a class element represents a static displayName member. It checks that the element is a supported\n * property definition shape and that it is declared as static. It then verifies the identifier name matches the expected\n * displayName property, which signals a static display name assignment on a class.\n *\n * @returns True when the element is a static displayName property; otherwise false.\n *\n * @example\n * ```tsx\n * const isDisplayName = hasDisplayNameMember(member);\n * ```\n */\n const hasStaticDisplayName = () => {\n /**\n * Determines whether a class element represents a static displayName member. It checks that the element is a supported\n * property definition shape and that it is declared as static. It then verifies the identifier name matches the expected\n * displayName property, which signals a static display name assignment on a class.\n *\n * @param member The class element to inspect for a static displayName property.\n * @returns True when the element is a static displayName property; otherwise false.\n *\n * @example\n * ```tsx\n * const isDisplayName = hasDisplayNameMember(member);\n * ```\n */\n const hasDisplayNameMember = (member: TSESTree.ClassElement) => {\n // @ts-expect-error\n if (member.type !== 'PropertyDefinition' && member.type !== 'ClassProperty') {\n return false;\n }\n\n if (!member.static || member.key.type !== 'Identifier') {\n return false;\n }\n\n return member.key.name === 'displayName';\n };\n\n if (componentInfo.statement.type === 'ClassDeclaration') {\n return componentInfo.statement.id?.name === componentName\n && componentInfo.statement.body.body.some(hasDisplayNameMember);\n }\n\n if (componentInfo.statement.type === 'VariableDeclaration') {\n for (const declarator of componentInfo.statement.declarations) {\n if (declarator.id.type !== 'Identifier' || declarator.id.name !== componentName) {\n continue;\n }\n\n const {init} = declarator;\n\n if (init?.type === 'ClassExpression') {\n return init.body.body.some(hasDisplayNameMember);\n }\n }\n }\n\n return false;\n };\n\n if (propsTypeNode) {\n collectTypeReferences(propsTypeNode, propsTypeRefs);\n\n for (const name of propsTypeRefs) {\n if (typeDeclarations.has(name)) {\n propsTypeNames.add(name);\n }\n }\n }\n\n /**\n * Determines whether a statement declares a type that is used as the component props. It inspects the statement\n * for a type declaration and compares the declared name against the collected props type names. It returns a\n * boolean so callers can classify statements into the props type section.\n *\n * @param statement The statement to inspect for a props type declaration.\n * @returns True when the statement declares a props type; otherwise false.\n *\n * @example\n * ```tsx\n * const isProps = isPropsTypeDeclaration(statement);\n * ```\n */\n const isPropsTypeDeclaration = (statement: TSESTree.Statement) => {\n const info = getTypeDeclarationInfo(statement);\n\n return Boolean(info && propsTypeNames.has(info.name));\n };\n\n /**\n * Determines whether a statement declares a type that is not used as the component props. It inspects the\n * statement for a type declaration and ensures the declared name is not among the collected props type names.\n * It returns a boolean so callers can classify statements into non-props type sections.\n *\n * @param statement The statement to inspect for a non-props type declaration.\n * @returns True when the statement declares a non-props type; otherwise false.\n *\n * @example\n * ```tsx\n * const isNonProps = isNonPropsTypeDeclaration(statement);\n * ```\n */\n const isNonPropsTypeDeclaration = (statement: TSESTree.Statement) => {\n const info = getTypeDeclarationInfo(statement);\n\n return Boolean(info && !propsTypeNames.has(info.name));\n };\n\n /**\n * Determines whether a statement is an optional variable-like declaration in the component file structure. It\n * filters out the main component statement and styled declarations to avoid misclassification. It considers\n * variable declarations, non-component function declarations, and enum declarations as optional declarations.\n *\n * @param statement The statement to evaluate for optional declaration status.\n * @returns True when the statement should be treated as an optional declaration; otherwise false.\n *\n * @example\n * ```tsx\n * const isOptional = isOptionalVarDeclaration(statement);\n * ```\n */\n const isOptionalVarDeclaration = (statement: TSESTree.Statement) => {\n if (statement.type === 'VariableDeclaration') {\n if (\n statement === componentInfo.statement\n || isStyledDeclaration(statement)\n || isStyledFactoryDeclaration(statement)\n ) {\n return false;\n }\n\n return true;\n }\n\n if (statement.type === 'FunctionDeclaration') {\n return statement !== componentInfo.statement;\n }\n\n return statement.type === 'TSEnumDeclaration';\n };\n\n /**\n * Determines the structural section number for a given statement in a component file. It checks the statement\n * against known component structure elements like imports, the main component, displayName assignment, exports,\n * styled declarations, optional declarations, and props types. It returns a numeric section marker to help\n * enforce ordering rules or null when the statement does not belong to a tracked section.\n *\n * @param statement The statement to classify within the component file structure.\n * @returns The numeric section identifier for the statement, or null when it does not match a section.\n *\n * @example\n * ```tsx\n * const section = sectionForStatement(statement);\n * ```\n */\n const sectionForStatement = (statement: TSESTree.Statement) => {\n if (statement.type === 'ImportDeclaration') {\n return 1;\n }\n\n if (statement === componentInfo.statement) {\n // eslint-disable-next-line @nfq/no-magic-numbers\n return 4;\n }\n\n if (isDisplayNameAssignment(statement, componentName)) {\n // eslint-disable-next-line @nfq/no-magic-numbers\n return 5;\n }\n\n if (\n isComponentExport(statement, componentName)\n || isDefaultComponentExport(statement, componentName)\n ) {\n // eslint-disable-next-line @nfq/no-magic-numbers\n return 6;\n }\n\n if (\n isNonPropsTypeDeclaration(statement)\n && statement.range[0] < componentInfo.statement.range[0]\n ) {\n // eslint-disable-next-line @nfq/no-magic-numbers\n return 2;\n }\n\n if (\n isStyledDeclaration(statement)\n || isStyledFactoryDeclaration(statement)\n || isNonPropsTypeDeclaration(statement)\n ) {\n // eslint-disable-next-line @nfq/no-magic-numbers\n return 7;\n }\n\n if (isOptionalVarDeclaration(statement)) {\n if (statement.range[0] > componentInfo.statement.range[0]) {\n // eslint-disable-next-line @nfq/no-magic-numbers\n return 5;\n }\n\n // eslint-disable-next-line @nfq/no-magic-numbers\n return 2;\n }\n\n if (isPropsTypeDeclaration(statement)) {\n // eslint-disable-next-line @nfq/no-magic-numbers\n return 3;\n }\n\n return null;\n };\n\n /**\n * Determines a human-readable label for a statement within the component file structure. It inspects the statement\n * type and section to produce a meaningful name for reporting order violations. It also handles special cases like\n * displayName assignments and exports so diagnostics are clear and actionable.\n *\n * @param statement The statement to derive a label for.\n * @param section The section number associated with the statement.\n * @returns A descriptive name for the statement within its section.\n *\n * @example\n * ```tsx\n * const name = getStatementName(statement, 4);\n * ```\n */\n const getStatementName = (statement: TSESTree.Statement, section: number) => {\n // eslint-disable-next-line @nfq/no-magic-numbers\n if (section === 4) {\n return componentName;\n }\n\n // eslint-disable-next-line @nfq/no-magic-numbers\n if (section === 5 && isDisplayNameAssignment(statement, componentName)) {\n return `${componentName}.displayName`;\n }\n\n if (statement.type === 'VariableDeclaration') {\n const first = statement.declarations[0];\n\n // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition\n if (first?.id.type === 'Identifier') {\n return first.id.name;\n }\n }\n\n if (statement.type === 'FunctionDeclaration' || statement.type === 'ClassDeclaration') {\n // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition\n return statement.id?.name ?? getSectionLabel(section);\n }\n\n if (statement.type === 'ExportDefaultDeclaration') {\n const {declaration} = statement;\n\n if (declaration.type === 'Identifier') {\n return `export default ${declaration.name}`;\n }\n\n if (declaration.type === 'ClassDeclaration' || declaration.type === 'FunctionDeclaration') {\n if (declaration.id?.name) {\n return `export default ${declaration.id.name}`;\n }\n }\n\n return 'export default';\n }\n\n if (statement.type === 'ExportNamedDeclaration') {\n const names = statement.specifiers\n .filter(specifier => specifier.local.type === 'Identifier')\n // @ts-expect-error\n .map(specifier => specifier.local.name as string);\n\n if (names.length === 1) {\n return `export {${names[0]}}`;\n }\n\n if (names.length > 1) {\n return 'export {...}';\n }\n }\n\n return getSectionLabel(section);\n };\n\n return {\n /**\n * Iterates over the program body statements to validate their order based on the defined component file structure. It\n * tracks the last seen section and reports any statement that appears in an earlier section than the last one. It also checks\n * for the presence of a displayName assignment and a named export for the component, reporting if either is missing.\n * This ensures that the component file adheres to the expected structure and includes necessary metadata for better maintainability and clarity.\n *\n * @example\n * ```tsx\n * Program();\n * ```\n */\n Program() {\n let lastSection = 0;\n let lastSectionName = '';\n let hasDisplayName = hasStaticDisplayName();\n let hasNamedExport = false;\n\n for (const statement of programBody) {\n const section = sectionForStatement(statement as TSESTree.Statement);\n\n // eslint-disable-next-line @nfq/no-magic-numbers\n if (section === 5) {\n hasDisplayName = true;\n }\n\n // eslint-disable-next-line @nfq/no-magic-numbers\n if (section === 6) {\n hasNamedExport = true;\n }\n\n if (!section) {\n continue;\n }\n\n if (section < lastSection) {\n context.report({\n data: {\n current: getSectionLabel(section),\n currentName: getStatementName(statement as TSESTree.Statement, section),\n order: ORDER_MESSAGE,\n previous: getSectionLabel(lastSection),\n previousName: lastSectionName || getSectionLabel(lastSection)\n },\n messageId: 'invalidOrder',\n node: statement\n });\n } else {\n lastSection = section;\n lastSectionName = getStatementName(statement as TSESTree.Statement, section);\n }\n }\n\n if (!hasDisplayName && !isPageComponent) {\n context.report({\n data: {name: componentName},\n messageId: 'missingDisplayName',\n node: componentInfo.statement\n });\n }\n\n if (!hasNamedExport && !isPageComponent) {\n context.report({\n data: {name: componentName},\n messageId: 'missingNamedExport',\n node: componentInfo.statement\n });\n }\n }\n } as TSESLint.RuleListener;\n }\n});","import {ASTUtils} from '@typescript-eslint/utils';\n\nimport type {TSESTree} from '@typescript-eslint/utils';\n\n/**\n * Determines whether the provided callee expression represents a React-style hook call.\n * A callee is considered a hook if it is an identifier or a member expression whose\n * property name starts with `\"use\"`.\n *\n * @param callee The callee expression to inspect.\n * @returns `true` if the callee matches hook naming conventions; otherwise, `false`.\n */\nexport const isHookCallee = (callee: TSESTree.Expression): boolean => {\n if (ASTUtils.isIdentifier(callee)) {\n return callee.name.startsWith('use');\n }\n\n if (callee.type === 'MemberExpression' && ASTUtils.isIdentifier(callee.property)) {\n return callee.property.name.startsWith('use');\n }\n\n return false;\n};","import {ASTUtils} from '@typescript-eslint/utils';\n\nimport {getFunctionFromExpression, isUppercaseName} from './component-utils';\nimport {isHookCallee} from './hook-utils';\n\nimport type {TSESTree} from '@typescript-eslint/utils';\n\nexport type ComponentInfo = {\n functionNode: TSESTree.ArrowFunctionExpression | TSESTree.FunctionDeclaration | TSESTree.FunctionExpression;\n name: string;\n};\n\n/**\n * Collects component function information from the program body. It scans top-level statements to find uppercase-named\n * component declarations and assignments. It returns metadata for each component that matches these criteria.\n *\n * @param body The program body statements to analyze.\n * @returns A list of discovered component info objects.\n *\n * @example\n * ```tsx\n * const components = getComponentInfos(program.body);\n * ```\n */\nexport const getComponentInfos = (body: TSESTree.Program['body']): ComponentInfo[] => {\n const components: ComponentInfo[] = [];\n\n for (const statement of body) {\n if (statement.type === 'FunctionDeclaration' && isUppercaseName(statement.id.name)) {\n components.push({\n functionNode: statement,\n name: statement.id.name\n });\n\n continue;\n }\n\n if (statement.type !== 'VariableDeclaration') {\n continue;\n }\n\n for (const declarator of statement.declarations) {\n if (!ASTUtils.isIdentifier(declarator.id) || !declarator.init) {\n continue;\n }\n\n if (!isUppercaseName(declarator.id.name)) {\n continue;\n }\n\n const functionNode = getFunctionFromExpression(declarator.init);\n\n if (functionNode) {\n components.push({\n functionNode,\n name: declarator.id.name\n });\n }\n }\n }\n\n return components;\n};\n\n/**\n * Determines whether a statement contains a React hook call expression. It inspects expression statements and\n * single-variable declarations to detect calls whose callee matches hook naming rules. It returns the hook call\n * node when found and otherwise returns null.\n *\n * @param statement The statement to analyze for a hook call.\n * @returns The hook call node when present, or null when no hook call is found.\n *\n * @example\n * ```tsx\n * const hookCall = getHookCallFromStatement(statement);\n * ```\n */\nexport const getHookCallFromStatement = (statement: TSESTree.Statement): TSESTree.Node | null => {\n if (statement.type === 'ExpressionStatement') {\n if (statement.expression.type === 'CallExpression' && isHookCallee(statement.expression.callee)) {\n return statement.expression;\n }\n\n return null;\n }\n\n if (statement.type === 'VariableDeclaration') {\n if (statement.declarations.length !== 1) {\n return null;\n }\n\n const declarator = statement.declarations[0];\n\n if (declarator.init?.type !== 'CallExpression') {\n return null;\n }\n\n return isHookCallee(declarator.init.callee) ? declarator.init : null;\n }\n\n return null;\n};\n\n/**\n * Determines whether the provided statement represents a guard clause in a control flow.\n * It only considers `if` statements without an `else` branch and treats immediate returns as guard clauses.\n * It also supports a single-statement block that returns as a guard clause.\n *\n * @param statement The statement node to evaluate for guard clause structure.\n * @returns A boolean indicating whether the statement is a guard clause.\n *\n * @example\n * ```tsx\n * const isGuard = isGuardClause(statement);\n * ```\n */\nexport const isGuardClause = (statement: TSESTree.Statement) => {\n if (statement.type !== 'IfStatement' || statement.alternate) {\n return false;\n }\n\n if (statement.consequent.type === 'ReturnStatement') {\n return true;\n }\n\n if (statement.consequent.type === 'BlockStatement') {\n return statement.consequent.body.length === 1 && statement.consequent.body[0].type === 'ReturnStatement';\n }\n\n return false;\n};\n\n/**\n * Determines whether a statement or its immediate branches include a return statement.\n * It checks direct return statements and inspects simple if statements for returns in their consequent.\n * It does not traverse deeper nested structures beyond the immediate consequent block. This keeps the check focused\n * on top-level guard-like returns.\n *\n * @param statement The statement node to inspect for a return statement.\n * @returns True when a return statement is found in the inspected statement, otherwise false.\n *\n * @example\n * ```tsx\n * const hasReturn = hasReturnStatement(statement);\n * ```\n */\nexport const hasReturnStatement = (statement: TSESTree.Statement): boolean => {\n if (statement.type === 'ReturnStatement') {\n return true;\n }\n\n if (statement.type === 'IfStatement') {\n if (statement.consequent.type === 'ReturnStatement') {\n return true;\n }\n\n if (statement.consequent.type === 'BlockStatement') {\n return statement.consequent.body.some(item => item.type === 'ReturnStatement');\n }\n\n return false;\n }\n\n return false;\n};","import {ESLintUtils} from '@typescript-eslint/utils';\n\nimport {\n getComponentInfos,\n getHookCallFromStatement,\n hasReturnStatement,\n isGuardClause\n} from './utils/component-single-hook-utils';\n\nimport type {TSESLint} from '@typescript-eslint/utils';\n\nconst createRule = ESLintUtils.RuleCreator(\n name => `https://github.com/nfqde/eslint-config-nfq/blob/master/docs/rules/${name}.md`\n);\n\ntype MessageIds = 'invalidStatement' | 'tooManyHooks';\n\nexport const componentSingleHook = createRule<[], MessageIds>({\n defaultOptions: [],\n meta: {\n docs: {description: 'Enforce a single hook call and minimal component bodies.'},\n messages: {\n invalidStatement: 'Only a single hook call, guard clauses, and return statements are allowed.',\n tooManyHooks: 'Only a single hook call is allowed in the component body.'\n },\n schema: [],\n type: 'suggestion'\n },\n name: 'component-single-hook',\n /**\n * Creates the rule listener for validating component bodies that should contain only one hook call.\n * It inspects component bodies, counts hook calls, and reports invalid statements or excessive hooks.\n * It also skips components without return statements and non-block bodies to avoid false positives.\n *\n * @param context The ESLint rule context providing source code and reporting utilities.\n * @returns A rule listener that validates component statement structure.\n *\n * @example\n * ```tsx\n * create(context);\n * ```\n */\n create(context) {\n const {sourceCode} = context;\n const componentInfos = getComponentInfos(sourceCode.ast.body);\n\n if (componentInfos.length === 0) {\n return {};\n }\n\n return {\n /**\n * Iterates over discovered component infos and validates each component body. It skips components without\n * block bodies or without return statements to reduce false positives. It enforces a single hook call\n * while allowing guard clauses and return statements.\n *\n * @example\n * ```tsx\n * Program();\n * ```\n */\n Program() {\n for (const component of componentInfos) {\n const {functionNode} = component;\n\n if (functionNode.body.type !== 'BlockStatement') {\n continue;\n }\n\n const statements = functionNode.body.body;\n const hasReturn = statements.some(hasReturnStatement);\n\n if (!hasReturn) {\n continue;\n }\n\n let hookCount = 0;\n\n for (const statement of statements) {\n if (statement.type === 'ReturnStatement') {\n continue;\n }\n\n if (isGuardClause(statement)) {\n continue;\n }\n\n const hookCall = getHookCallFromStatement(statement);\n\n if (hookCall) {\n hookCount += 1;\n\n if (hookCount > 1) {\n context.report({\n messageId: 'tooManyHooks',\n node: statement\n });\n }\n\n continue;\n }\n\n context.report({\n messageId: 'invalidStatement',\n node: statement\n });\n }\n }\n }\n } as TSESLint.RuleListener;\n }\n});","import {ASTUtils} from '@typescript-eslint/utils';\n\nimport {unwrapExpression} from './expression-utils';\nimport {isHookCallee} from './hook-utils';\n\nimport type {TSESTree} from '@typescript-eslint/utils';\n\nexport type HookArgCheck<MessageId extends string> = {\n allowedHookCalls: Set<TSESTree.CallExpression>;\n errors: {messageId: MessageId; node: TSESTree.Node}[];\n};\n\n/**\n * Determines whether a call expression represents a hook call by inspecting its callee.\n * It unwraps the callee expression before checking to ensure nested expressions are handled.\n * This is used to simplify hook detection logic throughout the rule utilities.\n *\n * @param node The call expression to evaluate.\n * @returns Whether the call expression resolves to a hook callee.\n *\n * @example\n * ```tsx\n * const isHook = isHookCall(callExpression);\n * ```\n */\nexport const isHookCall = (node: TSESTree.CallExpression): boolean => isHookCallee(unwrapExpression(node.callee));\n\n/**\n * Checks whether a call expression matches a Cypress command on the `cy` object.\n * It unwraps the callee to handle nested expressions and verifies both the object and property names.\n * This helps enforce command-specific validations in the rule set.\n *\n * @param node The call expression to inspect.\n * @param command The Cypress command name to match.\n * @returns Whether the call expression is a `cy.<command>` call.\n *\n * @example\n * ```tsx\n * const isMount = isCyCommandCall(callExpression, 'mount');\n * ```\n */\nexport const isCyCommandCall = (node: TSESTree.CallExpression, command: string): boolean => {\n const callee = unwrapExpression(node.callee);\n\n if (callee.type !== 'MemberExpression') {\n return false;\n }\n\n const object = unwrapExpression(callee.object);\n\n return ASTUtils.isIdentifier(object)\n && object.name === 'cy'\n && ASTUtils.isIdentifier(callee.property)\n && callee.property.name === command;\n};\n\n/**\n * Determines whether a call expression represents a Cypress mount hook invocation.\n * It checks both the singular and plural command names to cover supported API variants.\n * This helper centralizes the logic so other utilities can rely on a consistent predicate.\n *\n * @param node The call expression to inspect.\n * @returns Whether the call expression is a mount hook command call.\n *\n * @example\n * ```tsx\n * const isMountHook = isMountHookCall(callExpression);\n * ```\n */\nexport const isMountHookCall = (node: TSESTree.CallExpression): boolean => (\n isCyCommandCall(node, 'mountHook') || isCyCommandCall(node, 'mountHooks')\n);\n\n/**\n * Verifies that a call expression represents a `then` chain call on a specific target expression.\n * It unwraps the callee to correctly handle nested or parenthesized expressions.\n * This ensures the comparison against the target is precise and consistent.\n *\n * @param node The call expression to inspect.\n * @param target The target expression that must be the member object.\n * @returns Whether the call expression is a `then` call on the target.\n *\n * @example\n * ```tsx\n * const isThen = isThenCall(callExpression, mountCall);\n * ```\n */\nexport const isThenCall = (node: TSESTree.CallExpression, target: TSESTree.Expression): boolean => {\n const callee = unwrapExpression(node.callee);\n\n return callee.type === 'MemberExpression'\n && callee.object === target\n && ASTUtils.isIdentifier(callee.property)\n && callee.property.name === 'then';\n};\n\n/**\n * Collects the chained `then` call expressions that follow a Cypress mount call.\n * It walks upward through the parent member expressions to find `then` calls and records each call in order.\n * This helper stops as soon as the chain no longer matches the expected `then` pattern to ensure the result is precise.\n *\n * @param mountCall The initial mount call expression to inspect for chained `then` calls.\n * @returns An array of `then` call expressions chained from the provided mount call.\n *\n * @example\n * ```tsx\n * const thens = getThenChain(mountCall);\n * ```\n */\nexport const getThenChain = (mountCall: TSESTree.CallExpression): TSESTree.CallExpression[] => {\n const thens: TSESTree.CallExpression[] = [];\n let current: TSESTree.CallExpression | null = mountCall;\n\n while (current.parent.type === 'MemberExpression') {\n const member: TSESTree.MemberExpressionComputedName | TSESTree.MemberExpressionNonComputedName = current.parent;\n const {parent}: TSESTree.Node = member;\n\n if (parent.type !== 'CallExpression') {\n break;\n }\n\n if (isThenCall(parent, current)) {\n thens.push(parent);\n current = parent;\n continue;\n }\n\n break;\n }\n\n return thens;\n};\n\n/**\n * Extracts a hook call expression from an arrow function body when possible.\n * It supports concise bodies and single return statements within block bodies.\n * This helper ensures only valid hook calls are returned while everything else resolves to null.\n *\n * @param node The arrow function expression to inspect.\n * @returns The hook call expression when found, otherwise null.\n *\n * @remarks\n * This utility only accepts arrow functions and enforces a narrow shape for safe extraction.\n *\n * @example\n * ```tsx\n * const hookCall = getHookCallFromArrow(arrowFunction);\n * ```\n */\nexport const getHookCallFromArrow = (node: TSESTree.ArrowFunctionExpression) => {\n if (node.expression && node.body.type === 'CallExpression') {\n return isHookCall(node.body) ? node.body : null;\n }\n\n if (node.body.type !== 'BlockStatement') {\n return null;\n }\n\n if (node.body.body.length !== 1) {\n return null;\n }\n\n const [statement] = node.body.body;\n\n if (statement.type !== 'ReturnStatement' || !statement.argument) {\n return null;\n }\n\n return statement.argument.type === 'CallExpression' && isHookCall(statement.argument)\n ? statement.argument\n : null;\n};\n\n/**\n * Validates Cypress mount hook arguments and reports any rule violations that are detected.\n * It inspects the call signature to ensure the correct argument count and acceptable argument shapes.\n * It also collects valid hook call expressions so downstream checks can reuse the results safely.\n *\n * @param node The call expression whose arguments are validated for mount hook usage.\n * @param messageIds The message identifiers used for reporting invalid or missing arguments.\n * @param messageIds.invalidHookArgument The message ID for reporting invalid hook arguments.\n * @param messageIds.missingHooksArgs The message ID for reporting missing arguments when using the plural mount hooks command.\n * @returns The collected allowed hook calls along with any validation errors.\n *\n * @example\n * ```tsx\n * const result = checkHookArguments(callExpression, {\n * invalidHookArgument: 'invalidHookArgument',\n * missingHooksArgs: 'missingHooksArgs'\n * });\n * ```\n */\nexport const checkHookArguments = <MessageId extends string>(\n node: TSESTree.CallExpression,\n messageIds: {invalidHookArgument: MessageId; missingHooksArgs: MessageId}\n): HookArgCheck<MessageId> => {\n const allowedHookCalls = new Set<TSESTree.CallExpression>();\n const errors: {messageId: MessageId; node: TSESTree.Node}[] = [];\n const isHooks = isCyCommandCall(node, 'mountHooks');\n\n // eslint-disable-next-line @nfq/no-magic-numbers\n if (isHooks && node.arguments.length < 2) {\n errors.push({\n messageId: messageIds.missingHooksArgs,\n node\n });\n }\n\n if (!isHooks && node.arguments.length !== 1) {\n errors.push({\n messageId: messageIds.invalidHookArgument,\n node\n });\n\n return {\n allowedHookCalls,\n errors\n };\n }\n\n for (const arg of node.arguments) {\n if (arg.type === 'SpreadElement') {\n errors.push({\n messageId: messageIds.invalidHookArgument,\n node: arg\n });\n continue;\n }\n\n if (arg.type === 'Identifier') {\n if (!arg.name.startsWith('use')) {\n errors.push({\n messageId: messageIds.invalidHookArgument,\n node: arg\n });\n }\n\n continue;\n }\n\n if (arg.type === 'ArrowFunctionExpression') {\n const hookCall = getHookCallFromArrow(arg);\n\n if (hookCall) {\n allowedHookCalls.add(hookCall);\n continue;\n }\n }\n\n errors.push({\n messageId: messageIds.invalidHookArgument,\n node: arg\n });\n }\n\n return {\n allowedHookCalls,\n errors\n };\n};\n\n/**\n * Determines whether a node represents a Cypress `cy.wrap(values).as('values')` call pattern.\n * It inspects the call expression structure and validates the chained member access and arguments.\n * This helper keeps the rule logic consistent by providing a single predicate for the expected wrap-and-alias sequence.\n *\n * @param node The AST node to inspect for a wrap values call pattern.\n * @returns True when the node matches the expected `cy.wrap(values).as('values')` call chain.\n *\n * @example\n * ```tsx\n * if (hasWrapValues(callExpression)) {\n * // handle wrap values call\n * }\n * ```\n */\nexport const hasWrapValues = (node: TSESTree.Node): boolean => {\n if (node.type !== 'CallExpression') {\n return false;\n }\n\n const callee = unwrapExpression(node.callee);\n\n if (callee.type !== 'MemberExpression') {\n return false;\n }\n\n if (!ASTUtils.isIdentifier(callee.property) || callee.property.name !== 'as') {\n return false;\n }\n\n if (node.arguments.length !== 1) {\n return false;\n }\n\n const arg = node.arguments[0];\n\n if (arg.type !== 'Literal' || arg.value !== 'values') {\n return false;\n }\n\n if (callee.object.type !== 'CallExpression') {\n return false;\n }\n\n const wrapCall = callee.object;\n\n return isCyCommandCall(wrapCall, 'wrap')\n && wrapCall.arguments.length === 1\n && wrapCall.arguments[0].type === 'Identifier'\n && wrapCall.arguments[0].name === 'values';\n};\n\n/**\n * Determines whether a given AST node contains a JSX element named `MockComponent`.\n * It inspects JSX elements and fragments recursively to locate the target component in nested structures.\n * It returns a boolean so callers can quickly decide if a mount or render includes the mock component.\n *\n * @param node The AST node to inspect for the `MockComponent` JSX element.\n * @returns True when a `MockComponent` JSX element is found, otherwise false.\n *\n * @remarks\n * This utility only traverses JSXElement and JSXFragment nodes and ignores other node types.\n *\n * @example\n * ```tsx\n * const hasMock = containsMockComponent(jsxNode);\n * ```\n */\nexport const containsMockComponent = (node: TSESTree.Node | null | undefined): boolean => {\n if (!node) {\n return false;\n }\n\n if (node.type === 'JSXElement') {\n const {name} = node.openingElement;\n\n if (name.type === 'JSXIdentifier' && name.name === 'MockComponent') {\n return true;\n }\n\n return node.children.some(child => containsMockComponent(child as TSESTree.Node));\n }\n\n if (node.type === 'JSXFragment') {\n return node.children.some(child => containsMockComponent(child as TSESTree.Node));\n }\n\n return false;\n};\n\n/**\n * Determines whether a call expression represents a Cypress `cy.mount` call that includes a mock component.\n * It validates that the node is a call expression and that the call targets the `mount` command on `cy`.\n * It then inspects the first argument to confirm the presence of a `MockComponent` JSX element.\n *\n * @param node The AST node to inspect for a mount call containing a mock component.\n * @returns True when the node is a `cy.mount` call with a mock component argument; otherwise false.\n *\n * @example\n * ```tsx\n * const hasMockMount = hasMountWithMock(callExpression);\n * ```\n */\nexport const hasMountWithMock = (node: TSESTree.Node): boolean => {\n if (node.type !== 'CallExpression') {\n return false;\n }\n\n if (!isCyCommandCall(node, 'mount')) {\n return false;\n }\n\n if (node.arguments.length === 0) {\n return false;\n }\n\n return containsMockComponent(node.arguments[0] as TSESTree.Node);\n};\n\n/**\n * Determines whether the provided AST node represents an assertion-style call.\n * It checks for direct `expect(...)` calls as well as chained calls that use `assert` or `should` identifiers.\n * This helper centralizes assertion detection so other utilities can rely on a consistent predicate.\n *\n * @param node The AST node to inspect for an assertion call signature.\n * @returns True when the node matches known assertion call shapes; otherwise false.\n *\n * @remarks\n * This function only inspects call expressions and their immediate callee shapes.\n *\n * @example\n * ```tsx\n * if (hasAssertionCall(node)) {\n * // handle assertion\n * }\n * ```\n */\nexport const hasAssertionCall = (node: TSESTree.Node): boolean => {\n if (node.type !== 'CallExpression') {\n return false;\n }\n\n const callee = unwrapExpression(node.callee);\n\n if (ASTUtils.isIdentifier(callee) && callee.name === 'expect') {\n return true;\n }\n\n if (callee.type === 'MemberExpression') {\n if (ASTUtils.isIdentifier(callee.object) && callee.object.name === 'assert') {\n return true;\n }\n\n if (ASTUtils.isIdentifier(callee.property) && callee.property.name === 'should') {\n return true;\n }\n }\n\n return false;\n};\n\n/**\n * Determines whether a statement is a valid first `then` chain entry for mount-related checks.\n * It only allows expression statements that call either the wrap-values helper or the mount-with-mock helper.\n * This keeps downstream validation focused on the allowed call patterns and avoids unrelated statements.\n *\n * @param statement The statement node to validate against the allowed `then`-body patterns.\n * @returns True when the statement is a call expression to `hasWrapValues` or `hasMountWithMock`.\n *\n * @remarks\n * This helper enforces a strict shape so the rule can reason about the order of mount and wrap calls.\n *\n * @example\n * ```tsx\n * if (isAllowedFirstThenStatement(statement)) {\n * // process allowed statement\n * }\n * ```\n */\nexport const isAllowedFirstThenStatement = (statement: TSESTree.Statement): boolean => {\n if (statement.type !== 'ExpressionStatement') {\n return false;\n }\n\n const {expression} = statement;\n\n if (expression.type !== 'CallExpression') {\n return false;\n }\n\n return hasWrapValues(expression) || hasMountWithMock(expression);\n};\n\n/**\n * Performs a depth-first traversal of an AST node and all of its descendants.\n * The traversal is iterative and uses a stack to avoid recursion limits while still visiting every reachable child\n * node. The visitor callback is invoked for each node encountered, and the traversal skips parent references to prevent\n * cycles.\n *\n * @param node The root AST node to start walking from.\n * @param visitor The callback invoked for each visited AST node.\n *\n * @remarks\n * This helper treats any object with a `type` property as a node and walks arrays of nodes as well.\n * It intentionally skips the `parent` property to avoid infinite loops. The traversal order is depth-first but\n * not guaranteed to be stable for sibling ordering.\n *\n * @example\n * ```tsx\n * walk(rootNode, child => {\n * if (child.type === 'CallExpression') {\n * // handle call expressions\n * }\n * });\n * ```\n */\nexport const walk = (node: TSESTree.Node, visitor: (child: TSESTree.Node) => void) => {\n const stack: TSESTree.Node[] = [node];\n\n while (stack.length) {\n const current = stack.pop()!;\n\n visitor(current);\n\n for (const key of Object.keys(current) as (keyof TSESTree.Node)[]) {\n if (key === 'parent') {\n continue;\n }\n\n const value = current[key];\n\n // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition\n if (!value || typeof value !== 'object') {\n continue;\n }\n\n if (Array.isArray(value)) {\n for (const item of value) {\n if (item && typeof item === 'object' && 'type' in item) {\n stack.push(item as TSESTree.Node);\n }\n }\n } else if ('type' in value) {\n stack.push(value as unknown as TSESTree.Node);\n }\n }\n }\n};\n\n/**\n * Determines whether a call expression represents a test `it` invocation. This includes direct `it(...)` calls as\n * well as `it.only(...)` and `it.skip(...)` variants. It unwraps the callee to handle nested expressions and returns\n * a boolean predicate for downstream rule logic.\n *\n * @param node The call expression to inspect.\n * @returns True when the call expression targets `it`, `it.only`, or `it.skip`; otherwise false.\n *\n * @remarks\n * This helper only inspects the immediate callee shape and does not validate arguments.\n *\n * @example\n * ```tsx\n * const isTestCall = isItCall(callExpression);\n * ```\n */\nexport const isItCall = (node: TSESTree.CallExpression): boolean => {\n const callee = unwrapExpression(node.callee);\n\n if (ASTUtils.isIdentifier(callee)) {\n return callee.name === 'it';\n }\n\n if (callee.type !== 'MemberExpression' || !ASTUtils.isIdentifier(callee.object)) {\n return false;\n }\n\n return callee.object.name === 'it'\n && ASTUtils.isIdentifier(callee.property)\n && (callee.property.name === 'only' || callee.property.name === 'skip');\n};\n\n/**\n * Determines whether a callback node matches the expected `then` signature for mount hook utilities. It validates that\n * the node is a function expression with an object pattern parameter and that it exposes both `MockComponent` and\n * `values` bindings. It returns the original callback node when the signature is valid, otherwise it returns null.\n *\n * @param callback The AST node to validate as a `then` callback.\n * @returns The callback node when valid; otherwise null.\n *\n * @example\n * ```tsx\n * const validCallback = isThenCallbackValid(node);\n * ```\n */\n// eslint-disable-next-line promise/prefer-await-to-callbacks\nexport const isThenCallbackValid = (callback: TSESTree.Node | null | undefined) => {\n if (!callback) {\n return null;\n }\n\n if (callback.type !== 'ArrowFunctionExpression' && callback.type !== 'FunctionExpression') {\n return null;\n }\n\n const param = callback.params[0];\n\n if (param.type !== 'ObjectPattern') {\n return null;\n }\n\n const names = new Set(param.properties\n .filter(property => property.type === 'Property' && property.key.type === 'Identifier')\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n .map(property => (property as any).key.name as string));\n\n if (!names.has('MockComponent') || !names.has('values')) {\n return null;\n }\n\n return callback;\n};\n\n/**\n * Determines whether a call expression represents a Cypress `cy.get('@values')` call.\n * It unwraps the callee and validates that it is a member expression targeting the `get` property.\n * It also verifies that the call is made on `cy` and that the first argument is the literal `@values`.\n *\n * @param node The call expression to inspect for the `cy.get('@values')` pattern.\n * @returns True when the call expression matches the expected `cy.get('@values')` signature; otherwise false.\n *\n * @remarks\n * This helper only checks the first argument and does not validate additional arguments.\n *\n * @example\n * ```tsx\n * const isValuesGet = isValuesGetCall(callExpression);\n * ```\n */\nconst isValuesGetCall = (node: TSESTree.CallExpression): boolean => {\n const callee = unwrapExpression(node.callee);\n\n if (callee.type !== 'MemberExpression') {\n return false;\n }\n\n if (!ASTUtils.isIdentifier(callee.property) || callee.property.name !== 'get') {\n return false;\n }\n\n const object = unwrapExpression(callee.object);\n\n if (!ASTUtils.isIdentifier(object) || object.name !== 'cy') {\n return false;\n }\n\n const arg = node.arguments[0];\n\n return Boolean(arg.type === 'Literal' && arg.value === '@values');\n};\n\n/**\n * Determines whether a call expression represents a chained `cy.get('@values').its(...)` call. It unwraps the callee\n * and validates that the property is `its` before walking back through the call chain. It recurses through nested `its`\n * calls so chained access is handled consistently.\n *\n * @param node The call expression to inspect for a `values` `its` call chain.\n * @returns True when the call expression is an `its` call chained from a `cy.get('@values')` or another valid `its` call.\n *\n * @remarks\n * This helper only accepts call expressions and only evaluates member expression callees.\n *\n * @example\n * ```tsx\n * const isValuesIts = isValuesItsCall(callExpression);\n * ```\n */\nconst isValuesItsCall = (node: TSESTree.CallExpression): boolean => {\n const callee = unwrapExpression(node.callee);\n\n if (callee.type !== 'MemberExpression') {\n return false;\n }\n\n if (!ASTUtils.isIdentifier(callee.property) || callee.property.name !== 'its') {\n return false;\n }\n\n const object = unwrapExpression(callee.object);\n\n if (object.type !== 'CallExpression') {\n return false;\n }\n\n return isValuesGetCall(object) || isValuesItsCall(object);\n};\n\n/**\n * Determines whether a call expression chain includes an `its('current')` access tied to values retrieval. It walks\n * through member expression calls recursively to verify that `its('current')` appears on a valid `cy.get('@values')`\n * or chained `its` call. It returns false when the call shape does not match the expected Cypress chain pattern.\n *\n * @param node The call expression to inspect for a values current access chain.\n * @returns True when the chain contains `its('current')` from a valid values get or its call; otherwise false.\n *\n * @remarks\n * This helper only accepts call expressions and only evaluates member expression callees.\n *\n * @example\n * ```tsx\n * const hasCurrent = hasValuesCurrentInChain(callExpression);\n * ```\n */\nconst hasValuesCurrentInChain = (node: TSESTree.CallExpression): boolean => {\n const callee = unwrapExpression(node.callee);\n\n if (callee.type !== 'MemberExpression') {\n return false;\n }\n\n if (!ASTUtils.isIdentifier(callee.property) || callee.property.name !== 'its') {\n return false;\n }\n\n const arg = node.arguments[0];\n const isCurrent = Boolean(arg.type === 'Literal' && arg.value === 'current');\n const object = unwrapExpression(callee.object);\n\n if (object.type !== 'CallExpression') {\n return false;\n }\n\n if (isCurrent && (isValuesGetCall(object) || isValuesItsCall(object))) {\n return true;\n }\n\n return hasValuesCurrentInChain(object);\n};\n\n/**\n * Determines whether a call expression represents a Cypress `invoke` call chained from a values\n * `its('current')` lookup. It unwraps the callee and validates that the property name is `invoke` before checking the\n * call chain. It returns a boolean so callers can quickly detect the expected Cypress pattern without additional traversal.\n *\n * @param node The call expression to inspect for a values `invoke` chain.\n * @returns True when the call expression is an `invoke` call chained from a valid values current access; otherwise false.\n *\n * @remarks\n * This helper only inspects member expression callees and relies on `hasValuesCurrentInChain` for recursive chain validation.\n *\n * @example\n * ```tsx\n * const isInvoke = isValuesInvokeCall(callExpression);\n * ```\n */\nexport const isValuesInvokeCall = (node: TSESTree.CallExpression): boolean => {\n const callee = unwrapExpression(node.callee);\n\n if (callee.type !== 'MemberExpression') {\n return false;\n }\n\n if (!ASTUtils.isIdentifier(callee.property) || callee.property.name !== 'invoke') {\n return false;\n }\n\n const object = unwrapExpression(callee.object);\n\n return Boolean(object.type === 'CallExpression' && hasValuesCurrentInChain(object));\n};\n\n/**\n * Determines whether a callback body contains a values `invoke` call in its AST subtree. It walks the block statement\n * iteratively to avoid callback-based traversal while still visiting every descendant node. It returns true as soon as\n * a matching `cy.get('@values').its('current').invoke(...)` chain is detected.\n *\n * @param callback The function expression to inspect for a values invoke call chain.\n * @returns True when a values invoke call is found in the callback body; otherwise false.\n *\n * @example\n * ```tsx\n * const hasInvoke = hasValuesInvokeInCallback(callbackNode);\n * ```\n */\nexport const hasValuesInvokeInCallback = (\n // eslint-disable-next-line promise/prefer-await-to-callbacks\n callback: TSESTree.ArrowFunctionExpression | TSESTree.FunctionExpression\n): boolean => {\n if (callback.body.type !== 'BlockStatement') {\n return false;\n }\n\n let found = false;\n\n walk(callback.body, node => {\n if (found) {\n return;\n }\n\n if (node.type === 'CallExpression' && isValuesInvokeCall(node)) {\n found = true;\n }\n });\n\n return found;\n};\n\n/**\n * Analyzes the first `then` callback body for mount/wrap usage, assertions,\n * invalid statements, and invalid ordering between wrap and mount calls.\n *\n * @param callback The `then` callback function expression to inspect.\n * @returns An object describing whether the callback contains assertions, invalid statements, invalid ordering, and the presence of mount/wrap usage.\n */\n// eslint-disable-next-line promise/prefer-await-to-callbacks\nexport const checkFirstThenBody = (callback: TSESTree.ArrowFunctionExpression | TSESTree.FunctionExpression) => {\n const needs = {\n hasAssertion: false,\n hasInvalidOrder: false,\n hasInvalidStatement: false,\n hasMount: false,\n hasWrap: false\n };\n\n if (callback.body.type !== 'BlockStatement') {\n return needs;\n }\n\n const statements = callback.body.body;\n let wrapIndex = -1;\n let mountIndex = -1;\n\n for (let index = 0; index < statements.length; index += 1) {\n const statement = statements[index];\n\n if (!isAllowedFirstThenStatement(statement)) {\n needs.hasInvalidStatement = true;\n continue;\n }\n\n const expression = statement.type === 'ExpressionStatement' ? statement.expression : null;\n\n if (expression && hasWrapValues(expression)) {\n wrapIndex = index;\n }\n\n if (expression && hasMountWithMock(expression)) {\n mountIndex = index;\n }\n }\n\n if (wrapIndex !== -1 && mountIndex !== -1 && wrapIndex > mountIndex) {\n needs.hasInvalidOrder = true;\n }\n\n walk(callback.body, node => {\n if (hasMountWithMock(node)) {\n needs.hasMount = true;\n }\n\n if (hasWrapValues(node)) {\n needs.hasWrap = true;\n }\n\n if (hasAssertionCall(node)) {\n needs.hasAssertion = true;\n }\n });\n\n return needs;\n};","import {ESLintUtils} from '@typescript-eslint/utils';\n\nimport {\n checkFirstThenBody,\n checkHookArguments,\n getThenChain,\n hasValuesInvokeInCallback,\n isHookCall,\n isItCall,\n isMountHookCall,\n isThenCallbackValid,\n walk\n} from './utils/cypress-mount-hook-utils';\n\nimport type {TSESLint, TSESTree} from '@typescript-eslint/utils';\n\nconst createRule = ESLintUtils.RuleCreator(\n name => `https://github.com/nfqde/eslint-config-nfq/blob/master/docs/rules/${name}.md`\n);\n\ntype MessageIds = 'assertionInFirstThen' | 'invalidFirstThenStatement' | 'invalidHookArgument' | 'invalidThenOrder'\n | 'missingFirstThen' | 'missingHooksArgs' | 'missingMount' | 'missingSecondThen' | 'missingThenAfterInvoke'\n | 'missingThenDestructure' | 'missingThenWrap' | 'unwrappedHook';\n\nexport const cypressMountHook = createRule<[], MessageIds>({\n defaultOptions: [],\n meta: {\n docs: {description: 'Enforce mountHook/mountHooks usage and chaining patterns.'},\n messages: {\n assertionInFirstThen: 'Do not assert in the first then; mount and alias values there instead.',\n // eslint-disable-next-line @stylistic/max-len\n invalidFirstThenStatement: 'Only cy.wrap(values).as(\"values\") and cy.mount(<MockComponent />) are allowed in the first then.',\n invalidHookArgument: 'mountHook(s) must receive a hook function or an arrow that only calls a hook.',\n invalidThenOrder: 'Call cy.wrap(values).as(\"values\") before cy.mount(<MockComponent />).',\n // eslint-disable-next-line @stylistic/max-len\n missingFirstThen: 'mountHook(s) must be chained with a first then that destructures {MockComponent, values}.',\n missingHooksArgs: 'mountHooks must receive at least two hook arguments.',\n missingMount: 'First then must call cy.mount with <MockComponent />.',\n missingSecondThen: 'mountHook(s) must be chained with a second then for assertions.',\n missingThenAfterInvoke: 'Add another then after invoke to assert updated values.',\n missingThenDestructure: 'First then must destructure {MockComponent, values}.',\n missingThenWrap: 'First then must call cy.wrap(values).as(\"values\").',\n unwrappedHook: 'Hook invocations must be wrapped by mountHook(s).'\n },\n schema: [],\n type: 'suggestion'\n },\n name: 'cypress-mount-hook',\n /**\n * Creates the ESLint rule listener configuration for this rule. It inspects `it` blocks to find hook and mount\n * usage and reports violations of the rule’s chaining and argument requirements. It returns a listener map that\n * ESLint will invoke during traversal to perform these checks.\n *\n * @param context The ESLint rule context used for reporting and source inspection.\n * @returns The rule listener object that handles AST traversal.\n *\n * @example\n * ```tsx\n * const listeners = rule.create(context);\n * ```\n */\n create(context) {\n return {\n /**\n * Handles `CallExpression` nodes by validating `it` blocks for correct hook wrapping, mount usage, and then\n * chaining patterns. It walks the callback body to collect hook and mount calls, checks argument validity,\n * and reports rule violations with precise message identifiers. It also enforces the expected ordering and\n * presence of `then` callbacks to keep the mount flow consistent and safe.\n *\n * @param node The call expression node currently being visited by the ESLint traversal.\n *\n * @example\n * ```tsx\n * it('mounts hooks', () => {\n * mountHook(useMyHook).then(({MockComponent, values}) => {\n * cy.wrap(values).as('values');\n * cy.mount(<MockComponent />);\n * }).then(() => {\n * cy.get('@values').should('exist');\n * });\n * });\n * ```\n */\n // eslint-disable-next-line complexity\n CallExpression(node) {\n if (!isItCall(node)) {\n return;\n }\n\n const callback = node.arguments[1];\n\n if (callback.type !== 'ArrowFunctionExpression' && callback.type !== 'FunctionExpression') {\n return;\n }\n\n const {body} = callback;\n\n if (body.type !== 'BlockStatement') {\n return;\n }\n\n const hookCalls: TSESTree.CallExpression[] = [];\n const mountCalls: TSESTree.CallExpression[] = [];\n const allowedHookCalls = new Set<TSESTree.CallExpression>();\n\n walk(body, child => {\n if (child.type === 'CallExpression' && isHookCall(child)) {\n hookCalls.push(child);\n }\n\n if (child.type === 'CallExpression' && isMountHookCall(child)) {\n mountCalls.push(child);\n }\n });\n\n for (const mountCall of mountCalls) {\n const result = checkHookArguments(mountCall, {\n invalidHookArgument: 'invalidHookArgument',\n missingHooksArgs: 'missingHooksArgs'\n });\n const hasHookArgErrors = result.errors.length > 0;\n\n for (const error of result.errors) {\n context.report({\n messageId: error.messageId,\n node: error.node\n });\n }\n\n for (const hookCall of result.allowedHookCalls) {\n allowedHookCalls.add(hookCall);\n }\n\n const thens = getThenChain(mountCall);\n const firstThen = thens[0];\n\n // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition\n if (!firstThen) {\n context.report({\n messageId: 'missingFirstThen',\n node: mountCall\n });\n continue;\n }\n\n const validCallback = isThenCallbackValid(firstThen.arguments[0] as TSESTree.Node | undefined);\n\n if (!validCallback) {\n context.report({\n messageId: 'missingThenDestructure',\n node: firstThen\n });\n continue;\n }\n\n const {\n hasAssertion,\n hasInvalidOrder,\n hasInvalidStatement,\n hasMount,\n hasWrap\n } = checkFirstThenBody(validCallback);\n\n if (!hasWrap) {\n context.report({\n messageId: 'missingThenWrap',\n node: validCallback\n });\n }\n\n if (!hasMount) {\n context.report({\n messageId: 'missingMount',\n node: validCallback\n });\n }\n\n if (hasAssertion) {\n context.report({\n messageId: 'assertionInFirstThen',\n node: validCallback\n });\n }\n\n if (hasInvalidStatement) {\n context.report({\n messageId: 'invalidFirstThenStatement',\n node: validCallback\n });\n }\n\n if (hasInvalidOrder) {\n context.report({\n messageId: 'invalidThenOrder',\n node: validCallback\n });\n }\n\n const firstThenValid = hasWrap\n && hasMount\n && !hasAssertion\n && !hasInvalidStatement\n && !hasInvalidOrder;\n\n if (hasHookArgErrors || !firstThenValid) {\n continue;\n }\n\n const secondThen = thens[1];\n\n // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition\n if (!secondThen) {\n context.report({\n messageId: 'missingSecondThen',\n node: mountCall\n });\n continue;\n }\n\n const secondCallback = secondThen.arguments[0];\n\n if (\n secondCallback.type === 'ArrowFunctionExpression'\n || secondCallback.type === 'FunctionExpression'\n ) {\n if (hasValuesInvokeInCallback(secondCallback) && !thens[2]) {\n context.report({\n messageId: 'missingThenAfterInvoke',\n node: secondThen\n });\n }\n }\n }\n\n for (const hookCall of hookCalls) {\n if (!allowedHookCalls.has(hookCall)) {\n context.report({\n messageId: 'unwrappedHook',\n node: hookCall\n });\n }\n }\n }\n } satisfies TSESLint.RuleListener;\n }\n});","import path from 'path';\n\nimport {ASTUtils} from '@typescript-eslint/utils';\n\nimport type {TSESTree} from '@typescript-eslint/utils';\n\nexport type LayerType = 'api' | 'client-application-configs' | 'client-application-services'\n | 'client-application-usecases' | 'client-application-utils' | 'client-application' | 'client-domain'\n | 'client-shared' | 'client-ui' | 'server-configs' | 'server-controllers' | 'server-domain' | 'server-errors'\n | 'server-middleware' | 'server-services' | 'server-utils' | 'unknown';\n\n/**\n * Converts Windows-style backslashes to POSIX forward slashes in a path string. It ensures the returned path is\n * consistent for later normalization routines. It does not attempt to resolve or validate the path contents.\n *\n * @param value The path string that may contain backslashes.\n * @returns The path string with backslashes replaced by forward slashes.\n *\n * @remarks This is a simple string transformation helper.\n *\n * @example\n * ```tsx\n * const posixPath = toPosix('C:\\\\temp\\\\file.txt');\n * ```\n */\nexport const toPosix = (value: string) => value.replace(/\\\\/gu, '/');\n\n/**\n * Removes a Windows drive letter prefix from a path string. It is useful when normalizing paths across platforms.\n * It leaves non-drive paths unchanged.\n *\n * @param value The path string that may include a drive letter.\n * @returns The path string without a drive letter prefix.\n *\n * @remarks This keeps the remaining path intact.\n *\n * @example\n * ```tsx\n * const pathWithoutDrive = stripDrive('C:/temp/file.txt');\n * ```\n */\nexport const stripDrive = (value: string) => value.replace(/^[A-Za-z]:/u, '');\n\n/**\n * Normalizes a path to POSIX format and strips drive letters for consistency.\n * It also handles virtual path segments produced by certain tooling. It returns a stable, comparable path\n * string for layer detection.\n *\n * @param value The path string to normalize.\n * @returns The normalized path without drive letters and virtual prefixes.\n *\n * @remarks This function is intended for cross-platform path comparisons.\n *\n * @example\n * ```tsx\n * const normalized = normalizePath('C:\\\\proj\\\\__virtual__\\\\src\\\\index.ts');\n * ```\n */\nexport const normalizePath = (value: string) => {\n const normalized = path.posix.normalize(toPosix(value));\n const withoutDrive = stripDrive(normalized);\n\n if (withoutDrive.startsWith('/__virtual__/')) {\n return withoutDrive.replace('/__virtual__/', '/');\n }\n\n return withoutDrive;\n};\n\n/**\n * Ensures a path string ends with a trailing slash. It is used to simplify prefix comparisons.\n * It does not modify already-suffixed paths.\n *\n * @param value The path string that may need a trailing slash.\n * @returns The path string guaranteed to end with a trailing slash.\n *\n * @remarks This is a pure helper without side effects.\n *\n * @example\n * ```tsx\n * const withSlash = ensureTrailingSlash('/src/client');\n * ```\n */\nexport const ensureTrailingSlash = (value: string) => (\n value.endsWith('/') ? value : `${value}/`\n);\n\n/**\n * Builds a map of alias strings to normalized target paths. It skips invalid entries and ensures stored paths end\n * with a trailing slash. It returns a Map that can be used for import resolution.\n *\n * @param aliases The alias tuples to include in the map.\n * @returns A map of alias keys to normalized, trailing-slashed paths.\n *\n * @remarks Invalid alias pairs are ignored.\n *\n * @example\n * ```tsx\n * const aliasMap = buildAliasMap([['@app', './src']]);\n * ```\n */\nexport const buildAliasMap = (aliases: ([string, string])[]): Map<string, string> => {\n const map = new Map<string, string>();\n\n for (const [alias, aliasPath] of aliases) {\n if (!alias || !aliasPath) {\n continue;\n }\n\n map.set(alias, ensureTrailingSlash(normalizePath(aliasPath)));\n }\n\n return map;\n};\n\n/**\n * Reads alias mappings from the ESLint settings object. It safely navigates optional resolver settings and returns a\n * normalized list of alias tuples. It always returns an array, even when settings are missing.\n *\n * @param settings The ESLint settings object that may include import resolver configuration.\n * @returns The alias tuple list extracted from the resolver settings or an empty array.\n *\n * @remarks This helper only inspects the alias resolver configuration.\n *\n * @example\n * ```tsx\n * const aliases = readAliasesFromSettings({ 'import/resolver': { alias: { map: [['@app', './src']] } } });\n * ```\n */\nexport const readAliasesFromSettings = (settings: Record<string, unknown> | undefined): ([string, string])[] => {\n const resolver = settings?.['import/resolver'] as {alias?: {map?: ([string, string])[]}} | undefined;\n\n return resolver?.alias?.map ?? [];\n};\n\n/**\n * Resolves an import source using a prebuilt alias map. It checks for exact alias matches as well as alias-prefixed\n * paths. It returns the resolved path string or null when no alias applies.\n *\n * @param source The import source string to resolve.\n * @param aliasMap The map of alias keys to normalized target paths.\n * @returns The resolved path string if an alias matches, or null when no match is found.\n *\n * @remarks The alias map is expected to store trailing-slashed paths.\n *\n * @example\n * ```tsx\n * const resolved = resolveAliasImport('@app/utils', new Map([['@app', '/src/']]));\n * ```\n */\nexport const resolveAliasImport = (source: string, aliasMap: Map<string, string>) => {\n for (const [alias, aliasPath] of aliasMap.entries()) {\n if (source === alias) {\n return aliasPath;\n }\n\n if (source.startsWith(`${alias}/`)) {\n return aliasPath + source.slice(alias.length + 1);\n }\n }\n\n return null;\n};\n\n/**\n * Resolves a relative import to an absolute, normalized path. It only handles sources that start with a dot and\n * returns null for non-relative sources. It normalizes the file and joined path for consistent comparisons.\n *\n * @param source The import source string to resolve.\n * @param filename The file path that contains the import statement.\n * @returns The normalized resolved path or null when the source is not relative.\n *\n * @remarks This helper uses POSIX joins to keep results stable across platforms.\n *\n * @example\n * ```tsx\n * const resolved = resolveRelativeImport('./utils', '/src/client/index.ts');\n * ```\n */\nexport const resolveRelativeImport = (source: string, filename: string) => {\n if (!source.startsWith('.')) {\n return null;\n }\n\n const normalizedFile = normalizePath(filename);\n const dir = normalizedFile.split('/').slice(0, -1).join('/');\n\n return normalizePath(path.posix.join(dir, source));\n};\n\n/**\n * Determines the logical layer for a resolved file path based on known hexagonal folder patterns. It normalizes the\n * input path and performs ordered checks to match specific client, server, or API directories. It returns a stable\n * layer identifier so callers can apply dependency direction rules consistently.\n *\n * @param resolvedPath The resolved file path to analyze.\n * @returns The detected layer identifier or `unknown` when no match is found.\n *\n * @remarks The checks are order-dependent, so more specific paths are evaluated first.\n *\n * @example\n * ```tsx\n * const layer = getLayer('/src/server/services/user.ts');\n * ```\n */\nexport const getLayer = (resolvedPath: string): LayerType => {\n const pathValue = ensureTrailingSlash(normalizePath(resolvedPath));\n const pathWithSlash = pathValue.startsWith('/') ? pathValue : `/${pathValue}`;\n\n /**\n * Determines whether a given value is contained in either the raw path or the\n * normalized path with a trailing slash.\n *\n * @param value The substring to search for in the path variants.\n * @returns `true` if the value exists in either path representation; otherwise `false`.\n */\n const contains = (value: string) => pathValue.includes(value) || pathWithSlash.includes(value);\n\n if (contains('/src/pages/api/')) {\n return 'api';\n }\n\n if (contains('/src/client/application/configs/')) {\n return 'client-application-configs';\n }\n\n if (contains('/src/client/application/useCases/')) {\n return 'client-application-usecases';\n }\n\n if (contains('/src/client/application/services/')) {\n return 'client-application-services';\n }\n\n if (contains('/src/client/application/utils/')) {\n return 'client-application-utils';\n }\n\n if (contains('/src/client/application/')) {\n return 'client-application';\n }\n\n if (contains('/src/client/domain/')) {\n return 'client-domain';\n }\n\n if (contains('/src/client/shared/')) {\n return 'client-shared';\n }\n\n if (contains('/src/client/ui/')) {\n return 'client-ui';\n }\n\n if (contains('/src/server/configs/')) {\n return 'server-configs';\n }\n\n if (contains('/src/server/controllers/')) {\n return 'server-controllers';\n }\n\n if (contains('/src/server/domain/')) {\n return 'server-domain';\n }\n\n if (contains('/src/server/errors/')) {\n return 'server-errors';\n }\n\n if (contains('/src/server/middleware/')) {\n return 'server-middleware';\n }\n\n if (contains('/src/server/services/')) {\n return 'server-services';\n }\n\n if (contains('/src/server/utils/')) {\n return 'server-utils';\n }\n\n return 'unknown';\n};\n\n/**\n * Determines whether a layer identifier represents any client-facing layer. It relies on the `client-` prefix\n * convention used across the layer taxonomy. It returns a boolean that can be used to branch dependency rules.\n *\n * @param layer The layer identifier to evaluate.\n * @returns True when the layer starts with the client prefix; otherwise false.\n *\n * @remarks This helper performs a simple prefix check.\n *\n * @example\n * ```tsx\n * const isClient = isClientLayer('client-ui');\n * ```\n */\nexport const isClientLayer = (layer: LayerType) => layer.startsWith('client-');\n\n/**\n * Determines whether a layer identifier represents any server-facing layer. It relies on the `server-` prefix\n * convention used across the layer taxonomy. It returns a boolean that can be used to branch dependency rules.\n *\n * @param layer The layer identifier to evaluate.\n * @returns True when the layer starts with the server prefix; otherwise false.\n *\n * @remarks This helper performs a simple prefix check.\n *\n * @example\n * ```tsx\n * const isServer = isServerLayer('server-services');\n * ```\n */\nexport const isServerLayer = (layer: LayerType) => layer.startsWith('server-');\n\n/**\n * Determines whether a layer identifier represents a domain layer on either client or server. It checks for the\n * exact domain layer names defined in the layer taxonomy. It returns a boolean that can be used to enforce\n * domain-centric dependency rules.\n *\n * @param layer The layer identifier to evaluate.\n * @returns True when the layer is a client or server domain layer; otherwise false.\n *\n * @remarks This helper uses exact equality checks.\n *\n * @example\n * ```tsx\n * const isDomain = isDomainLayer('server-domain');\n * ```\n */\nexport const isDomainLayer = (layer: LayerType) => layer === 'client-domain' || layer === 'server-domain';\n\n/**\n * Determines whether a layer identifier represents the client application utilities layer. It compares the input\n * to the exact client utilities layer name. It returns a boolean suitable for applying utility-specific rules.\n *\n * @param layer The layer identifier to evaluate.\n * @returns True when the layer is the client application utilities layer; otherwise false.\n *\n * @remarks This helper uses an exact match.\n *\n * @example\n * ```tsx\n * const isUtils = isClientUtils('client-application-utils');\n * ```\n */\nexport const isClientUtils = (layer: LayerType) => layer === 'client-application-utils';\n\n/**\n * Determines whether a layer identifier represents the server utilities layer. It compares the input to the exact\n * server utilities layer name. It returns a boolean suitable for applying utility-specific rules.\n *\n * @param layer The layer identifier to evaluate.\n * @returns True when the layer is the server utilities layer; otherwise false.\n *\n * @remarks This helper uses an exact match.\n *\n * @example\n * ```tsx\n * const isUtils = isServerUtils('server-utils');\n * ```\n */\nexport const isServerUtils = (layer: LayerType) => layer === 'server-utils';\n\n/**\n * Determines whether a layer identifier represents a configuration layer. It checks for both client application\n * configs and server configs as defined by the layer taxonomy. It returns a boolean useful for config-specific\n * dependency direction checks.\n *\n * @param layer The layer identifier to evaluate.\n * @returns True when the layer is a client application configs or server configs layer; otherwise false.\n *\n * @remarks This helper uses exact equality checks.\n *\n * @example\n * ```tsx\n * const isConfig = isConfigLayer('server-configs');\n * ```\n */\nexport const isConfigLayer = (layer: LayerType) => layer === 'client-application-configs' || layer === 'server-configs';\n\n/**\n * Determines whether a program uses MobX makeAutoObservable in imports and call sites. It scans for the MobX import\n * specifier and then traverses the AST to detect usages of the identifier. It returns true only when both the import\n * and at least one invocation exist in the same program.\n *\n * @param program The TypeScript ESTree program to analyze.\n * @returns True when makeAutoObservable is imported from MobX and invoked in the program.\n *\n * @remarks This helper performs a shallow import scan and a full AST traversal.\n *\n * @example\n * ```tsx\n * const usesMobx = isMobxStoreFile(program);\n * ```\n */\n// eslint-disable-next-line complexity\nexport const isMobxStoreFile = (program: TSESTree.Program) => {\n let hasMakeAutoObservable = false;\n let usesMakeAutoObservable = false;\n\n for (const statement of program.body) {\n if (statement.type === 'ImportDeclaration' && statement.source.value === 'mobx') {\n for (const specifier of statement.specifiers) {\n if (\n specifier.type === 'ImportSpecifier'\n && specifier.imported.type === 'Identifier'\n && specifier.imported.name === 'makeAutoObservable'\n ) {\n hasMakeAutoObservable = true;\n }\n }\n }\n }\n\n const stack: TSESTree.Node[] = Array.from(program.body);\n\n while (stack.length) {\n const node = stack.pop()!;\n\n if (node.type === 'CallExpression' && ASTUtils.isIdentifier(node.callee)) {\n if (node.callee.name === 'makeAutoObservable') {\n usesMakeAutoObservable = true;\n }\n }\n\n for (const key of Object.keys(node) as (keyof TSESTree.Node)[]) {\n if (key === 'parent') {\n continue;\n }\n\n const value = node[key];\n\n // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition\n if (!value || typeof value !== 'object') {\n continue;\n }\n\n if (Array.isArray(value)) {\n for (const child of value) {\n if (child && typeof child === 'object' && 'type' in child) {\n stack.push(child as TSESTree.Node);\n }\n }\n } else if ('type' in value) {\n stack.push(value as unknown as TSESTree.Node);\n }\n }\n }\n\n return hasMakeAutoObservable && usesMakeAutoObservable;\n};","import {ESLintUtils} from '@typescript-eslint/utils';\n\nimport {\n buildAliasMap,\n getLayer,\n isClientLayer,\n isClientUtils,\n isConfigLayer,\n isDomainLayer,\n isMobxStoreFile,\n isServerLayer,\n isServerUtils,\n normalizePath,\n readAliasesFromSettings,\n resolveAliasImport,\n resolveRelativeImport\n} from './utils/hexagonal-dependency-direction-utils';\n\nimport type {TSESLint, TSESTree} from '@typescript-eslint/utils';\n\nconst createRule = ESLintUtils.RuleCreator(\n name => `https://github.com/nfqde/eslint-config-nfq/blob/master/docs/rules/${name}.md`\n);\n\ntype RuleOptions = [];\n\ntype MessageIds = 'apiImport' | 'clientApiImport' | 'crossBoundary' | 'domainImport' | 'domainUtilsImport'\n | 'missingServiceClass' | 'missingServiceImplements' | 'serverDirection' | 'uiApplicationImport';\n\nconst requiredAliases = [\n 'Domain',\n 'Application',\n 'UI',\n 'ApiRoutes',\n 'Controllers',\n 'ServerDomain',\n 'Services'\n];\n\nexport const hexagonalDependencyDirection = createRule<RuleOptions, MessageIds>({\n defaultOptions: [],\n meta: {\n docs: {description: 'Enforce hexagonal dependency direction and boundary imports.'},\n messages: {\n apiImport: 'API routes may only import controllers, middleware, or server utils.',\n clientApiImport: 'Only client application services may import API routes.',\n crossBoundary: 'Client and server layers must not import from each other.',\n domainImport: 'Domain layers must not import from other layers.',\n domainUtilsImport: 'Domain layers must not import from utils.',\n missingServiceClass: 'Client services must export a class implementing an adapter interface.',\n missingServiceImplements: 'Client services classes must implement an adapter interface.',\n serverDirection: 'Server dependency direction is domain → errors → services → controllers.',\n // eslint-disable-next-line @stylistic/max-len\n uiApplicationImport: 'UI may only import from application/useCases, application/configs, or application/utils.'\n },\n schema: [],\n type: 'problem'\n },\n name: 'hexagonal-dependency-direction',\n /**\n * This function creates the ESLint rule listeners for validating hexagonal dependency direction.\n * It initializes alias resolution, determines the current file layer, and wires up import checks.\n * It also validates service class exports and adapter implementations for client services.\n *\n * @param context The rule context used for reporting and settings.\n * @returns A rule listener map for import declarations and program validation.\n *\n * @example\n * ```tsx\n * const rule = hexagonalDependencyDirection.create(context);\n * ```\n */\n // eslint-disable-next-line max-lines-per-function\n create(context) {\n const aliases = readAliasesFromSettings(context.settings);\n const aliasMap = buildAliasMap(aliases);\n\n const missing = requiredAliases.filter(alias => !aliasMap.has(alias));\n\n if (missing.length > 0) {\n return {};\n }\n\n const {filename} = context;\n const normalizedFile = normalizePath(filename);\n const currentLayer = getLayer(normalizedFile);\n\n if (currentLayer === 'unknown') {\n return {};\n }\n\n const isClient = isClientLayer(currentLayer);\n const isServer = isServerLayer(currentLayer);\n\n /**\n * This function validates that client application services export at least one class and that the class\n * implements an adapter interface. It scans the program body for class declarations and named exports\n * containing classes. It reports rule violations when no class is found or when a class lacks implemented\n * interfaces.\n *\n * @param program The program node to analyze for service class exports.\n *\n * @example\n * ```tsx\n * reportInvalidService(program);\n * ```\n */\n const reportInvalidService = (program: TSESTree.Program) => {\n if (currentLayer !== 'client-application-services') {\n return;\n }\n\n if (isMobxStoreFile(program)) {\n return;\n }\n\n const classes: (TSESTree.ClassDeclaration | TSESTree.ClassExpression)[] = [];\n\n for (const node of program.body) {\n // @ts-expect-error\n if (node.type === 'ClassDeclaration' || node.type === 'ClassExpression') {\n classes.push(node);\n continue;\n }\n\n if (node.type === 'ExportNamedDeclaration' && node.declaration) {\n const {declaration} = node;\n\n // @ts-expect-error\n if (declaration.type === 'ClassDeclaration' || declaration.type === 'ClassExpression') {\n classes.push(declaration);\n }\n }\n }\n\n if (classes.length === 0) {\n context.report({\n messageId: 'missingServiceClass',\n node: program\n });\n\n return;\n }\n\n for (const classNode of classes) {\n if (classNode.implements.length === 0) {\n context.report({\n messageId: 'missingServiceImplements',\n node: classNode\n });\n }\n }\n };\n\n /**\n * Resolves an import source to a normalized path using aliases and relative paths. It first attempts to match\n * the source against configured aliases to ensure project-wide consistency. If no alias applies, it falls back\n * to resolving a relative import against the current file for local references.\n *\n * @param source The raw import source string from the import declaration.\n * @returns The resolved path string when resolution succeeds, or undefined when it cannot be resolved.\n *\n * @example\n * ```tsx\n * const resolved = resolveImport('@app/domain');\n * ```\n */\n const resolveImport = (source: string) => {\n const aliasResolved = resolveAliasImport(source, aliasMap);\n\n if (aliasResolved) {\n return aliasResolved;\n }\n\n return resolveRelativeImport(source, filename);\n };\n\n /**\n * Validates an import declaration against the hexagonal dependency rules for the current file.\n * It resolves the import source into a target layer and checks for forbidden cross-boundary or layer-specific dependencies.\n * It reports violations using the configured ESLint messages when a rule is broken.\n *\n * @param node The import declaration node to validate.\n *\n * @example\n * ```tsx\n * checkImport(node);\n * ```\n */\n // eslint-disable-next-line complexity\n const checkImport = (node: TSESTree.ImportDeclaration) => {\n const source = node.source.value;\n\n if (typeof source !== 'string') {\n return;\n }\n\n const resolved = resolveImport(source);\n\n if (!resolved) {\n return;\n }\n\n const targetLayer = getLayer(resolved);\n\n if (targetLayer === 'unknown') {\n return;\n }\n\n if (isClient && isServerLayer(targetLayer)) {\n context.report({\n messageId: 'crossBoundary',\n node\n });\n\n return;\n }\n\n if (isServer && isClientLayer(targetLayer)) {\n context.report({\n messageId: 'crossBoundary',\n node\n });\n\n return;\n }\n\n if (currentLayer === 'api') {\n const allowed = targetLayer === 'server-controllers'\n || targetLayer === 'server-middleware'\n || targetLayer === 'server-utils';\n\n if (!allowed) {\n context.report({\n messageId: 'apiImport',\n node\n });\n }\n\n return;\n }\n\n if (targetLayer === 'api' && currentLayer !== 'client-application-services') {\n context.report({\n messageId: 'clientApiImport',\n node\n });\n\n return;\n }\n\n if (isDomainLayer(currentLayer)) {\n if (targetLayer === 'client-shared' || targetLayer === 'server-configs') {\n return;\n }\n\n if (isConfigLayer(targetLayer)) {\n return;\n }\n\n if (isClientUtils(targetLayer) || isServerUtils(targetLayer)) {\n context.report({\n messageId: 'domainUtilsImport',\n node\n });\n\n return;\n }\n\n if (targetLayer !== currentLayer) {\n context.report({\n messageId: 'domainImport',\n node\n });\n }\n\n return;\n }\n\n if (currentLayer === 'client-application' || currentLayer === 'client-application-configs'\n || currentLayer === 'client-application-services'\n || currentLayer === 'client-application-usecases'\n || currentLayer === 'client-application-utils') {\n if (targetLayer === 'client-ui') {\n context.report({\n messageId: 'crossBoundary',\n node\n });\n }\n\n return;\n }\n\n if (currentLayer === 'client-ui') {\n const allowed = targetLayer === 'client-ui'\n || targetLayer === 'client-shared'\n || targetLayer === 'client-application-configs'\n || targetLayer === 'client-application-usecases'\n || targetLayer === 'client-application-utils';\n\n if (!allowed) {\n context.report({\n messageId: 'uiApplicationImport',\n node\n });\n }\n\n return;\n }\n\n if (currentLayer === 'server-errors') {\n const allowed = targetLayer === 'server-errors'\n || targetLayer === 'server-domain'\n || targetLayer === 'server-configs';\n\n if (!allowed) {\n context.report({\n messageId: 'serverDirection',\n node\n });\n }\n\n return;\n }\n\n if (currentLayer === 'server-services') {\n const allowed = targetLayer === 'server-services'\n || targetLayer === 'server-domain'\n || targetLayer === 'server-errors'\n || targetLayer === 'server-utils'\n || targetLayer === 'server-configs';\n\n if (!allowed) {\n context.report({\n messageId: 'serverDirection',\n node\n });\n }\n\n return;\n }\n\n if (currentLayer === 'server-controllers') {\n const allowed = targetLayer === 'server-controllers'\n || targetLayer === 'server-domain'\n || targetLayer === 'server-errors'\n || targetLayer === 'server-services'\n || targetLayer === 'server-utils'\n || targetLayer === 'server-middleware'\n || targetLayer === 'server-configs';\n\n if (!allowed) {\n context.report({\n messageId: 'serverDirection',\n node\n });\n }\n }\n };\n\n return {\n ImportDeclaration: checkImport,\n /**\n * Inspects constructor method definitions to detect assignments where a class method\n * is bound to `this` via `.bind(this)`, and reports such bindings for further handling.\n * This listener is triggered for the entire program to validate service class exports and adapter implementations\n * for client application services. It ensures that the hexagonal architecture rules are enforced at the program level.\n *\n * @param program The program node to analyze for service class export and implementation validation.\n */\n Program(program) {\n reportInvalidService(program);\n }\n } satisfies TSESLint.RuleListener;\n }\n});","import {ESLintUtils} from '@typescript-eslint/utils';\n\nimport type {TSESLint, TSESTree} from '@typescript-eslint/utils';\n\nconst createRule = ESLintUtils.RuleCreator(\n name => `https://github.com/nfqde/eslint-config-nfq/blob/master/docs/rules/${name}.md`\n);\n\nexport const noEmptyLinesInObjects = createRule({\n defaultOptions: [],\n meta: {\n docs: {description: 'Disallow empty lines inside object literals'},\n fixable: 'whitespace',\n messages: {noEmptyLine: 'Empty lines inside object literals are not allowed.'},\n schema: [],\n type: 'layout'\n },\n name: 'no-empty-lines-in-objects',\n /**\n * Creates the ESLint rule implementation that checks for empty lines in object literals.\n * This function sets up the rule's core logic by defining helper functions for gap detection\n * and block member validation, then returns listener functions that process AST nodes.\n *\n * @param context The ESLint rule context containing source code and reporting utilities.\n * @returns An object containing AST node listeners for rule enforcement.\n *\n * @example\n * ```tsx\n * const rule = createRule({\n * create(context) {\n * // Rule implementation\n * }\n * });\n * ```\n */\n create(context) {\n const {sourceCode} = context;\n\n type TokenLike = TSESTree.Comment | TSESTree.Node | TSESTree.Token;\n type ListenerNode = TSESTree.Node;\n\n /**\n * Reports gaps containing empty lines between two tokens in an object structure.\n * This function analyzes the whitespace between tokens and reports violations when\n * multiple consecutive newlines are found, providing automatic fixes when possible.\n *\n * @param node The AST node associated with the gap being checked.\n * @param startToken The starting token of the gap to check.\n * @param endToken The ending token of the gap to check.\n *\n * @example\n * ```tsx\n * reportGap(objectNode, leftBrace, firstProperty);\n * ```\n */\n const reportGap = (node: TSESTree.Node, startToken: TokenLike, endToken: TokenLike): void => {\n const startIndex = startToken.range[1];\n const endLineStartIndex = sourceCode.getIndexFromLoc({\n column: 0,\n line: endToken.loc.start.line\n });\n const gapText = sourceCode.text.slice(startIndex, endLineStartIndex);\n\n if (gapText.includes('\\n\\n')) {\n const indent = sourceCode.text.slice(endLineStartIndex, endToken.range[0]);\n const sourceText = sourceCode.text;\n let scanIndex = endLineStartIndex - 1;\n\n while (scanIndex >= startIndex && (/\\s/u).test(sourceText[scanIndex])) {\n scanIndex -= 1;\n }\n\n const fixStartIndex = Math.max(startIndex, scanIndex + 1);\n\n context.report({\n fix: fixer => fixer.replaceTextRange([fixStartIndex, endToken.range[0]], `\\n${indent}`),\n loc: endToken.loc,\n messageId: 'noEmptyLine',\n node\n });\n }\n };\n\n /**\n * Checks block-style structures for empty lines between their opening brace, members, and closing brace.\n * This function iterates through all members of a block structure and validates spacing\n * between the opening brace and first member, between consecutive members, and between the last member and closing brace.\n *\n * @param node The parent AST node containing the block structure.\n * @param members An array of member nodes within the block structure.\n *\n * @example\n * ```tsx\n * checkBlockMembers(objectNode, objectNode.properties);\n * ```\n */\n const checkBlockMembers = (node: TSESTree.Node, members: TSESTree.Node[] | undefined): void => {\n const leftBrace = sourceCode.getFirstToken(node);\n const rightBrace = sourceCode.getLastToken(node);\n\n if (!leftBrace || !rightBrace) {\n return;\n }\n\n const memberItems: {end: TSESTree.Token; start: TSESTree.Token}[] = [];\n\n for (const member of members ?? []) {\n const memberTokens = sourceCode.getTokens(member);\n\n if (memberTokens.length === 0) {\n continue;\n }\n\n memberItems.push({\n end: memberTokens[memberTokens.length - 1],\n start: memberTokens[0]\n });\n }\n const memberRanges = memberItems.map(item => ({\n end: item.end.range[1],\n start: item.start.range[0]\n }));\n const commentItems = sourceCode\n .getTokensBetween(leftBrace, rightBrace, {includeComments: true})\n .filter(token => token.type === 'Block' || token.type === 'Line')\n .filter(comment => !memberRanges\n .some(range => comment.range[0] >= range.start && comment.range[1] <= range.end))\n .map(comment => ({\n end: comment,\n start: comment\n }));\n const items = [...memberItems, ...commentItems]\n .sort((a, b) => a.start.range[0] - b.start.range[0]);\n\n if (items.length === 0) {\n return;\n }\n\n reportGap(node, leftBrace, items[0].start);\n\n for (let i = 1; i < items.length; i += 1) {\n reportGap(node, items[i - 1].end, items[i].start);\n }\n\n reportGap(node, items[items.length - 1].end, rightBrace);\n };\n\n const listeners: TSESLint.RuleListener = {\n /**\n * Handles ObjectExpression nodes to check for empty lines within object literals.\n * This listener function validates that object expressions follow the no-empty-lines rule\n * by examining spacing between properties and braces within the object structure.\n *\n * @param node The ObjectExpression AST node to validate.\n *\n * @example\n * ```tsx\n * // This would trigger the rule:\n * const obj = {\n * prop1: 'value',\n *\n * prop2: 'value'\n * };\n * ```\n */\n ObjectExpression(node: ListenerNode) {\n if (node.type !== 'ObjectExpression') {\n return;\n }\n const objectNode = node;\n\n checkBlockMembers(objectNode, objectNode.properties as TSESTree.Node[]);\n }\n };\n\n return listeners;\n }\n});","import {ESLintUtils} from '@typescript-eslint/utils';\n\nimport type {TSESLint, TSESTree} from '@typescript-eslint/utils';\n\nconst createRule = ESLintUtils.RuleCreator(\n name => `https://github.com/nfqde/eslint-config-nfq/blob/master/docs/rules/${name}.md`\n);\n\nexport const noEmptyLinesInTypes = createRule({\n defaultOptions: [],\n meta: {\n docs: {description: 'Disallow empty lines inside TypeScript interface and type literal bodies'},\n fixable: 'whitespace',\n messages: {noEmptyLine: 'Empty lines inside type bodies are not allowed.'},\n schema: [],\n type: 'layout'\n },\n name: 'no-empty-lines-in-types',\n /**\n * Creates an ESLint rule implementation that checks for empty lines in TypeScript type definitions.\n * This function returns a rule listener object that validates TypeScript interface bodies and type literals to ensure they don't contain unnecessary empty lines.\n * The rule helps maintain consistent formatting by preventing blank lines after opening braces, between members, and before closing braces.\n *\n * @param context The ESLint rule context containing source code and reporting utilities.\n * @returns An object containing event listeners for AST node types that need to be checked.\n *\n * @example\n * ```tsx\n * // This would trigger the rule (has empty line):\n * interface User {\n *\n * name: string;\n * }\n *\n * // This is correct (no empty lines):\n * interface User {\n * name: string;\n * }\n * ```\n */\n create(context) {\n const {sourceCode} = context;\n\n type TokenLike = TSESTree.Comment | TSESTree.Node | TSESTree.Token;\n type ListenerNode = TSESTree.Node;\n\n /**\n * Reports and fixes empty line gaps between tokens in TypeScript type definitions.\n * This function analyzes the text between two tokens to detect multiple consecutive newlines and reports them as violations.\n * It also provides an automatic fix by removing the extra empty lines while preserving proper indentation.\n *\n * @param node The AST node where the violation occurs.\n * @param startToken The token that marks the beginning of the gap to check.\n * @param endToken The token that marks the end of the gap to check.\n */\n const reportGap = (node: TSESTree.Node, startToken: TokenLike, endToken: TokenLike): void => {\n const startIndex = startToken.range[1];\n const endLineStartIndex = sourceCode.getIndexFromLoc({\n column: 0,\n line: endToken.loc.start.line\n });\n const gapText = sourceCode.text.slice(startIndex, endLineStartIndex);\n\n if (gapText.includes('\\n\\n')) {\n const indent = sourceCode.text.slice(endLineStartIndex, endToken.range[0]);\n const sourceText = sourceCode.text;\n let scanIndex = endLineStartIndex - 1;\n\n while (scanIndex >= startIndex && (/\\s/u).test(sourceText[scanIndex])) {\n scanIndex -= 1;\n }\n\n const fixStartIndex = Math.max(startIndex, scanIndex + 1);\n\n context.report({\n fix: fixer => fixer.replaceTextRange([fixStartIndex, endToken.range[0]], `\\n${indent}`),\n loc: endToken.loc,\n messageId: 'noEmptyLine',\n node\n });\n }\n };\n\n /**\n * Checks all members within a TypeScript interface or type literal block for empty line violations.\n * This function iterates through the members of a type definition and validates that there are no empty lines after the opening brace, between members, or before the closing brace.\n * It uses the reportGap function to identify and report any violations found in the spacing between type members.\n *\n * @param node The AST node representing the interface or type literal.\n * @param members An array of type elements (properties, methods, etc.) within the type definition.\n */\n const checkBlockMembers = (node: TSESTree.Node, members: TSESTree.TypeElement[]): void => {\n const leftBrace = sourceCode.getFirstToken(node);\n const rightBrace = sourceCode.getLastToken(node);\n\n if (!leftBrace || !rightBrace) {\n return;\n }\n\n const memberItems: {end: TSESTree.Token; start: TSESTree.Token}[] = [];\n\n for (const member of members) {\n const memberTokens = sourceCode.getTokens(member);\n\n if (memberTokens.length === 0) {\n continue;\n }\n\n memberItems.push({\n end: memberTokens[memberTokens.length - 1],\n start: memberTokens[0]\n });\n }\n const memberRanges = memberItems.map(item => ({\n end: item.end.range[1],\n start: item.start.range[0]\n }));\n const commentItems = sourceCode\n .getTokensBetween(leftBrace, rightBrace, {includeComments: true})\n .filter(token => token.type === 'Block' || token.type === 'Line')\n .filter(comment => !memberRanges\n .some(range => comment.range[0] >= range.start && comment.range[1] <= range.end))\n .map(comment => ({\n end: comment,\n start: comment\n }));\n const items = [...memberItems, ...commentItems]\n .sort((a, b) => a.start.range[0] - b.start.range[0]);\n\n if (items.length === 0) {\n return;\n }\n\n reportGap(node, leftBrace, items[0].start);\n\n for (let i = 1; i < items.length; i += 1) {\n reportGap(node, items[i - 1].end, items[i].start);\n }\n\n reportGap(node, items[items.length - 1].end, rightBrace);\n };\n\n const listeners: TSESLint.RuleListener = {\n /**\n * Handles TypeScript interface body nodes to check for empty line violations.\n * This listener function is called whenever the ESLint parser encounters a TSInterfaceBody node during traversal.\n * It validates that the node type is correct and then delegates to checkBlockMembers to perform the actual empty line checking.\n *\n * @param node The AST node representing a TypeScript interface body.\n */\n TSInterfaceBody(node: ListenerNode) {\n if ((node).type !== 'TSInterfaceBody') {\n return;\n }\n const interfaceNode = node;\n\n checkBlockMembers(interfaceNode, interfaceNode.body);\n },\n /**\n * Handles TypeScript type literal nodes to check for empty line violations.\n * This listener function is called whenever the ESLint parser encounters a TSTypeLiteral node during traversal.\n * It validates that the node type is correct and then delegates to checkBlockMembers to perform the actual empty line checking.\n *\n * @param node The AST node representing a TypeScript type literal.\n */\n TSTypeLiteral(node: ListenerNode) {\n if ((node).type !== 'TSTypeLiteral') {\n return;\n }\n const typeLiteralNode = node;\n\n checkBlockMembers(typeLiteralNode, typeLiteralNode.members);\n }\n };\n\n return listeners;\n }\n});","import {ASTUtils} from '@typescript-eslint/utils';\n\nimport type {TSESTree} from '@typescript-eslint/utils';\n\nexport type AstNode = TSESTree.Node | null | undefined;\n\n/**\n * Extracts the static property name from an AST node if it can be determined statically.\n * This function handles Property, MethodDefinition, and MemberExpression nodes and attempts\n * to resolve their property names to string values when possible at compile time.\n *\n * @param node The AST node to extract the property name from.\n * @returns The static property name as a string, or null if it cannot be determined statically.\n *\n * @example\n * ```tsx\n * // For obj.prop\n * const memberExpr = // ... MemberExpression node\n * const propName = getStaticPropertyName(memberExpr); // Returns \"prop\"\n *\n * // For { key: value }\n * const property = // ... Property node\n * const keyName = getStaticPropertyName(property); // Returns \"key\"\n * ```\n */\nexport const getStaticPropertyName = (node: AstNode): string | null => {\n let prop: TSESTree.Node | null = null;\n\n switch (node?.type) {\n case 'Property':\n case 'MethodDefinition':\n prop = node.key;\n break;\n case 'MemberExpression':\n prop = node.property;\n break;\n default:\n return null;\n }\n\n // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition\n if (!prop) {\n return null;\n }\n\n switch (prop.type) {\n case 'Literal':\n return String(prop.value);\n case 'TemplateLiteral':\n if (prop.expressions.length === 0 && prop.quasis.length === 1) {\n // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition\n return prop.quasis[0].value.cooked ?? null;\n }\n break;\n case 'Identifier': {\n const isComputed = 'computed' in node && node.computed;\n\n if (!isComputed) {\n return prop.name;\n }\n break;\n }\n default:\n break;\n }\n\n return null;\n};\n\n/**\n * Checks whether the actual text matches the expected pattern or string value.\n * This utility function provides a unified way to test strings against both literal string values and regular expressions.\n * It returns true if the actual string equals the expected string (when expected is a string) or matches the pattern (when expected is a RegExp).\n *\n * @param actual The actual string value to be tested against the expected pattern or value.\n * @param expected The expected pattern (RegExp) or literal string value to match against the actual string.\n * @returns True if the actual string matches the expected value or pattern, false otherwise.\n *\n * @example\n * ```tsx\n * // String comparison\n * const result1 = checkText(\"hello\", \"hello\"); // Returns true\n * const result2 = checkText(\"hello\", \"world\"); // Returns false\n *\n * // RegExp comparison\n * const pattern = /^test/;\n * const result3 = checkText(\"testing\", pattern); // Returns true\n * const result4 = checkText(\"example\", pattern); // Returns false\n * ```\n */\nexport const checkText = (actual: string, expected: RegExp | string): boolean => (\n typeof expected === 'string' ? actual === expected : expected.test(actual)\n);\n\n/**\n * Skips a ChainExpression node and returns its inner expression.\n * When encountering optional chaining expressions (e.g., `obj?.prop`), this utility\n * unwraps the ChainExpression wrapper to access the underlying expression node.\n *\n * @param node The AST node to potentially unwrap.\n * @returns The inner expression if the node is a ChainExpression, otherwise the original node.\n *\n * @example\n * ```typescript\n * // For optional chaining: obj?.prop\n * const chainNode = // ... ChainExpression node\n * const innerNode = skipChainExpression(chainNode); // Returns the MemberExpression\n * ```\n */\nexport const skipChainExpression = (node: AstNode): AstNode => (\n node?.type === 'ChainExpression' ? node.expression : node\n);\n\n/**\n * Checks whether the provided AST node represents a numeric literal value.\n * This function performs type narrowing to determine if a node is a Literal with a numeric value,\n * including both regular numbers and BigInt values. It serves as a type guard that helps with\n * type safety when working with numeric literals in AST processing.\n *\n * @param node The AST node to check for numeric literal properties.\n * @returns True if the node is a numeric Literal (number or BigInt), false otherwise.\n *\n * @example\n * ```tsx\n * // For numeric literal: 42\n * const numberNode = // ... Literal node with value 42\n * const isNumeric = isNumericLiteral(numberNode); // Returns true\n *\n * // For BigInt literal: 123n\n * const bigintNode = // ... Literal node with BigInt value\n * const isBigInt = isNumericLiteral(bigintNode); // Returns true\n *\n * // For string literal: \"hello\"\n * const stringNode = // ... Literal node with string value\n * const isString = isNumericLiteral(stringNode); // Returns false\n * ```\n */\nexport const isNumericLiteral = (node: AstNode): node is TSESTree.Literal => Boolean(\n node?.type === 'Literal'\n && (typeof node.value === 'number' || 'bigint' in node)\n);\n\n/**\n * Determines whether the provided AST node is an Identifier and whether its name matches the given pattern.\n * The check uses the shared text matcher to support both literal string comparisons and regular expressions.\n * This utility is useful for narrowing nodes when analyzing specific identifier names in the AST.\n *\n * @param node The AST node to test for an Identifier and name match.\n * @param name The expected identifier name or a RegExp pattern to match against the node name.\n * @returns True when the node is an Identifier and its name matches the provided pattern, otherwise false.\n *\n * @example\n * ```tsx\n * const node = // ... Identifier node with name \"foo\"\n * const matches = isSpecificId(node, \"foo\"); // Returns true\n * ```\n */\nexport const isSpecificId = (node: AstNode, name: RegExp | string): boolean => (\n ASTUtils.isIdentifier(node) && checkText(node.name, name)\n);\n\n/**\n * Checks whether a given AST node represents a specific member access pattern with optional object and property constraints.\n * This utility unwraps optional chaining, verifies the node is a MemberExpression, and then validates the object and property\n * names using shared matchers for strings and regular expressions. It is useful for rule logic that needs to detect precise\n * member access patterns while safely handling null or optional inputs.\n *\n * @param node The AST node to inspect for a member access expression.\n * @param objectName The expected object identifier name or pattern, or null to skip the object check.\n * @param propertyName The expected property name or pattern, or null to skip the property check.\n * @returns True when the node is a matching member access expression based on the provided constraints, otherwise false.\n *\n * @example\n * ```tsx\n * // For obj.prop\n * const memberNode = // ... MemberExpression node\n * const matches = isSpecificMemberAccess(memberNode, \"obj\", \"prop\"); // Returns true\n * ```\n */\nexport const isSpecificMemberAccess = (\n node: AstNode,\n objectName: RegExp | string | null,\n propertyName: RegExp | string | null\n): boolean => {\n const checkNode = skipChainExpression(node);\n\n if (checkNode?.type !== 'MemberExpression') {\n return false;\n }\n\n if (objectName && !isSpecificId(checkNode.object as AstNode, objectName)) {\n return false;\n }\n\n if (propertyName) {\n const actualPropertyName = getStaticPropertyName(checkNode);\n\n if (typeof actualPropertyName !== 'string' || !checkText(actualPropertyName, propertyName)) {\n return false;\n }\n }\n\n return true;\n};","/**\n * Normalizes a value used in magic number ignore lists into a consistent numeric form.\n * It ensures string values with numeric suffixes are converted to bigint while preserving\n * numeric and bigint inputs as-is. This helps downstream comparisons behave predictably\n * across mixed input types.\n *\n * @param value The ignore value to normalize, which may be a bigint, number, or string.\n * @returns The normalized value as a bigint or number suitable for comparisons.\n *\n *\n * @example\n * ```tsx\n * const normalized = normalizeIgnoreValue('10n');\n * ```\n */\nexport const normalizeIgnoreValue = (value: bigint | number | string) => (\n typeof value === 'string' ? BigInt(value.slice(0, -1)) : value\n);","import {AST_NODE_TYPES, ASTUtils, ESLintUtils} from '@typescript-eslint/utils';\n\nimport {isNumericLiteral, isSpecificId, isSpecificMemberAccess} from './utils/ast-utils';\nimport {normalizeIgnoreValue} from './utils/no-magic-numbers-utils';\n\nimport type {TSESLint, TSESTree} from '@typescript-eslint/utils';\n\nconst createRule = ESLintUtils.RuleCreator(\n name => `https://github.com/nfqde/eslint-config-nfq/blob/master/docs/rules/${name}.md`\n);\n\n// Maximum array length by the ECMAScript Specification.\n// eslint-disable-next-line @nfq/no-magic-numbers\nconst MAX_ARRAY_LENGTH = 2 ** 32 - 1;\n\ntype RuleOptions = [\n {\n detectObjects?: boolean;\n enforceConst?: boolean;\n ignore?: (number | string)[];\n ignoreArrayIndexes?: boolean;\n ignoreArrays?: boolean;\n ignoreClassFieldInitialValues?: boolean;\n ignoreConstDeclarations?: boolean;\n ignoreDefaultValues?: boolean;\n ignoreFunctions?: string[];\n }\n];\n\ntype MessageIds = 'noMagic' | 'useConst';\n\nexport const noMagicNumbers = createRule<RuleOptions, MessageIds>({\n defaultOptions: [{}],\n meta: {\n docs: {description: 'Disallow magic numbers, allows for ignoring functions'},\n messages: {\n noMagic: 'No magic number: {{raw}}.',\n useConst: \"Number constants declarations must use 'const'.\"\n },\n schema: [\n {\n additionalProperties: false,\n properties: {\n detectObjects: {\n default: false,\n type: 'boolean'\n },\n enforceConst: {\n default: false,\n type: 'boolean'\n },\n ignore: {\n items: {\n anyOf: [\n {type: 'number'},\n {\n pattern: '^[+-]?(?:0|[1-9][0-9]*)n$',\n type: 'string'\n }\n ]\n },\n type: 'array',\n uniqueItems: true\n },\n ignoreArrayIndexes: {\n default: false,\n type: 'boolean'\n },\n ignoreArrays: {\n default: false,\n type: 'boolean'\n },\n ignoreClassFieldInitialValues: {\n default: false,\n type: 'boolean'\n },\n ignoreConstDeclarations: {\n default: false,\n type: 'boolean'\n },\n ignoreDefaultValues: {\n default: false,\n type: 'boolean'\n },\n ignoreFunctions: {\n items: {type: 'string'},\n type: 'array',\n uniqueItems: true\n }\n },\n type: 'object'\n }\n ],\n type: 'suggestion'\n },\n name: 'no-magic-numbers',\n /**\n * Creates the rule listener set used to report magic numbers based on configured options.\n * It initializes configuration flags and helper predicates that keep the rule logic readable and consistent.\n * It returns the listener object that ESLint invokes for each relevant node in the AST.\n *\n * @param context The rule context providing options, reporting utilities, and source information.\n * @returns The listener map that ESLint uses to traverse and validate nodes.\n *\n * @example\n * ```tsx\n * const listeners = create(context);\n * ```\n */\n create(context) {\n const config = context.options[0];\n const detectObjects = Boolean(config.detectObjects);\n const enforceConst = Boolean(config.enforceConst);\n const ignore = new Set((config.ignore ?? []).map(normalizeIgnoreValue));\n const ignoreArrays = Boolean(config.ignoreArrays);\n const ignoreArrayIndexes = Boolean(config.ignoreArrayIndexes);\n const ignoreDefaultValues = Boolean(config.ignoreDefaultValues);\n const ignoreClassFieldInitialValues = Boolean(config.ignoreClassFieldInitialValues);\n const ignoreConstDeclarations = Boolean(config.ignoreConstDeclarations);\n const ignoreFunctions = config.ignoreFunctions ?? [];\n\n const okTypes = detectObjects\n ? []\n : [AST_NODE_TYPES.ObjectExpression, AST_NODE_TYPES.Property, AST_NODE_TYPES.AssignmentExpression];\n\n /**\n * Determines whether a numeric literal value should be ignored based on the configured ignore set.\n * This helper keeps the rule logic concise by centralizing the ignore lookup.\n * It returns a boolean that directly maps to whether reporting should be skipped.\n *\n * @param value The numeric or bigint value to check against the ignore set.\n * @returns True when the value is present in the ignore set and should be skipped.\n *\n * @example\n * ```tsx\n * const ignored = isIgnoredValue(10);\n * ```\n */\n const isIgnoredValue = (value: bigint | number) => ignore.has(value);\n\n /**\n * Checks whether a numeric literal is used as a default value in an assignment pattern.\n * This supports the rule option to ignore default parameter values.\n * It returns true only when the literal is the right-hand side of an assignment pattern.\n *\n * @param fullNumberNode The literal node that may be part of an assignment pattern.\n * @returns True when the node is a default value in an assignment pattern.\n *\n * @example\n * ```tsx\n * const ignored = isDefaultValue(node);\n * ```\n */\n const isDefaultValue = (fullNumberNode: TSESTree.Node) => {\n const {parent} = fullNumberNode;\n\n return Boolean(parent?.type === AST_NODE_TYPES.AssignmentPattern && parent.right === fullNumberNode);\n };\n\n /**\n * Determines whether a numeric literal is the initializer of a class field.\n * This supports the rule option to ignore class field initial values.\n * It returns true only when the literal is the value of a PropertyDefinition node.\n *\n * @param fullNumberNode The literal node that may be used as a class field initializer.\n * @returns True when the node is the initial value of a class field definition.\n *\n * @example\n * ```tsx\n * const ignored = isClassFieldInitialValue(node);\n * ```\n */\n const isClassFieldInitialValue = (fullNumberNode: TSESTree.Node) => {\n const {parent} = fullNumberNode;\n\n return Boolean(\n parent?.type === AST_NODE_TYPES.PropertyDefinition\n && parent.value === fullNumberNode\n );\n };\n\n /**\n * Determines whether a numeric literal represents the radix argument of a parseInt call.\n * It inspects the parent call expression and verifies the second argument position.\n * It only matches parseInt or Number.parseInt usage to keep the rule focused.\n *\n * @param fullNumberNode The numeric literal node to inspect within the call expression.\n * @returns True when the node is used as the radix argument in a parseInt call.\n *\n * @example\n * ```tsx\n * const ignored = isParseIntRadix(node);\n * ```\n */\n const isParseIntRadix = (fullNumberNode: TSESTree.Node) => {\n const {parent} = fullNumberNode;\n\n return Boolean(\n parent?.type === AST_NODE_TYPES.CallExpression\n && fullNumberNode === parent.arguments[1]\n && (\n isSpecificId(parent.callee, 'parseInt')\n || isSpecificMemberAccess(parent.callee, 'Number', 'parseInt')\n )\n );\n };\n\n /**\n * Checks whether a numeric literal appears within JSX syntax.\n * It looks at the parent node type and matches JSX-prefixed node types.\n * It returns a boolean to indicate whether the number should be treated as JSX-related.\n *\n * @param fullNumberNode The numeric literal node to evaluate for JSX context.\n * @returns True when the parent node is a JSX-related AST node.\n *\n * @example\n * ```tsx\n * const ignored = isJSXNumber(node);\n * ```\n */\n const isJSXNumber = (fullNumberNode: TSESTree.Node) => Boolean(fullNumberNode.parent?.type.startsWith('JSX'));\n\n /**\n * Determines whether a numeric literal is used as an array index.\n * It validates member expression usage and ensures the value is a non-negative integer or bigint.\n * It also enforces the ECMAScript maximum array length constraint.\n *\n * @param fullNumberNode The numeric literal node that may be used as an index.\n * @param value The numeric or bigint value extracted from the literal.\n * @returns True when the node is a valid array index access.\n *\n * @example\n * ```tsx\n * const ignored = isArrayIndex(node, 0);\n * ```\n */\n const isArrayIndex = (fullNumberNode: TSESTree.Node, value: bigint | number) => {\n const {parent} = fullNumberNode;\n\n return Boolean(\n parent?.type === AST_NODE_TYPES.MemberExpression\n && parent.property === fullNumberNode\n && (Number.isInteger(value) || typeof value === 'bigint')\n && value >= 0\n && value < MAX_ARRAY_LENGTH\n );\n };\n\n /**\n * Determines whether a numeric literal is declared within a const variable declaration.\n * It walks up the AST from the provided node until it finds a VariableDeclarator, then inspects\n * the corresponding declaration. It only reports true when the declaration exists and is explicitly a\n * const declaration, keeping the rule logic consistent with configuration. This helps the rule skip numbers\n * that are already in const contexts when configured. It returns false when the feature is disabled\n * or no const declaration is found.\n *\n * @param node The AST node to inspect for an enclosing const declaration.\n * @returns True when the node is part of a const variable declarator, otherwise false.\n *\n * @example\n * ```tsx\n * const ignored = isConstValue(node);\n * ```\n */\n const isConstValue = (node: TSESTree.Node | null | undefined) => {\n if (!ignoreConstDeclarations) {\n return false;\n }\n\n let current: TSESTree.Node | null | undefined = node;\n\n while (current) {\n if (current.type === AST_NODE_TYPES.VariableDeclarator) {\n const declaration = current.parent;\n\n return Boolean(\n // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition\n declaration?.type === AST_NODE_TYPES.VariableDeclaration\n && declaration.kind === 'const'\n );\n }\n\n current = current.parent;\n }\n\n return false;\n };\n\n /**\n * Determines whether a numeric literal appears within a call to an ignored function.\n * It inspects identifier and member expression callees to match configured names.\n * It returns false when the parent is not a call expression.\n *\n * @param parent The parent node to examine for a call expression context.\n * @returns True when the call matches a configured ignored function name.\n *\n * @example\n * ```tsx\n * const ignored = shouldIgnoreFunctions(node.parent);\n * ```\n */\n const shouldIgnoreFunctions = (parent: TSESTree.Node | null | undefined) => {\n if (parent?.type !== AST_NODE_TYPES.CallExpression) {\n return false;\n }\n\n if (ASTUtils.isIdentifier(parent.callee)) {\n return ignoreFunctions.includes(parent.callee.name);\n }\n\n if (\n parent.callee.type === AST_NODE_TYPES.MemberExpression\n && ASTUtils.isIdentifier(parent.callee.property)\n ) {\n return ignoreFunctions.includes(parent.callee.property.name);\n }\n\n return false;\n };\n\n /**\n * Determines whether a numeric literal appears within an array literal when arrays are ignored.\n * It checks the parent node for an array expression and consults the ignoreArrays flag.\n * It returns a boolean that directly informs the rule logic.\n *\n * @param parent The parent node to inspect for an array literal context.\n * @returns True when the parent is an array expression and arrays are configured to be ignored.\n *\n * @example\n * ```tsx\n * const ignored = shouldIgnoreArrays(node.parent);\n * ```\n */\n const shouldIgnoreArrays = (parent: TSESTree.Node | null | undefined) => Boolean(\n parent?.type === AST_NODE_TYPES.ArrayExpression && ignoreArrays\n );\n\n const listeners: TSESLint.RuleListener = {\n /**\n * Reports numeric literals that are considered magic numbers based on the configured options.\n * It handles negative literals, ignored contexts, and enforces const declarations when enabled.\n *\n * @param node The literal node encountered by the rule listener.\n */\n // eslint-disable-next-line complexity\n Literal(node: TSESTree.Literal) {\n if (!isNumericLiteral(node)) {\n return;\n }\n\n const numericValue = node.value;\n\n if (typeof numericValue !== 'number' && typeof numericValue !== 'bigint') {\n return;\n }\n\n let fullNumberNode: TSESTree.Node;\n let parent: TSESTree.Node | null | undefined;\n let value: bigint | number;\n let raw: string | null | undefined;\n\n // For negative magic numbers: update the value and parent node\n if (node.parent.type === AST_NODE_TYPES.UnaryExpression && node.parent.operator === '-') {\n fullNumberNode = node.parent;\n parent = fullNumberNode.parent;\n value = -numericValue;\n raw = `-${node.raw}`;\n } else {\n fullNumberNode = node;\n parent = node.parent;\n value = numericValue;\n raw = node.raw;\n }\n\n if (\n isIgnoredValue(value)\n || (ignoreDefaultValues && isDefaultValue(fullNumberNode))\n || (ignoreClassFieldInitialValues && isClassFieldInitialValue(fullNumberNode))\n || isParseIntRadix(fullNumberNode)\n || isJSXNumber(fullNumberNode)\n || (ignoreArrayIndexes && isArrayIndex(fullNumberNode, value))\n || shouldIgnoreFunctions(parent)\n || shouldIgnoreArrays(parent)\n || (ignoreConstDeclarations && isConstValue(fullNumberNode))\n ) {\n return;\n }\n\n if (parent.type === AST_NODE_TYPES.VariableDeclarator) {\n // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition\n if (enforceConst && parent.parent.type === AST_NODE_TYPES.VariableDeclaration) {\n if (parent.parent.kind !== 'const') {\n context.report({\n messageId: 'useConst',\n node: fullNumberNode\n });\n }\n }\n } else if (\n !okTypes.includes(parent.type)\n || (\n parent.type === AST_NODE_TYPES.AssignmentExpression\n && parent.left.type === AST_NODE_TYPES.Identifier\n )\n ) {\n context.report({\n data: {raw},\n messageId: 'noMagic',\n node: fullNumberNode\n });\n }\n }\n };\n\n return listeners;\n }\n});","import {AST_NODE_TYPES} from '@typescript-eslint/utils';\nimport ts from 'typescript';\n\nimport type {TSESTree} from '@typescript-eslint/utils';\n\nexport const DEFAULT_DECORATORS = ['autobind'];\n\n/**\n * Normalizes decorator names into a set of clean, consistent identifiers. It trims whitespace,\n * removes empty entries, and strips a leading '@' from each name. It also falls back to the default decorators when\n * no list is provided.\n *\n * @param names The optional list of decorator names to normalize.\n * @returns A set containing the normalized decorator names.\n *\n * @example\n * ```tsx\n * const names = normalizeDecoratorNames([' @autobind ', 'custom']);\n * ```\n */\nexport const normalizeDecoratorNames = (names?: string[]) => new Set(\n (names ?? DEFAULT_DECORATORS)\n .map(name => name.trim())\n .filter(Boolean)\n .map(name => (name.startsWith('@') ? name.slice(1) : name))\n);\n\n/**\n * Extracts the decorator name from a TypeScript decorator node. It supports identifiers, call expressions,\n * and property access expressions. It returns null when no recognizable name can be derived from the decorator syntax.\n *\n * @param decorator The decorator node to inspect for a name.\n * @returns The resolved decorator name or null when it cannot be determined.\n *\n * @example\n * ```tsx\n * const name = getDecoratorName(node.decorators[0]);\n * ```\n */\nexport const getDecoratorName = (decorator: ts.Decorator): string | null => {\n const {expression} = decorator;\n\n if (ts.isIdentifier(expression)) {\n return expression.text;\n }\n\n if (ts.isCallExpression(expression)) {\n const callee = expression.expression;\n\n if (ts.isIdentifier(callee)) {\n return callee.text;\n }\n\n if (ts.isPropertyAccessExpression(callee)) {\n return callee.name.text;\n }\n }\n\n if (ts.isPropertyAccessExpression(expression)) {\n return expression.name.text;\n }\n\n return null;\n};\n\n/**\n * Determines whether a TypeScript method declaration references the `this` keyword in its body.\n * It walks the method body nodes and stops early once a `this` keyword is found. It returns false when the method\n * has no body or when no `this` usage is detected.\n *\n * @param node The method declaration to inspect.\n * @returns True when the method body references `this`, otherwise false.\n *\n * @example\n * ```tsx\n * const usesThis = methodUsesThis(methodNode);\n * ```\n */\nexport const methodUsesThis = (node: ts.MethodDeclaration): boolean => {\n if (!node.body) {\n return false;\n }\n\n let found = false;\n\n /**\n * Visits a TypeScript AST node and checks if it is a `this` keyword. It updates the outer `found` flag when a\n * `this` keyword is discovered so the traversal can short-circuit. It also recurses into child nodes only while\n * no `this` keyword has been found to avoid unnecessary work.\n *\n * @param child The AST node to inspect for a `this` keyword.\n *\n * @example\n * ```tsx\n * node.body && ts.forEachChild(node.body, visit);\n * ```\n */\n const visit = (child: ts.Node) => {\n if (child.kind === ts.SyntaxKind.ThisKeyword) {\n found = true;\n\n return;\n }\n\n if (!found) {\n ts.forEachChild(child, visit);\n }\n };\n\n ts.forEachChild(node.body, visit);\n\n return found;\n};\n\n/**\n * Unwraps nested TypeScript or optional chaining wrapper expressions until a concrete inner expression is reached.\n * It repeatedly peels off chain, non-null, and type assertion nodes while tracking the current expression.\n * It returns the first expression that is not one of the supported wrapper types.\n *\n * @param node The expression node to unwrap.\n * @returns The innermost expression after removing supported wrapper nodes.\n *\n * @example\n * ```tsx\n * const unwrapped = unwrapExpression(node);\n * ```\n */\nexport const unwrapExpression = (node: TSESTree.Expression): TSESTree.Expression => {\n let current = node;\n\n while (\n current.type === AST_NODE_TYPES.ChainExpression\n || current.type === AST_NODE_TYPES.TSNonNullExpression\n || current.type === AST_NODE_TYPES.TSAsExpression\n || current.type === AST_NODE_TYPES.TSTypeAssertion\n ) {\n current = current.expression as TSESTree.Expression;\n }\n\n return current;\n};\n\ninterface unWrapReturn {\n current: TSESTree.Expression;\n parent: TSESTree.Node | null;\n}\n\n/**\n * Unwraps a usage expression by walking up through supported wrapper nodes to find the effective parent. It tracks the\n * current expression as it traverses chain, non-null, and type assertion wrappers. It returns both the unwrapped\n * expression and the first parent that is not a supported wrapper.\n *\n * @param node The expression node to unwrap within its usage context.\n * @returns An object containing the unwrapped current expression and its first non-wrapper parent.\n *\n * @example\n * ```tsx\n * const {current, parent} = unwrapUsage(memberExpression);\n * ```\n */\nexport const unwrapUsage = (node: TSESTree.Expression): unWrapReturn => {\n let current = node;\n let {parent} = node;\n\n while (\n parent.type === AST_NODE_TYPES.ChainExpression\n || parent.type === AST_NODE_TYPES.TSNonNullExpression\n || parent.type === AST_NODE_TYPES.TSAsExpression\n || parent.type === AST_NODE_TYPES.TSTypeAssertion\n ) {\n current = parent as TSESTree.Expression;\n parent = parent.parent;\n }\n\n return {\n current,\n parent\n };\n};\n\n/**\n * Determines whether a member expression is used as a `this`-binding call on `bind`, `call`, or `apply`.\n * It checks the parent nodes to ensure the expression is part of a call expression and that the callee is the\n * binding method. It then verifies the first argument resolves to a `this` expression after unwrapping any\n * supported wrapper nodes.\n *\n * @param node The member expression to inspect for a `this` bind/call/apply usage.\n * @returns True when the member expression is a `bind`, `call`, or `apply` invocation whose first argument is `this`.\n *\n * @example\n * ```tsx\n * const isBind = isThisBindCall(memberExpression);\n * ```\n */\nexport const isThisBindCall = (node: TSESTree.MemberExpression): boolean => {\n const {parent} = node;\n\n if (parent.type !== AST_NODE_TYPES.MemberExpression) {\n return false;\n }\n\n const name = parent.property.type === AST_NODE_TYPES.Identifier ? parent.property.name : null;\n\n if (!name || !['bind', 'call', 'apply'].includes(name)) {\n return false;\n }\n\n const grandParent = parent.parent;\n\n if (grandParent.type !== AST_NODE_TYPES.CallExpression) {\n return false;\n }\n\n if (grandParent.callee !== parent) {\n return false;\n }\n\n if (grandParent.arguments.length === 0) {\n return false;\n }\n\n const firstArg = unwrapExpression(grandParent.arguments[0] as TSESTree.Expression);\n\n return firstArg.type === AST_NODE_TYPES.ThisExpression;\n};\n\n/**\n * Determines whether a member expression is used as a callback value in common usage contexts. It walks up through\n * wrapper nodes to find the effective parent and then checks a variety of parent node types to decide if the\n * expression is passed, assigned, or returned as a callback. It returns false when the expression is not used in a\n * supported callback position.\n *\n * @param node The member expression to inspect for callback usage contexts.\n * @returns True when the expression appears in a callback position, otherwise false.\n *\n * @example\n * ```tsx\n * const isCallback = isCallbackUsage(memberExpression);\n * ```\n */\nexport const isCallbackUsage = (node: TSESTree.MemberExpression): boolean => {\n const {current, parent} = unwrapUsage(node);\n\n if (!parent) {\n return false;\n }\n\n if (parent.type === AST_NODE_TYPES.CallExpression || parent.type === AST_NODE_TYPES.NewExpression) {\n return parent.arguments.includes(current);\n }\n\n if (\n parent.type === AST_NODE_TYPES.JSXExpressionContainer\n && parent.parent.type === AST_NODE_TYPES.JSXAttribute\n ) {\n return true;\n }\n\n if (parent.type === AST_NODE_TYPES.VariableDeclarator) {\n return parent.init === current;\n }\n\n if (parent.type === AST_NODE_TYPES.AssignmentExpression) {\n return parent.right === current;\n }\n\n if (parent.type === AST_NODE_TYPES.Property) {\n return parent.value === current;\n }\n\n if (parent.type === AST_NODE_TYPES.ArrayExpression) {\n return parent.elements.includes(current);\n }\n\n if (parent.type === AST_NODE_TYPES.ReturnStatement) {\n return parent.argument === current;\n }\n\n return false;\n};","import {AST_NODE_TYPES, ESLintUtils} from '@typescript-eslint/utils';\nimport ts from 'typescript';\n\nimport {\n DEFAULT_DECORATORS,\n getDecoratorName,\n isCallbackUsage,\n isThisBindCall,\n methodUsesThis,\n normalizeDecoratorNames,\n unwrapExpression\n} from './utils/no-unbound-method-utils';\n\nimport type {TSESLint, TSESTree} from '@typescript-eslint/utils';\n\nconst createRule = ESLintUtils.RuleCreator(\n name => `https://github.com/nfqde/eslint-config-nfq/blob/master/docs/rules/${name}.md`\n);\n\ntype RuleOptions = [\n {decoratorNames?: string[]}?\n];\n\ntype MessageIds = 'constructorBind' | 'unboundMethod';\n\ntype MethodInfo = {\n autoBind: boolean;\n hasDecorator: boolean;\n isStatic: boolean;\n usesThis: boolean;\n};\n\nexport const noUnboundMethod = createRule<RuleOptions, MessageIds>({\n defaultOptions: [{decoratorNames: DEFAULT_DECORATORS}],\n meta: {\n docs: {description: 'Warn when unbound class methods that use this are passed as callbacks.'},\n messages: {\n constructorBind: 'Do not bind in the constructor; prefer {{decoratorName}}.',\n unboundMethod: 'Method {{methodName}} uses this and is passed unbound. Add {{decoratorName}} or bind it.'\n },\n schema: [\n {\n additionalProperties: false,\n properties: {\n decoratorNames: {\n items: {type: 'string'},\n type: 'array',\n uniqueItems: true\n }\n },\n type: 'object'\n }\n ],\n type: 'problem'\n },\n name: 'no-unbound-method',\n /**\n * Creates the rule listeners and initializes caches for symbol analysis.\n * It wires the parser services to the TypeScript type checker and configures decorator handling.\n * It returns ESLint listeners that report unbound method usage in callbacks and constructor binding.\n *\n * @param context Rule context used to access parser services and report issues.\n * @returns The rule listener map for this rule.\n *\n * @example\n * ```tsx\n * const listeners = rule.create(context);\n * ```\n */\n create(context) {\n const services = ESLintUtils.getParserServices(context);\n const checker = services.program.getTypeChecker();\n const decoratorNames = normalizeDecoratorNames(context.options[0]?.decoratorNames);\n const decoratorLabel = `@${Array.from(decoratorNames)[0] ?? 'autobind'}`;\n const methodCache = new Map<ts.Symbol, MethodInfo>();\n const reportCache = new Map<ts.Symbol, boolean>();\n const aliasCache = new Map<ts.Symbol, ts.Symbol>();\n const memberSymbolCache = new Map<TSESTree.MemberExpression, ts.Symbol | null>();\n const classAutoBindCache = new WeakMap<ts.ClassLikeDeclaration, boolean>();\n\n const isAutoBindOption = (node: ts.Expression): boolean => {\n if (!ts.isObjectLiteralExpression(node)) {\n return false;\n }\n\n return node.properties.some(property => {\n if (!ts.isPropertyAssignment(property)) {\n return false;\n }\n\n const name = ts.isIdentifier(property.name)\n ? property.name.text\n : ts.isStringLiteral(property.name)\n ? property.name.text\n : null;\n\n if (name !== 'autoBind') {\n return false;\n }\n\n return property.initializer.kind === ts.SyntaxKind.TrueKeyword;\n });\n };\n\n const isMakeAutoObservableCallee = (node: ts.Expression): boolean => {\n if (ts.isIdentifier(node)) {\n return node.text === 'makeAutoObservable';\n }\n\n return ts.isPropertyAccessExpression(node) && node.name.text === 'makeAutoObservable';\n };\n\n const hasAutoBindInConstructor = (classDecl: ts.ClassLikeDeclaration): boolean => {\n const cached = classAutoBindCache.get(classDecl);\n\n if (cached !== undefined) {\n return cached;\n }\n\n const ctor = classDecl.members.find(member => ts.isConstructorDeclaration(member));\n\n if (!ctor?.body) {\n classAutoBindCache.set(classDecl, false);\n\n return false;\n }\n\n for (const statement of ctor.body.statements) {\n if (!ts.isExpressionStatement(statement)) {\n continue;\n }\n\n const expr = statement.expression;\n\n if (!ts.isCallExpression(expr)) {\n continue;\n }\n\n if (!isMakeAutoObservableCallee(expr.expression)) {\n continue;\n }\n\n if (expr.arguments.length < 2) {\n continue;\n }\n\n if (expr.arguments[0].kind !== ts.SyntaxKind.ThisKeyword) {\n continue;\n }\n\n const hasAutoBind = expr.arguments.slice(1).some(arg => isAutoBindOption(arg));\n\n if (hasAutoBind) {\n classAutoBindCache.set(classDecl, true);\n\n return true;\n }\n }\n\n classAutoBindCache.set(classDecl, false);\n\n return false;\n };\n\n /**\n * Resolves an alias symbol to its original symbol and caches the result for reuse.\n * This function avoids repeated TypeScript checker work by memoizing alias resolutions.\n * It ensures downstream analysis consistently uses the same canonical symbol instance.\n *\n * @param symbol The symbol that may be an alias and needs resolution.\n * @returns The resolved canonical symbol for further analysis.\n *\n * @example\n * ```tsx\n * const resolved = resolveSymbol(methodSymbol);\n * ```\n */\n const resolveSymbol = (symbol: ts.Symbol): ts.Symbol => {\n const cached = aliasCache.get(symbol);\n\n if (cached) {\n return cached;\n }\n\n // eslint-disable-next-line no-bitwise\n const resolved = symbol.flags & ts.SymbolFlags.Alias ? checker.getAliasedSymbol(symbol) : symbol;\n\n aliasCache.set(symbol, resolved);\n\n return resolved;\n };\n\n /**\n * Computes metadata about a method-like symbol and caches the result for later use.\n * This function filters out non-method symbols and constructor declarations before gathering details.\n * It also determines decorator presence, static status, and whether the method uses `this`.\n *\n * @param symbol The symbol to inspect for method information.\n * @returns The resolved method info or null when the symbol is not a supported method.\n *\n * @example\n * ```tsx\n * const info = getMethodInfo(methodSymbol);\n * ```\n */\n const getMethodInfo = (symbol: ts.Symbol): MethodInfo | null => {\n const aliased = resolveSymbol(symbol);\n const cached = methodCache.get(aliased);\n\n if (cached) {\n return cached;\n }\n\n if (!(\n // eslint-disable-next-line no-bitwise\n aliased.flags\n & (\n // eslint-disable-next-line no-bitwise\n ts.SymbolFlags.Method\n | ts.SymbolFlags.Property\n | ts.SymbolFlags.Function\n | ts.SymbolFlags.GetAccessor\n | ts.SymbolFlags.SetAccessor\n )\n )) {\n return null;\n }\n\n const declarations = aliased.getDeclarations() ?? [];\n const methodDecl = declarations\n .find(decl => ts.isMethodDeclaration(decl));\n\n if (!methodDecl?.parent || !ts.isClassLike(methodDecl.parent)) {\n return null;\n }\n\n if (ts.isIdentifier(methodDecl.name) && methodDecl.name.text === 'constructor') {\n return null;\n }\n\n const flags = ts.getCombinedModifierFlags(methodDecl);\n // eslint-disable-next-line no-bitwise\n const isStatic = Boolean(flags & ts.ModifierFlags.Static);\n const decorators = ts.canHaveDecorators(methodDecl) ? ts.getDecorators(methodDecl) : undefined;\n const hasDecorator = Boolean(decorators?.some(decorator => {\n const name = getDecoratorName(decorator);\n\n return Boolean(name && decoratorNames.has(name));\n }));\n\n const info: MethodInfo = {\n autoBind: hasAutoBindInConstructor(methodDecl.parent),\n hasDecorator,\n isStatic,\n usesThis: methodUsesThis(methodDecl)\n };\n\n methodCache.set(aliased, info);\n\n return info;\n };\n\n /**\n * Determines whether a symbol should be reported as an unbound method.\n * It resolves aliases and consults cached results to avoid repeated analysis.\n * It evaluates method metadata to ensure only non-static methods that use `this` and lack decorators are flagged.\n *\n * @param symbol The symbol to evaluate for reporting eligibility.\n * @returns True when the symbol represents an unbound method that should be reported.\n *\n * @example\n * ```tsx\n * const shouldReport = shouldReportSymbol(methodSymbol);\n * ```\n */\n const shouldReportSymbol = (symbol: ts.Symbol): boolean => {\n const aliased = resolveSymbol(symbol);\n const cached = reportCache.get(aliased);\n\n if (cached !== undefined) {\n return cached;\n }\n\n const info = getMethodInfo(aliased);\n\n if (!info) {\n reportCache.set(aliased, false);\n\n return false;\n }\n\n const shouldReport = !info.autoBind && !info.isStatic && info.usesThis && !info.hasDecorator;\n\n reportCache.set(aliased, shouldReport);\n\n return shouldReport;\n };\n\n /**\n * Resolves the TypeScript symbol associated with a member expression node.\n * It caches the resolved symbol to minimize repeated checker lookups.\n * It supports both property access and string-literal element access expressions.\n *\n * @param node The member expression node to resolve into a symbol.\n * @returns The resolved symbol, or null when no symbol can be determined.\n *\n * @example\n * ```tsx\n * const symbol = getSymbolForMember(memberExpression);\n * ```\n */\n const getSymbolForMember = (node: TSESTree.MemberExpression): ts.Symbol | null => {\n const cached = memberSymbolCache.get(node);\n\n if (cached !== undefined) {\n return cached;\n }\n\n const tsNode = services.esTreeNodeToTSNodeMap.get(node);\n\n if (ts.isPropertyAccessExpression(tsNode)) {\n const symbol = checker.getSymbolAtLocation(tsNode.name) ?? null;\n\n memberSymbolCache.set(node, symbol);\n\n return symbol;\n }\n\n if (ts.isElementAccessExpression(tsNode)) {\n const arg = tsNode.argumentExpression;\n\n if (ts.isStringLiteralLike(arg)) {\n const symbol = checker.getSymbolAtLocation(arg) ?? null;\n\n memberSymbolCache.set(node, symbol);\n\n return symbol;\n }\n }\n\n memberSymbolCache.set(node, null);\n\n return null;\n };\n\n /**\n * Reports a constructor binding assignment for a method name.\n * It formats the report data with the decorator label and method name.\n * It delegates to the ESLint context to surface the diagnostic at the provided node.\n *\n * @param methodName The name of the method that was bound in the constructor.\n * @param node The AST node that represents the binding expression.\n *\n * @example\n * ```tsx\n * reportConstructorBinding('handleClick', expressionNode);\n * ```\n */\n const reportConstructorBinding = (methodName: string, node: TSESTree.Node) => {\n context.report({\n data: {\n decoratorName: decoratorLabel,\n methodName\n },\n messageId: 'constructorBind',\n node\n });\n };\n\n const listeners: TSESLint.RuleListener = {\n /**\n * Processes a member expression node to determine whether it represents an unbound method usage that\n * should be reported. It performs multiple early returns based on node shape, parent usage, callback context,\n * binding checks, and symbol eligibility. It ultimately reports a linting issue when all conditions\n * indicate a problematic unbound method reference.\n *\n * @param node The member expression node to analyze for unbound method usage.\n *\n * @example\n * ```tsx\n * MemberExpression(node);\n * ```\n */\n MemberExpression(node: TSESTree.MemberExpression) {\n if (node.property.type !== AST_NODE_TYPES.Identifier) {\n return;\n }\n\n const {parent} = node;\n\n if (\n (parent.type === AST_NODE_TYPES.CallExpression || parent.type === AST_NODE_TYPES.NewExpression)\n && parent.callee === node\n ) {\n return;\n }\n\n if (!isCallbackUsage(node)) {\n return;\n }\n\n if (isThisBindCall(node)) {\n return;\n }\n\n const symbol = getSymbolForMember(node);\n\n if (!symbol) {\n return;\n }\n\n if (!shouldReportSymbol(symbol)) {\n return;\n }\n\n context.report({\n data: {\n decoratorName: decoratorLabel,\n methodName: node.property.name\n },\n messageId: 'unboundMethod',\n node\n });\n },\n /**\n * Inspects constructor method definitions to detect assignments where a class method\n * is bound to `this` via `.bind(this)`, and reports such bindings for further handling.\n *\n * @param node The method definition node to analyze.\n */\n MethodDefinition(node: TSESTree.MethodDefinition) {\n if (node.kind !== 'constructor' || !node.value.body) {\n return;\n }\n\n const constructorBody = node.value.body;\n\n for (const statement of constructorBody.body) {\n if (statement.type !== AST_NODE_TYPES.ExpressionStatement) {\n continue;\n }\n\n const {expression} = statement;\n\n if (expression.type !== AST_NODE_TYPES.AssignmentExpression || expression.operator !== '=') {\n continue;\n }\n\n const {left, right} = expression;\n\n if (\n left.type !== AST_NODE_TYPES.MemberExpression\n || left.property.type !== AST_NODE_TYPES.Identifier\n ) {\n continue;\n }\n\n if (left.object.type !== AST_NODE_TYPES.ThisExpression) {\n continue;\n }\n\n if (right.type !== AST_NODE_TYPES.CallExpression) {\n continue;\n }\n\n const {callee} = right;\n\n if (callee.type !== AST_NODE_TYPES.MemberExpression) {\n continue;\n }\n\n if (\n callee.object.type !== AST_NODE_TYPES.MemberExpression\n || callee.object.object.type !== AST_NODE_TYPES.ThisExpression\n || callee.object.property.type !== AST_NODE_TYPES.Identifier\n || callee.object.property.name !== left.property.name\n ) {\n continue;\n }\n\n if (\n callee.property.type !== AST_NODE_TYPES.Identifier\n || callee.property.name !== 'bind'\n ) {\n continue;\n }\n\n if (right.arguments.length === 0) {\n continue;\n }\n\n const firstArg = unwrapExpression(right.arguments[0] as TSESTree.Expression);\n\n if (firstArg.type !== AST_NODE_TYPES.ThisExpression) {\n continue;\n }\n\n reportConstructorBinding(left.property.name, expression);\n }\n }\n };\n\n return listeners;\n }\n});","import {ASTUtils, ESLintUtils} from '@typescript-eslint/utils';\n\nimport type {TSESLint, TSESTree} from '@typescript-eslint/utils';\n\nconst createRule = ESLintUtils.RuleCreator(\n name => `https://github.com/nfqde/eslint-config-nfq/blob/master/docs/rules/${name}.md`\n);\n\nconst DEFAULT_SCREEN_SIZES = ['xs', 'sm', 'md', 'lg', 'xl', 'xxl'];\n\ntype RuleOptions = [\n {\n allowAllPropertiesOnSameLine?: boolean;\n allowMultiplePropertiesPerLine?: boolean;\n ignoredProperties?: string[];\n }\n];\n\ntype MessageIds = 'propertiesOnNewline' | 'propertiesOnNewlineAll';\n\nexport const objectPropertyNewline = createRule<RuleOptions, MessageIds>({\n defaultOptions: [{\n allowAllPropertiesOnSameLine: false,\n allowMultiplePropertiesPerLine: false,\n ignoredProperties: DEFAULT_SCREEN_SIZES\n }],\n meta: {\n docs: {description: 'Enforce placing object properties on separate lines except screensize object properties.'},\n fixable: 'whitespace',\n messages: {\n propertiesOnNewline: 'Object properties must go on a new line.',\n propertiesOnNewlineAll: \"Object properties must go on a new line if they aren't all on the same line.\"\n },\n schema: [\n {\n additionalProperties: false,\n properties: {\n allowAllPropertiesOnSameLine: {\n default: false,\n type: 'boolean'\n },\n allowMultiplePropertiesPerLine: {\n default: false,\n // Deprecated\n type: 'boolean'\n },\n ignoredProperties: {\n default: DEFAULT_SCREEN_SIZES,\n items: {type: 'string'},\n type: 'array'\n }\n },\n type: 'object'\n }\n ],\n type: 'layout'\n },\n name: 'object-property-newline',\n /**\n * Creates the rule listener set for enforcing object property newlines. It reads configuration from rule options\n * and shared settings. It returns listeners that validate object expressions and optionally fix formatting.\n *\n * @param context The rule context provided by ESLint.\n * @returns The rule listener map for this rule.\n *\n * @example\n * ```tsx\n * const listeners = objectPropertyNewline.create(context);\n * ```\n */\n create(context) {\n const options = context.options[0];\n const shared = (\n context.settings as {'@nfq'?: {ignoredProperties?: string[]}} | undefined\n )?.['@nfq']?.ignoredProperties ?? [];\n const allowSameLine = Boolean(\n // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition\n options?.allowAllPropertiesOnSameLine\n // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition\n ?? options?.allowMultiplePropertiesPerLine\n );\n const ignoredProperties = new Set(\n // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition\n options?.ignoredProperties ?? shared ?? DEFAULT_SCREEN_SIZES\n );\n const messageId: MessageIds = allowSameLine ? 'propertiesOnNewlineAll' : 'propertiesOnNewline';\n const {sourceCode} = context;\n\n /**\n * Checks whether a property key matches an ignored screen size. It supports identifier and string literal keys.\n * It returns false for any other key type.\n *\n * @param prop The object property to test.\n * @returns True when the property should be ignored.\n *\n * @example\n * ```tsx\n * const ignored = isScreenSizeProperty(prop);\n * ```\n */\n const isScreenSizeProperty = (prop: TSESTree.Property) => {\n const {key} = prop;\n\n if (ASTUtils.isIdentifier(key)) {\n return ignoredProperties.has(key.name);\n }\n\n if (key.type === 'Literal' && typeof key.value === 'string') {\n return ignoredProperties.has(key.value);\n }\n\n return false;\n };\n\n const listeners: TSESLint.RuleListener = {\n /**\n * Validates object expressions for property newline rules. It skips allowed single-line objects and\n * ignored screen size-only objects. It reports and fixes properties that share a line.\n *\n * @param node The object expression node being visited.\n *\n * @example\n * ```tsx\n * ObjectExpression(node);\n * ```\n */\n ObjectExpression(node: TSESTree.ObjectExpression) {\n if (allowSameLine && node.properties.length > 1) {\n const firstToken = sourceCode.getFirstToken(node.properties[0]);\n const lastToken = sourceCode.getLastToken(node.properties[node.properties.length - 1]);\n\n if (firstToken?.loc.end.line === lastToken?.loc.start.line) {\n return;\n }\n }\n\n if (\n node.properties.length > 0\n && node.properties.every(prop => prop.type === 'Property' && isScreenSizeProperty(prop))\n ) {\n return;\n }\n\n for (let i = 1; i < node.properties.length; i++) {\n const prev = node.properties[i - 1];\n const curr = node.properties[i];\n const lastTokenOfPrevious = sourceCode.getLastToken(prev);\n const firstTokenOfCurrent = sourceCode.getFirstToken(curr);\n\n if (lastTokenOfPrevious?.loc.end.line === firstTokenOfCurrent?.loc.start.line) {\n context.report({\n loc: firstTokenOfCurrent?.loc,\n messageId,\n node,\n /**\n * Fixes the newline between properties when only whitespace exists. It replaces the\n * whitespace after the comma with a newline. It returns null when a safe fix is not\n * possible.\n *\n * @param fixer The ESLint fixer utility.\n * @returns The fix or null when no safe fix is available.\n *\n * @example\n * ```tsx\n * fix(fixer);\n * ```\n */\n fix(fixer) {\n const comma = sourceCode.getTokenBefore(firstTokenOfCurrent!);\n const rangeAfterComma = [comma!.range[1], firstTokenOfCurrent!.range[0]] as const;\n\n if (sourceCode.text.slice(rangeAfterComma[0], rangeAfterComma[1]).trim()) {\n return null;\n }\n\n return fixer.replaceTextRange(rangeAfterComma, '\\n');\n }\n });\n }\n }\n }\n };\n\n return listeners;\n }\n});","import {ASTUtils} from '@typescript-eslint/utils';\n\nimport {unwrapExpression} from './expression-utils';\n\nimport type {TSESTree} from '@typescript-eslint/utils';\n\n/**\n * Determines whether the provided node represents the `Cypress.Commands` member expression.\n * This function inspects the node shape and validates the object and property identifiers.\n * It returns a boolean result suitable for guard conditions in rule logic.\n *\n * @param node The AST node to inspect for a Cypress.Commands member expression.\n * @returns True when the node matches `Cypress.Commands`, otherwise false.\n *\n * @remarks\n * This helper assumes the node has already been parsed by the TypeScript ESLint parser.\n *\n * @example\n * ```tsx\n * const isCommands = isCypressCommandsObject(node);\n * ```\n */\nexport const isCypressCommandsObject = (node: TSESTree.Node): boolean => (\n node.type === 'MemberExpression'\n && ASTUtils.isIdentifier(node.object)\n && node.object.name === 'Cypress'\n && ASTUtils.isIdentifier(node.property)\n && node.property.name === 'Commands'\n);\n\n/**\n * Checks whether a node represents a registration call for the `getCy` command.\n * The function validates call expression structure, target object, and method name.\n * It returns a boolean that signals if the call is an add or overwrite for `getCy`.\n *\n * @param node The AST node to inspect for a Cypress.Commands registration call.\n * @returns True when the call registers `getCy`, otherwise false.\n *\n * @remarks\n * This utility expects the first argument to be a literal command name.\n *\n * @example\n * ```tsx\n * const isRegistration = isGetCyRegistration(node);\n * ```\n */\nexport const isGetCyRegistration = (node: TSESTree.Node): boolean => {\n if (node.type !== 'CallExpression') {\n return false;\n }\n\n if (node.arguments.length === 0) {\n return false;\n }\n\n const callee = unwrapExpression(node.callee);\n\n if (callee.type !== 'MemberExpression' || !ASTUtils.isIdentifier(callee.property)) {\n return false;\n }\n\n if (!isCypressCommandsObject(callee.object)) {\n return false;\n }\n\n const methodName = callee.property.name;\n\n if (methodName !== 'add' && methodName !== 'overwrite') {\n return false;\n }\n\n const nameArg = node.arguments[0];\n\n return nameArg.type === 'Literal' && nameArg.value === 'getCy';\n};\n\n/**\n * Determines whether the provided call expression represents a `cy.get` invocation.\n * The logic unwraps the callee to inspect the member expression shape and confirm the object identifier.\n * It returns a boolean that can be used as a guard for command-specific rules.\n *\n * @param node The call expression node to evaluate.\n * @returns True when the node is a `cy.get` call, otherwise false.\n *\n * @remarks\n * This helper assumes the call expression has already been parsed and type-checked by the parser.\n *\n * @example\n * ```tsx\n * const isGet = isCyGetCall(node);\n * ```\n */\nexport const isCyGetCall = (node: TSESTree.CallExpression): boolean => {\n const callee = unwrapExpression(node.callee);\n\n if (callee.type !== 'MemberExpression') {\n return false;\n }\n\n const object = unwrapExpression(callee.object);\n\n return ASTUtils.isIdentifier(object)\n && object.name === 'cy'\n && ASTUtils.isIdentifier(callee.property)\n && callee.property.name === 'get';\n};\n\n/**\n * Determines whether the provided call expression uses an alias string as its first argument.\n * The function checks for at least one argument and verifies it is a string literal starting with `@`.\n * It returns a boolean that indicates whether the call is an alias lookup.\n *\n * @param node The call expression node to inspect.\n * @returns True when the first argument is an alias string, otherwise false.\n *\n * @remarks\n * This utility only inspects the first argument and ignores additional arguments.\n *\n * @example\n * ```tsx\n * const isAlias = isAliasGetCall(node);\n * ```\n */\nexport const isAliasGetCall = (node: TSESTree.CallExpression): boolean => {\n if (node.arguments.length === 0) {\n return false;\n }\n\n const [arg] = node.arguments;\n\n return arg.type === 'Literal'\n && typeof arg.value === 'string'\n && arg.value.startsWith('@');\n};","import {ESLintUtils} from '@typescript-eslint/utils';\n\nimport {\n isAliasGetCall,\n isCyGetCall,\n isGetCyRegistration\n} from './utils/require-getcy-utils';\n\nimport type {TSESLint, TSESTree} from '@typescript-eslint/utils';\n\nconst createRule = ESLintUtils.RuleCreator(\n name => `https://github.com/nfqde/eslint-config-nfq/blob/master/docs/rules/${name}.md`\n);\n\ntype MessageIds = 'useGetCy';\n\nexport const requireGetCy = createRule<[], MessageIds>({\n defaultOptions: [],\n meta: {\n docs: {description: 'Require using cy.getCy instead of cy.get.'},\n messages: {useGetCy: 'Use cy.getCy() instead of cy.get().'},\n schema: [],\n type: 'suggestion'\n },\n name: 'require-getcy',\n /**\n * Creates the rule listener set for this ESLint rule.\n * It wires the context to the callbacks that will analyze nodes and report violations.\n * It returns an object that satisfies the rule listener contract expected by ESLint.\n *\n * @param context The rule context used to report violations and access options.\n * @returns A rule listener object that contains callbacks for traversed nodes.\n *\n * @example\n * ```tsx\n * const listeners = create(context);\n * ```\n */\n create(context) {\n /**\n * Determines whether a node is located within a getCy registration call.\n * It walks up the AST parent chain to detect any registration node.\n * It returns true when a registration is found, otherwise false.\n *\n * @param node The node to start walking from.\n * @returns Whether the node is inside a getCy registration.\n *\n * @example\n * ```tsx\n * const inside = isInsideGetCyRegistration(node);\n * ```\n */\n const isInsideGetCyRegistration = (node: TSESTree.Node) => {\n let current: TSESTree.Node | undefined = node;\n\n while (current) {\n if (isGetCyRegistration(current)) {\n return true;\n }\n\n current = current.parent ?? undefined;\n }\n\n return false;\n };\n\n return {\n /**\n * Handles CallExpression nodes and reports invalid cy.get usage.\n * It skips nodes that are not cy.get calls or are allowed aliases.\n * It reports a suggestion when a disallowed call is found.\n *\n * @param node The call expression node being visited.\n *\n * @example\n * ```tsx\n * CallExpression(node);\n * ```\n */\n CallExpression(node) {\n if (!isCyGetCall(node)) {\n return;\n }\n\n if (isInsideGetCyRegistration(node)) {\n return;\n }\n\n if (isAliasGetCall(node)) {\n return;\n }\n\n context.report({\n messageId: 'useGetCy',\n node\n });\n }\n } satisfies TSESLint.RuleListener;\n }\n});","import naturalCompare from 'natural-compare';\n\ntype NameWithMethod = {method: boolean; name: string};\n\nexport const isValidOrders = {\n /**\n * Compares two entries by name using ascending lexical order.\n * It treats the name fields as plain strings and checks if the first sorts before or equal to the second.\n * It is used as the base comparison for other ordering variants.\n *\n * @param a The first name wrapper to compare.\n * @param b The second name wrapper to compare.\n * @returns True when the first name is ordered before or equal to the second name.\n *\n * @remarks Uses direct string comparison for ordering.\n *\n * @example\n * ```tsx\n * const ok = isValidOrders.asc({name: 'a'}, {name: 'b'});\n * ```\n */\n asc(a: NameWithMethod, b: NameWithMethod) {\n return a.name <= b.name;\n },\n /**\n * Compares two entries by method flag and then by name in ascending order.\n * It groups by the method indicator and falls back to standard ascending name comparison.\n * It is used when method ordering is enabled for ascending checks.\n *\n * @param a The first name wrapper to compare.\n * @param b The second name wrapper to compare.\n * @returns True when the first entry is ordered before or equal to the second entry with method-aware ordering.\n *\n * @remarks Uses method grouping before name comparison.\n *\n * @example\n * ```tsx\n * const ok = isValidOrders.ascF({name: 'a', method: false}, {name: 'b', method: true});\n * ```\n */\n ascF(a: NameWithMethod, b: NameWithMethod) {\n if (a.method === b.method) {\n return isValidOrders.asc(a, b);\n }\n\n return a.method <= b.method;\n },\n /**\n * Compares two entries by name using ascending order with case folding.\n * It lowercases both names to provide a case-insensitive check.\n * It is used when the ordering option disables case sensitivity.\n *\n * @param a The first name wrapper to compare.\n * @param b The second name wrapper to compare.\n * @returns True when the first name is ordered before or equal to the second name.\n *\n * @remarks Uses lowercased strings to avoid case differences.\n *\n * @example\n * ```tsx\n * const ok = isValidOrders.ascI({name: 'A'}, {name: 'b'});\n * ```\n */\n ascI(a: NameWithMethod, b: NameWithMethod) {\n return a.name.toLowerCase() <= b.name.toLowerCase();\n },\n /**\n * Compares two entries by method flag and then by name using case-insensitive ascending order.\n * It groups by the method indicator and compares lowercased names when methods match.\n * It is used when method ordering and case-insensitive ordering are enabled together.\n *\n * @param a The first name wrapper to compare.\n * @param b The second name wrapper to compare.\n * @returns True when the first entry is ordered before or equal to the second entry with method-aware, case-insensitive ordering.\n *\n * @remarks Uses method grouping before case-insensitive comparison.\n *\n * @example\n * ```tsx\n * const ok = isValidOrders.ascIF({name: 'A', method: true}, {name: 'b', method: true});\n * ```\n */\n ascIF(a: NameWithMethod, b: NameWithMethod) {\n if (a.method === b.method) {\n return isValidOrders.ascI(a, b);\n }\n\n return a.method <= b.method;\n },\n /**\n * Compares two entries by name using natural ascending order with case folding.\n * It lowercases both names and applies natural comparison.\n * It is used when both natural and case-insensitive ordering are enabled.\n *\n * @param a The first name wrapper to compare.\n * @param b The second name wrapper to compare.\n * @returns True when the first name is ordered before or equal to the second name in natural, case-insensitive order.\n *\n * @remarks Combines natural ordering with case folding.\n *\n * @example\n * ```tsx\n * const ok = isValidOrders.ascIN({name: 'A2'}, {name: 'a10'});\n * ```\n */\n ascIN(a: NameWithMethod, b: NameWithMethod) {\n return naturalCompare(a.name.toLowerCase(), b.name.toLowerCase()) <= 0;\n },\n /**\n * Compares two entries by method flag and then by name using natural, case-insensitive ascending order.\n * It groups by the method indicator and uses natural comparison on lowercased names when methods match.\n * It is used when method ordering, natural ordering, and case-insensitive ordering are enabled together.\n *\n * @param a The first name wrapper to compare.\n * @param b The second name wrapper to compare.\n * @returns True when the first entry is ordered before or equal to the second entry with method-aware, natural, case-insensitive ordering.\n *\n * @remarks Uses method grouping before natural, case-insensitive comparison.\n *\n * @example\n * ```tsx\n * const ok = isValidOrders.ascINF({name: 'A2', method: true}, {name: 'a10', method: true});\n * ```\n */\n ascINF(a: NameWithMethod, b: NameWithMethod) {\n if (a.method === b.method) {\n return isValidOrders.ascIN(a, b);\n }\n\n return a.method <= b.method;\n },\n /**\n * Compares two entries by name using natural ascending order.\n * It delegates to a natural compare function to handle numeric substrings sensibly.\n * It is used when natural sorting is enabled.\n *\n * @param a The first name wrapper to compare.\n * @param b The second name wrapper to compare.\n * @returns True when the first name is ordered before or equal to the second name in natural order.\n *\n * @remarks Uses natural-compare for string ordering.\n *\n * @example\n * ```tsx\n * const ok = isValidOrders.ascN({name: 'a2'}, {name: 'a10'});\n * ```\n */\n ascN(a: NameWithMethod, b: NameWithMethod) {\n return naturalCompare(a.name, b.name) <= 0;\n },\n /**\n * Compares two entries by method flag and then by name using natural ascending order.\n * It groups by the method indicator and uses natural comparison when methods match.\n * It is used when method ordering and natural ordering are enabled together.\n *\n * @param a The first name wrapper to compare.\n * @param b The second name wrapper to compare.\n * @returns True when the first entry is ordered before or equal to the second entry with method-aware natural ordering.\n *\n * @remarks Uses method grouping before natural comparison.\n *\n * @example\n * ```tsx\n * const ok = isValidOrders.ascNF({name: 'a2', method: false}, {name: 'a10', method: false});\n * ```\n */\n ascNF(a: NameWithMethod, b: NameWithMethod) {\n if (a.method === b.method) {\n return isValidOrders.ascN(a, b);\n }\n\n return a.method <= b.method;\n },\n /**\n * Compares two entries by name using descending lexical order.\n * It delegates to the ascending comparison with swapped operands.\n * It is used as the base comparison for descending variants.\n *\n * @param a The first name wrapper to compare.\n * @param b The second name wrapper to compare.\n * @returns True when the first name is ordered after or equal to the second name.\n *\n * @remarks Uses ascending logic with swapped inputs.\n *\n * @example\n * ```tsx\n * const ok = isValidOrders.desc({name: 'b'}, {name: 'a'});\n * ```\n */\n desc(a: NameWithMethod, b: NameWithMethod) {\n return isValidOrders.asc(b, a);\n },\n /**\n * Compares two entries by method flag and then by name using descending order.\n * It delegates to the ascending method-aware comparison with swapped operands.\n * It is used when method ordering and descending ordering are enabled together.\n *\n * @param a The first name wrapper to compare.\n * @param b The second name wrapper to compare.\n * @returns True when the first entry is ordered after or equal to the second entry with method-aware ordering.\n *\n * @remarks Uses ascending method-aware logic with swapped inputs.\n *\n * @example\n * ```tsx\n * const ok = isValidOrders.descF({name: 'b', method: true}, {name: 'a', method: false});\n * ```\n */\n descF(a: NameWithMethod, b: NameWithMethod) {\n return isValidOrders.ascF(b, a);\n },\n /**\n * Compares two entries by name using descending order with case folding.\n * It delegates to the ascending case-insensitive comparison with swapped operands.\n * It is used when descending and case-insensitive ordering are enabled.\n *\n * @param a The first name wrapper to compare.\n * @param b The second name wrapper to compare.\n * @returns True when the first name is ordered after or equal to the second name in case-insensitive order.\n *\n * @remarks Uses ascending case-insensitive logic with swapped inputs.\n *\n * @example\n * ```tsx\n * const ok = isValidOrders.descI({name: 'b'}, {name: 'A'});\n * ```\n */\n descI(a: NameWithMethod, b: NameWithMethod) {\n return isValidOrders.ascI(b, a);\n },\n /**\n * Compares two entries by method flag and then by name using descending case-insensitive order.\n * It delegates to the ascending method-aware case-insensitive comparison with swapped operands.\n * It is used when method ordering, descending ordering, and case-insensitive ordering are enabled together.\n *\n * @param a The first name wrapper to compare.\n * @param b The second name wrapper to compare.\n * @returns True when the first entry is ordered after or equal to the second entry with method-aware, case-insensitive ordering.\n *\n * @remarks Uses ascending method-aware case-insensitive logic with swapped inputs.\n *\n * @example\n * ```tsx\n * const ok = isValidOrders.descIF({name: 'b', method: true}, {name: 'A', method: true});\n * ```\n */\n descIF(a: NameWithMethod, b: NameWithMethod) {\n return isValidOrders.ascIF(b, a);\n },\n /**\n * Compares two entries by name using natural descending order with case folding.\n * It delegates to the ascending natural case-insensitive comparison with swapped operands.\n * It is used when descending, natural, and case-insensitive ordering are enabled.\n *\n * @param a The first name wrapper to compare.\n * @param b The second name wrapper to compare.\n * @returns True when the first name is ordered after or equal to the second name in natural, case-insensitive order.\n *\n * @remarks Uses ascending natural case-insensitive logic with swapped inputs.\n *\n * @example\n * ```tsx\n * const ok = isValidOrders.descIN({name: 'a10'}, {name: 'A2'});\n * ```\n */\n descIN(a: NameWithMethod, b: NameWithMethod) {\n return isValidOrders.ascIN(b, a);\n },\n /**\n * Compares two entries by method flag and then by name using descending natural, case-insensitive order.\n * It delegates to the ascending method-aware natural case-insensitive comparison with swapped operands.\n * It is used when method ordering, descending ordering, natural ordering, and case-insensitive ordering\n * are enabled together.\n *\n * @param a The first name wrapper to compare.\n * @param b The second name wrapper to compare.\n * @returns True when the first entry is ordered after or equal to the second entry with method-aware, natural,case-insensitive ordering.\n *\n * @remarks Uses ascending method-aware natural case-insensitive logic with swapped inputs.\n *\n * @example\n * ```tsx\n * const ok = isValidOrders.descINF({name: 'a10', method: true}, {name: 'A2', method: true});\n * ```\n */\n descINF(a: NameWithMethod, b: NameWithMethod) {\n return isValidOrders.ascINF(b, a);\n },\n /**\n * Compares two entries by name using natural descending order.\n * It delegates to the ascending natural comparison with swapped operands.\n * It is used when descending natural ordering is enabled.\n *\n * @param a The first name wrapper to compare.\n * @param b The second name wrapper to compare.\n * @returns True when the first name is ordered after or equal to the second name in natural order.\n *\n * @remarks Uses ascending natural logic with swapped inputs.\n *\n * @example\n * ```tsx\n * const ok = isValidOrders.descN({name: 'a10'}, {name: 'a2'});\n * ```\n */\n descN(a: NameWithMethod, b: NameWithMethod) {\n return isValidOrders.ascN(b, a);\n },\n /**\n * Compares two entries by method flag and then by name using descending natural order.\n * It delegates to the ascending method-aware natural comparison with swapped operands.\n * It is used when method ordering, descending ordering, and natural ordering are enabled together.\n *\n * @param a The first name wrapper to compare.\n * @param b The second name wrapper to compare.\n * @returns True when the first entry is ordered after or equal to the second entry with method-aware natural ordering.\n *\n * @remarks Uses ascending method-aware natural logic with swapped inputs.\n *\n * @example\n * ```tsx\n * const ok = isValidOrders.descNF({name: 'a10', method: false}, {name: 'a2', method: false});\n * ```\n */\n descNF(a: NameWithMethod, b: NameWithMethod) {\n return isValidOrders.ascNF(b, a);\n }\n};","import * as astUtils from './ast-utils';\n\nimport type {TSESTree} from '@typescript-eslint/utils';\n\n/**\n * Retrieves the property name from a property node when it can be determined statically.\n * It first checks for a static name using the AST utilities and returns it when available.\n * It falls back to reading the identifier name from the key and returns null when no name can be resolved.\n *\n * @param node The property node to inspect for a name.\n * @returns The resolved property name or null if it cannot be determined.\n *\n * @example\n * ```tsx\n * const name = getPropertyName(propertyNode);\n * ```\n */\nexport const getPropertyName = (node: TSESTree.Property): string | null => {\n const staticName = astUtils.getStaticPropertyName(node);\n\n if (staticName !== null) {\n return staticName;\n }\n\n if (typeof node.key === 'undefined') {\n return null;\n }\n\n // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition\n return (node.key as TSESTree.Identifier).name ?? null;\n};","import {AST_NODE_TYPES, ESLintUtils} from '@typescript-eslint/utils';\n\nimport {isValidOrders} from './utils/isValidOrders';\nimport {getPropertyName} from './utils/sort-keys-utils';\n\nimport type {TSESLint, TSESTree} from '@typescript-eslint/utils';\n\nconst createRule = ESLintUtils.RuleCreator(\n name => `https://github.com/nfqde/eslint-config-nfq/blob/master/docs/rules/${name}.md`\n);\n\ntype SortOrder = 'asc' | 'desc';\n\ntype RuleOptions = [\n SortOrder?,\n {\n caseSensitive?: boolean;\n ignorePropTypes?: boolean;\n methodsExtra?: boolean;\n natural?: boolean;\n }?\n];\n\ntype Stack = {\n ignoreSort?: boolean;\n prevName: string | null;\n prevNode: TSESTree.Property | null;\n upper: Stack | null;\n};\n\ntype MessageIds = 'ignoredPropertiesOrder' | 'outOfOrder';\n\nexport const sortKeys = createRule<RuleOptions, MessageIds>({\n defaultOptions: [],\n meta: {\n docs: {description: 'require object keys to be sorted'},\n fixable: 'code',\n messages: {\n ignoredPropertiesOrder: 'Object keys must follow the configured order: {{order}}.',\n // eslint-disable-next-line @stylistic/max-len\n outOfOrder: \"Expected object keys to be in {{natual}}{{insensitive}}{{order}}ending order{{methods}}. '{{thisName}}' should be before '{{prevName}}'.\"\n },\n schema: [\n {\n enum: ['asc', 'desc'],\n type: 'string'\n },\n {\n additionalProperties: false,\n properties: {\n caseSensitive: {type: 'boolean'},\n ignorePropTypes: {type: 'boolean'},\n methodsExtra: {type: 'boolean'},\n natural: {type: 'boolean'}\n },\n type: 'object'\n }\n ],\n type: 'suggestion'\n },\n name: 'sort-keys',\n /**\n * Creates the rule listeners and shared state for the sort-keys rule. It initializes\n * configuration options from context and wires up the AST visitors used for sorting.\n * The function returns a listener map that ESLint executes while traversing the AST.\n *\n * @param context The rule context provided by ESLint.\n * @returns The listener map for the rule.\n *\n * @example\n * ```tsx\n * const listeners = create(context);\n * ```\n */\n create(context) {\n const ignoredProperties = (\n context.settings as {'@nfq'?: {ignoredProperties?: string[]}} | undefined\n )?.['@nfq']?.ignoredProperties ?? [];\n const ignoredPropertySet = new Set(ignoredProperties);\n const ignoredOrderIndex = new Map(ignoredProperties.map((name, index) => [name, index]));\n\n const order = (context.options[0] ?? 'asc');\n const options = context.options[1];\n const insensitive = (options?.caseSensitive) === false;\n const natual = Boolean(options?.natural);\n const ignorePropTypes = Boolean(options?.ignorePropTypes);\n const methodsExtra = Boolean(options?.methodsExtra);\n const orderFuncKey = `${order}${(insensitive ? 'I' : '')}${(natual ? 'N' : '')}${(methodsExtra ? 'F' : '')}` as const;\n const isValidOrder = isValidOrders[orderFuncKey];\n\n /**\n * Determines whether an object expression consists only of ignored properties. It\n * checks the configured ignored property names and validates each property node.\n * The function is used to skip sorting for objects that contain only ignored keys.\n *\n * @param node The object expression to inspect.\n * @returns Whether the object should be ignored for sorting.\n *\n * @example\n * ```tsx\n * const ignored = isIgnoredOnlyObject(objectExpression);\n * ```\n */\n const isIgnoredOnlyObject = (node: TSESTree.ObjectExpression) => (\n ignoredProperties.length > 0\n && node.properties.length > 0\n && node.properties.every(\n prop => prop.type === AST_NODE_TYPES.Property\n && Boolean(getPropertyName(prop))\n && ignoredPropertySet.has(getPropertyName(prop)!)\n )\n );\n\n let stack: Stack | null = null;\n\n /**\n * Handles spread elements inside object expressions by resetting the previous name. It\n * ensures the sort comparison restarts after a spread. This avoids false positives\n * when ordering keys around spreads.\n *\n * @param node The spread element node to process.\n *\n * @example\n * ```tsx\n * SpreadElement(spreadNode);\n * ```\n */\n const SpreadElement = (node: TSESTree.SpreadElement) => {\n if (node.parent.type === AST_NODE_TYPES.ObjectExpression && stack) {\n stack.prevName = null;\n }\n };\n\n const listeners: TSESLint.RuleListener = {\n ExperimentalSpreadProperty: SpreadElement,\n /**\n * Pops the stack frame when leaving an object expression. It restores the previous\n * frame so outer objects continue tracking property order correctly. The function\n * performs a null check before restoring.\n *\n * @example\n * ```tsx\n * listeners['ObjectExpression:exit']();\n * ```\n */\n 'ObjectExpression:exit': function() {\n if (stack) {\n stack = stack.upper;\n }\n },\n SpreadElement,\n /**\n * Pushes a new stack frame when entering an object expression. It tracks previous\n * property state for ordering checks within that object. The frame is configured\n * to ignore sorting when the object contains only ignored properties.\n *\n * @param node The object expression node.\n *\n * @example\n * ```tsx\n * listeners.ObjectExpression(objectExpression);\n * ```\n */\n ObjectExpression(node: TSESTree.ObjectExpression) {\n stack = {\n ignoreSort: isIgnoredOnlyObject(node),\n prevName: null,\n prevNode: null,\n upper: stack\n };\n },\n /**\n * Validates property ordering and reports if keys are out of order. It respects\n * configuration options such as ignored properties and method sorting. The handler\n * may report and fix key ordering by swapping property text.\n *\n * @param node The property node to validate.\n *\n * @example\n * ```tsx\n * listeners.Property(propertyNode);\n * ```\n */\n // eslint-disable-next-line complexity\n Property(node: TSESTree.Property) {\n if (!stack) {\n return;\n }\n\n if (node.parent.type === AST_NODE_TYPES.ObjectPattern) {\n return;\n }\n\n if (ignorePropTypes) {\n if (\n // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition\n node.parent.type === AST_NODE_TYPES.ObjectExpression\n && getPropertyName(node.parent.parent as TSESTree.Property) === 'propTypes'\n ) {\n return;\n }\n if (\n // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition\n node.parent.type === AST_NODE_TYPES.ObjectExpression\n && getPropertyName(node.parent.parent as TSESTree.Property) === 'defaultProps'\n ) {\n return;\n }\n }\n\n const {prevName} = stack;\n const {prevNode} = stack;\n const thisName = getPropertyName(node);\n\n if (thisName !== null) {\n stack.prevName = thisName;\n // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition\n stack.prevNode = node || prevNode;\n }\n\n if (prevName === null || thisName === null || !prevNode) {\n return;\n }\n\n if (stack.ignoreSort) {\n const prevIndex = ignoredOrderIndex.get(prevName);\n const thisIndex = ignoredOrderIndex.get(thisName);\n\n if (prevIndex !== undefined && thisIndex !== undefined && thisIndex < prevIndex) {\n context.report({\n data: {order: ignoredProperties.join(', ')},\n // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition\n loc: node.key.loc ?? undefined,\n messageId: 'ignoredPropertiesOrder',\n node,\n /**\n * Creates fixes that swap the text and leading comments between two properties.\n * It builds a list of ESLint fixes and preserves comment placement during the swap.\n * It returns the collection of fixes that ESLint applies to reorder the properties.\n *\n * @param fixer The fixer used to generate the text edits.\n * @returns The list of fixes that swap the property positions.\n *\n * @example\n * ```tsx\n * const fixes = fix(fixer);\n * ```\n */\n fix(fixer) {\n const fixes: TSESLint.RuleFix[] = [];\n const {sourceCode} = context;\n /**\n * Moves property text and associated comments between nodes. It\n * copies the text from one node to another and preserves leading\n * comments by re-inserting them before the target node.\n *\n * @param fromNode The property to move from.\n * @param toNode The property to move to.\n *\n * @example\n * ```tsx\n * moveProperty(fromNode, toNode);\n * ```\n */\n const moveProperty = (fromNode: TSESTree.Property, toNode: TSESTree.Property) => {\n const prevText = sourceCode.getText(fromNode);\n const thisComments = sourceCode.getCommentsBefore(fromNode);\n\n for (const thisComment of thisComments) {\n fixes.push(fixer.insertTextBefore(toNode, `${sourceCode.getText(thisComment)}\\n`));\n fixes.push(fixer.remove(thisComment));\n }\n fixes.push(fixer.replaceText(toNode, prevText));\n };\n\n moveProperty(node, prevNode);\n moveProperty(prevNode, node);\n\n return fixes;\n }\n });\n }\n\n return;\n }\n\n if (!isValidOrder({\n method: prevNode.method,\n name: prevName\n }, {\n method: node.method,\n name: thisName\n })) {\n context.report({\n data: {\n insensitive: insensitive ? 'insensitive ' : '',\n methods: methodsExtra ? ' (methods seperate)' : '',\n natual: natual ? 'natural ' : '',\n order,\n prevName,\n thisName\n },\n // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition\n loc: node.key.loc ?? undefined,\n messageId: 'outOfOrder',\n node,\n /**\n * Creates the list of fixes that swap the out-of-order properties.\n * It gathers the text edits required to move both properties and any leading comments to\n * their new locations. It returns the fixes so ESLint can apply them as a single operation.\n *\n * @param fixer The fixer used to construct text edits for the swap.\n * @returns The collection of fixes that reorder the two properties.\n *\n * @example\n * ```tsx\n * const edits = fix(fixer);\n * ```\n */\n fix(fixer) {\n const fixes: TSESLint.RuleFix[] = [];\n const {sourceCode} = context;\n /**\n * Moves property text and associated comments between nodes. It\n * copies the text from one node to another and preserves leading\n * comments by re-inserting them before the target node.\n *\n * @param fromNode The property to move from.\n * @param toNode The property to move to.\n *\n * @example\n * ```tsx\n * moveProperty(fromNode, toNode);\n * ```\n */\n const moveProperty = (fromNode: TSESTree.Property, toNode: TSESTree.Property) => {\n const prevText = sourceCode.getText(fromNode);\n const thisComments = sourceCode.getCommentsBefore(fromNode);\n\n for (const thisComment of thisComments) {\n fixes.push(fixer.insertTextBefore(toNode, `${sourceCode.getText(thisComment)}\\n`));\n fixes.push(fixer.remove(thisComment));\n }\n fixes.push(fixer.replaceText(toNode, prevText));\n };\n\n moveProperty(node, prevNode);\n moveProperty(prevNode, node);\n\n return fixes;\n }\n });\n }\n }\n };\n\n return listeners;\n }\n});","import {ASTUtils} from '@typescript-eslint/utils';\n\nimport type {TSESTree} from '@typescript-eslint/utils';\n\n/**\n * Unwraps nested TypeScript expression wrappers until the underlying expression is reached.\n * It repeatedly removes chain, type assertion, and non-null wrapper nodes so downstream logic can analyze the actual\n * target. This helps ensure consistent behavior when expressions are wrapped by optional chaining or type-related syntax.\n *\n * @param expression The expression to unwrap.\n * @returns The innermost unwrapped expression.\n *\n * @example\n * ```tsx\n * const base = unwrapExpression(someExpression);\n * ```\n */\nexport const unwrapExpression = (expression: TSESTree.Expression): TSESTree.Expression => {\n let current = expression;\n\n while (\n current.type === 'ChainExpression'\n || current.type === 'TSAsExpression'\n || current.type === 'TSNonNullExpression'\n ) {\n current = current.expression;\n }\n\n return current;\n};\n\n/**\n * Determines whether an expression ultimately resolves to the styled base identifier.\n * It walks through member access and call expressions to reach the root value. This allows the rule logic to\n * treat chained or called styled usages as coming from the same base.\n *\n * @param expression The expression to inspect.\n * @returns True when the expression resolves to the styled base.\n *\n * @example\n * ```tsx\n * const isBase = isStyledBase(styled.div);\n * ```\n */\nexport const isStyledBase = (expression: TSESTree.Expression): boolean => {\n const node = unwrapExpression(expression);\n\n if (ASTUtils.isIdentifier(node)) {\n return node.name === 'styled';\n }\n\n if (node.type === 'MemberExpression') {\n return isStyledBase(node.object);\n }\n\n if (node.type === 'CallExpression') {\n return isStyledBase(node.callee);\n }\n\n return false;\n};\n\n/**\n * Collects identifier dependencies used inside a template literal. It unwraps each expression\n * to its base and keeps only identifiers for easier analysis. This provides both the name and the\n * identifier node for each dependency.\n *\n * @param template The template literal to analyze.\n * @returns A list of dependency names with their identifier nodes.\n *\n * @example\n * ```tsx\n * const deps = getDependencyNames(templateLiteral);\n * ```\n */\nexport const getDependencyNames = (\n template: TSESTree.TemplateLiteral\n): {name: string; node: TSESTree.Identifier}[] => (\n template.expressions\n .map(expression => unwrapExpression(expression))\n .filter(ASTUtils.isIdentifier)\n .map(identifier => ({\n name: identifier.name,\n node: identifier\n }))\n);\n\n/**\n * Returns a type statement node when the given node represents a type declaration. It supports direct type\n * declarations and named export declarations that contain them. This helps callers normalize type statement\n * handling in a consistent way.\n *\n * @param node The node to inspect.\n * @returns The type statement node when found, otherwise null.\n *\n * @example\n * ```tsx\n * const typeNode = unwrapTypeStatement(node);\n * ```\n */\nexport const unwrapTypeStatement = (node: TSESTree.Node): TSESTree.Node | null => {\n if (node.type === 'TSInterfaceDeclaration' || node.type === 'TSTypeAliasDeclaration') {\n return node;\n }\n\n if (node.type === 'ExportNamedDeclaration' && node.declaration) {\n const {declaration} = node;\n\n if (declaration.type === 'TSInterfaceDeclaration' || declaration.type === 'TSTypeAliasDeclaration') {\n return node;\n }\n }\n\n return null;\n};\n\n/**\n * Sorts a list of items using a provided comparison function. It delegates to the native sort algorithm to\n * produce the ordering. This utility keeps comparison logic centralized while returning the sorted array.\n *\n * @param items The items to sort.\n * @param compare The comparison function used for sorting.\n * @returns The sorted items array.\n *\n * @example\n * ```tsx\n * const sorted = compareBy(items, (a, b) => a.value - b.value);\n * ```\n */\nexport const compareBy = <T>(items: T[], compare: (left: T, right: T) => number) => (\n items.sort(compare)\n);","import {ESLintUtils} from '@typescript-eslint/utils';\n\nimport {\n compareBy,\n getDependencyNames,\n isStyledBase,\n unwrapExpression,\n unwrapTypeStatement\n} from './utils/styled-components-order-utils';\n\nimport type {TSESLint, TSESTree} from '@typescript-eslint/utils';\n\nconst createRule = ESLintUtils.RuleCreator(\n name => `https://github.com/nfqde/eslint-config-nfq/blob/master/docs/rules/${name}.md`\n);\n\ntype MessageIds = 'dependencyOrder' | 'renderOrder';\n\ntype DefinitionInfo = {\n canFix: boolean;\n dependencies: {name: string; node: TSESTree.Identifier}[];\n groupFirst: TSESTree.Node;\n groupLast: TSESTree.Node;\n id: TSESTree.Identifier;\n index: number;\n name: string;\n};\n\nexport const styledComponentsOrder = createRule<[], MessageIds>({\n defaultOptions: [],\n meta: {\n docs: {description: 'Ensure styled component definitions follow their JSX render order.'},\n fixable: 'code',\n messages: {\n dependencyOrder: 'Define {{dependency}} before {{component}} because it is used in its styles.',\n renderOrder: 'Define {{name}} after {{previous}} to match JSX render order.'\n },\n schema: [],\n type: 'suggestion'\n },\n name: 'styled-components-order',\n /**\n * Creates the rule visitor set and initializes all tracking state.\n * This function wires together definition collection and render-order analysis.\n * It returns the listener map that ESLint uses to walk the AST.\n *\n * @param context The rule context provided by ESLint.\n * @returns The rule listener map for this rule.\n *\n * @example\n * ```tsx\n * const listeners = create(context);\n * ```\n */\n // eslint-disable-next-line max-lines-per-function\n create(context) {\n const {sourceCode} = context;\n const definitions = new Map<string, DefinitionInfo>();\n const renderOrder: string[] = [];\n const renderSet = new Set<string>();\n /**\n * Computes statement grouping and placement information for a variable declarator.\n * This helps keep related statements together when producing fixes.\n * It returns null when the node cannot be safely handled.\n *\n * @param node The variable declarator to analyze.\n * @returns The statement info or null if unavailable.\n *\n * @example\n * ```tsx\n * const info = getStatementInfo(node);\n * ```\n */\n const getStatementInfo = (node: TSESTree.VariableDeclarator) => {\n // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition\n if (node.parent?.type !== 'VariableDeclaration') {\n return null;\n }\n\n const declaration = node.parent;\n const statement = declaration.parent.type === 'ExportNamedDeclaration'\n ? declaration.parent\n : declaration;\n\n const parentNode = statement.parent;\n const body = 'body' in parentNode && Array.isArray(parentNode.body)\n ? parentNode.body\n : null;\n\n if (!body) {\n return null;\n }\n\n // @ts-expect-error\n const statementIndex = body.indexOf(statement);\n\n if (statementIndex === -1) {\n return null;\n }\n\n let groupFirst: TSESTree.Node = statement as TSESTree.Node;\n\n for (let i = statementIndex - 1; i >= 0; i -= 1) {\n const candidate = unwrapTypeStatement(body[i] as TSESTree.Node);\n\n if (!candidate) {\n break;\n }\n\n const gapText = sourceCode.text.slice(candidate.range[1], groupFirst.range[0]);\n\n if (gapText.trim()) {\n break;\n }\n\n groupFirst = candidate;\n }\n\n return {\n canFix: declaration.declarations.length === 1,\n groupFirst,\n groupLast: statement as TSESTree.Node,\n index: groupFirst.range[0]\n };\n };\n /**\n * Builds a single fix function that reorders definitions to a desired sequence.\n * This function validates that a safe, contiguous replacement can be made.\n * It returns null when the fix would be unsafe or unnecessary.\n *\n * @param current The current ordered definitions.\n * @param desired The desired ordered definitions.\n * @returns A fixer callback or null if no fix is possible.\n *\n * @example\n * ```tsx\n * const fix = buildReorderFix(current, desired);\n * ```\n */\n const buildReorderFix = (current: DefinitionInfo[], desired: DefinitionInfo[]) => {\n if (current.length !== desired.length) {\n return null;\n }\n\n if (current.every((definition, index) => definition === desired[index])) {\n return null;\n }\n\n if (current.some(definition => !definition.canFix)) {\n return null;\n }\n\n if (current.some(definition => sourceCode.getCommentsBefore(definition.groupFirst).length > 0)) {\n return null;\n }\n\n const parent = current[0]?.groupFirst.parent;\n\n if (!parent || current.some(definition => definition.groupFirst.parent !== parent)) {\n return null;\n }\n\n if (!('body' in parent) || !Array.isArray(parent.body)) {\n return null;\n }\n\n const body = parent.body as TSESTree.Node[];\n const groupEntries = current.map(definition => {\n const startIndex = body.indexOf(definition.groupFirst);\n const endIndex = body.indexOf(definition.groupLast);\n\n if (startIndex === -1 || endIndex === -1 || startIndex > endIndex) {\n return null;\n }\n\n return {\n definition,\n endIndex,\n startIndex\n };\n });\n\n if (groupEntries.some(entry => !entry)) {\n return null;\n }\n\n const ranges = groupEntries;\n const minIndex = Math.min(...ranges.map(entry => entry!.startIndex));\n const maxIndex = Math.max(...ranges.map(entry => entry!.endIndex));\n const covered = new Set<number>();\n\n ranges.forEach(entry => {\n for (let i = entry!.startIndex; i <= entry!.endIndex; i += 1) {\n covered.add(i);\n }\n });\n\n for (let i = minIndex; i <= maxIndex; i += 1) {\n if (!covered.has(i)) {\n return null;\n }\n }\n\n const minRange = Math.min(...current.map(definition => definition.groupFirst.range[0]));\n const maxRange = Math.max(...current.map(definition => definition.groupLast.range[1]));\n const desiredText = desired\n .map(definition => sourceCode.text.slice(definition.groupFirst.range[0], definition.groupLast.range[1]))\n .join('\\n\\n');\n\n return (fixer: TSESLint.RuleFixer) => [\n fixer.replaceTextRange([minRange, maxRange], desiredText)\n ];\n };\n\n /**\n * Records a styled component definition and its dependencies for later validation.\n * This function ignores non-styled or duplicate definitions.\n * It stores grouping and index data required for reporting and fixes.\n *\n * @param node The variable declarator to inspect.\n *\n * @example\n * ```tsx\n * recordDefinition(node);\n * ```\n */\n const recordDefinition = (node: TSESTree.VariableDeclarator) => {\n if (node.id.type !== 'Identifier') {\n return;\n }\n\n if (node.init?.type !== 'TaggedTemplateExpression') {\n return;\n }\n\n const tag = unwrapExpression(node.init.tag);\n\n if (!isStyledBase(tag)) {\n return;\n }\n\n const {name} = node.id;\n const statementInfo = getStatementInfo(node);\n\n if (!statementInfo) {\n return;\n }\n\n if (definitions.has(name)) {\n return;\n }\n\n definitions.set(name, {\n canFix: statementInfo.canFix,\n dependencies: getDependencyNames(node.init.quasi),\n groupFirst: statementInfo.groupFirst,\n groupLast: statementInfo.groupLast,\n id: node.id,\n index: statementInfo.index,\n name\n });\n };\n\n const listeners: TSESLint.RuleListener = {\n 'Program:exit': () => {\n const orderedDefinitions = Array.from(definitions.values()).sort((a, b) => a.index - b.index);\n const definitionIndex = new Map<string, number>();\n\n orderedDefinitions.forEach((definition, index) => {\n definitionIndex.set(definition.name, index);\n });\n\n const dependencyMap = new Map<string, Set<string>>();\n\n const renderIndex = new Map(renderOrder.map((name, index) => [name, index] as const));\n const graph = new Map<string, Set<string>>();\n const inDegree = new Map<string, number>();\n\n orderedDefinitions.forEach(definition => {\n graph.set(definition.name, new Set());\n inDegree.set(definition.name, 0);\n });\n\n orderedDefinitions.forEach(definition => {\n const deps = new Set(\n definition.dependencies\n .map(dep => dep.name)\n .filter(dep => definitionIndex.has(dep))\n );\n\n if (deps.size > 0) {\n dependencyMap.set(definition.name, deps);\n }\n\n deps.forEach(dep => {\n if (!graph.has(dep)) {\n graph.set(dep, new Set());\n }\n\n graph.get(dep)!.add(definition.name);\n inDegree.set(definition.name, (inDegree.get(definition.name) ?? 0) + 1);\n });\n });\n\n /**\n * Computes a tuple used to prioritize definitions during sorting.\n * This combines render order position with source order.\n * It returns a tuple that is stable and deterministic.\n *\n * @param definition The definition to prioritize.\n * @returns The priority tuple.\n *\n * @example\n * ```tsx\n * const priority = priorityFor(definition);\n * ```\n */\n const priorityFor = (definition: DefinitionInfo) => {\n const renderPos = renderIndex.get(definition.name);\n\n return [renderPos ?? Number.POSITIVE_INFINITY, definition.index] as const;\n };\n\n /**\n * Compares two definitions using their computed priority. This ensures render order wins over source order when available. It returns a standard sort comparator value.\n *\n * @param left The first definition to compare.\n * @param right The second definition to compare.\n * @returns A comparator number for sorting.\n *\n * @example\n * ```tsx\n * const result = byPriority(a, b);\n * ```\n */\n const byPriority = (left: DefinitionInfo, right: DefinitionInfo) => {\n const [leftRender, leftIndex] = priorityFor(left);\n const [rightRender, rightIndex] = priorityFor(right);\n\n if (leftRender !== rightRender) {\n return leftRender - rightRender;\n }\n\n return leftIndex - rightIndex;\n };\n\n const pending = orderedDefinitions.filter(definition => (inDegree.get(definition.name) ?? 0) === 0);\n const desiredOrder: DefinitionInfo[] = [];\n\n while (pending.length > 0) {\n compareBy(pending, byPriority);\n const next = pending.shift()!;\n\n desiredOrder.push(next);\n\n graph.get(next.name)?.forEach(dependent => {\n const nextDegree = (inDegree.get(dependent) ?? 0) - 1;\n\n inDegree.set(dependent, nextDegree);\n\n if (nextDegree === 0) {\n const dependentDefinition = definitions.get(dependent);\n\n if (dependentDefinition) {\n pending.push(dependentDefinition);\n }\n }\n });\n }\n\n const renderNames = renderOrder.filter(name => definitionIndex.has(name));\n const needsRenderOrder = renderNames.length > 0;\n const reorderFix = desiredOrder.length === orderedDefinitions.length\n ? buildReorderFix(orderedDefinitions, desiredOrder)\n : null;\n let fixUsed = false;\n\n /**\n * Attaches a fix only once, ensuring deterministic and safe fixes.\n * This function prevents multiple reports from emitting the same fixer.\n * It returns undefined when a fix cannot be attached.\n *\n * @param fix The candidate fix to attach.\n * @returns The fix or undefined.\n *\n * @example\n * ```tsx\n * const fix = attachFix(reorderFix);\n * ```\n */\n const attachFix = (fix: ReturnType<typeof buildReorderFix>) => {\n if (!fix || fixUsed) {\n return undefined;\n }\n\n fixUsed = true;\n\n return fix;\n };\n\n orderedDefinitions.forEach(definition => {\n const currentIndex = definitionIndex.get(definition.name);\n\n if (currentIndex === undefined) {\n return;\n }\n\n definition.dependencies.forEach(dep => {\n const depIndex = definitionIndex.get(dep.name);\n\n if (depIndex !== undefined && depIndex > currentIndex) {\n context.report({\n data: {\n component: definition.name,\n dependency: dep.name\n },\n fix: attachFix(reorderFix),\n messageId: 'dependencyOrder',\n node: dep.node\n });\n }\n });\n });\n\n const earlierRendered: string[] = [];\n let maxDefIndex = -1;\n let maxDefName = '';\n\n renderNames.forEach(name => {\n const currentIndex = definitionIndex.get(name);\n\n if (currentIndex === undefined) {\n return;\n }\n\n if (currentIndex < maxDefIndex) {\n const isDependencyForEarlier = earlierRendered\n .some(earlier => dependencyMap.get(earlier)?.has(name));\n\n if (!isDependencyForEarlier) {\n const definition = definitions.get(name);\n\n if (definition) {\n context.report({\n data: {\n name,\n previous: maxDefName\n },\n fix: needsRenderOrder ? attachFix(reorderFix) : undefined,\n messageId: 'renderOrder',\n node: definition.id\n });\n }\n }\n }\n\n if (currentIndex > maxDefIndex) {\n maxDefIndex = currentIndex;\n maxDefName = name;\n }\n\n earlierRendered.push(name);\n });\n },\n VariableDeclarator: recordDefinition,\n /**\n * Tracks JSX opening elements to derive render order.\n * This function records each component name once in first-seen order.\n * It ignores non-identifier element names.\n *\n * @param node The JSX opening element node.\n *\n * @example\n * ```tsx\n * listeners.JSXOpeningElement(node);\n * ```\n */\n JSXOpeningElement(node) {\n if (node.name.type !== 'JSXIdentifier') {\n return;\n }\n\n const {name} = node.name;\n\n if (!renderSet.has(name)) {\n renderSet.add(name);\n renderOrder.push(name);\n }\n }\n };\n\n return listeners;\n }\n});","import {componentFileStructure} from './component-file-structure';\nimport {componentSingleHook} from './component-single-hook';\nimport {cypressMountHook} from './cypress-mount-hook';\nimport {hexagonalDependencyDirection} from './hexagonal-dependency-direction';\nimport {noEmptyLinesInObjects} from './no-empty-lines-in-objects';\nimport {noEmptyLinesInTypes} from './no-empty-lines-in-types';\nimport {noMagicNumbers} from './no-magic-numbers';\nimport {noUnboundMethod} from './no-unbound-method';\nimport {objectPropertyNewline} from './object-property-newline';\nimport {requireGetCy} from './require-getcy';\nimport {sortKeys} from './sort-keys';\nimport {styledComponentsOrder} from './styled-components-order';\n\nexport const customRules = {\n rules: {\n 'component-file-structure': componentFileStructure,\n 'component-single-hook': componentSingleHook,\n 'cypress-mount-hook': cypressMountHook,\n 'hexagonal-dependency-direction': hexagonalDependencyDirection,\n 'no-empty-lines-in-objects': noEmptyLinesInObjects,\n 'no-empty-lines-in-types': noEmptyLinesInTypes,\n 'no-magic-numbers': noMagicNumbers,\n 'no-unbound-method': noUnboundMethod,\n 'object-property-newline': objectPropertyNewline,\n 'require-getcy': requireGetCy,\n 'sort-keys': sortKeys,\n 'styled-components-order': styledComponentsOrder\n }\n};","import * as pluginEmotion from '@emotion/eslint-plugin';\nimport pluginStylistic from '@stylistic/eslint-plugin';\n// @ts-expect-error\nimport pluginArrayFunc from 'eslint-plugin-array-func';\nimport pluginCypress from 'eslint-plugin-cypress';\nimport * as pluginImport from 'eslint-plugin-import';\nimport pluginJsDoc from 'eslint-plugin-jsdoc';\n// @ts-expect-error\nimport pluginJsxA11y from 'eslint-plugin-jsx-a11y';\nimport pluginNode from 'eslint-plugin-n';\n// @ts-expect-error\nimport pluginNoUnsanitized from 'eslint-plugin-no-unsanitized';\n// @ts-expect-error\nimport pluginPromise from 'eslint-plugin-promise';\nimport pluginReact from 'eslint-plugin-react';\nimport pluginReactHooks from 'eslint-plugin-react-hooks';\n// @ts-expect-error\nimport pluginRedos from 'eslint-plugin-redos';\n// @ts-expect-error\nimport pluginSecurity from 'eslint-plugin-security';\n// @ts-expect-error\nimport pluginSortDestructureKeys from 'eslint-plugin-sort-destructure-keys';\n// @ts-expect-error\nimport pluginStyledComponentsOrder from 'eslint-plugin-styled-components-order';\n\nimport {customRules} from '../rules/custom';\n\nexport const plugins: Record<string, any> = {\n '@emotion': pluginEmotion,\n '@nfq': customRules,\n '@stylistic': pluginStylistic,\n 'array-func': pluginArrayFunc,\n cypress: pluginCypress,\n import: pluginImport,\n jsdoc: pluginJsDoc,\n 'jsx-a11y': pluginJsxA11y,\n n: pluginNode,\n 'no-unsanitized': pluginNoUnsanitized,\n promise: pluginPromise,\n react: pluginReact,\n 'react-hooks': pluginReactHooks,\n redos: pluginRedos,\n security: pluginSecurity,\n 'sort-destructure-keys': pluginSortDestructureKeys,\n 'styled-components-order': pluginStyledComponentsOrder\n};","export const settings = {\n settings: {\n '@nfq': {ignoredProperties: ['xs', 'sm', 'md', 'lg', 'xl', 'xxl']},\n 'import/resolver': {\n alias: {\n extensions: [\n '.js',\n '.ts',\n '.cjs',\n '.mjs',\n '.cts',\n '.mts',\n '.jsx',\n '.tsx',\n '.json',\n '.css',\n '.png',\n '.jpeg',\n '.jpg',\n '.svg',\n '.webp'\n ]\n }\n },\n jsdoc: {\n ignoreInternal: false,\n ignorePrivate: false,\n maxLines: 1,\n minLines: 0,\n mode: 'typescript',\n tagNamePreference: {\n augments: 'extends',\n ignore: false\n }\n },\n linkComponents: ['Hyperlink', {\n linkAttribute: 'href',\n name: 'Link'\n }],\n react: {version: 'detect'}\n }\n};","import * as pluginEmotion from '@emotion/eslint-plugin';\nimport pluginStylistic from '@stylistic/eslint-plugin';\nimport pluginTS from '@typescript-eslint/eslint-plugin';\n// @ts-expect-error\nimport pluginArrayFunc from 'eslint-plugin-array-func';\nimport pluginCypress from 'eslint-plugin-cypress';\nimport * as pluginImport from 'eslint-plugin-import';\nimport pluginJsDoc from 'eslint-plugin-jsdoc';\n// @ts-expect-error\nimport pluginJsxA11y from 'eslint-plugin-jsx-a11y';\nimport pluginNode from 'eslint-plugin-n';\n// @ts-expect-error\nimport pluginNoUnsanitized from 'eslint-plugin-no-unsanitized';\n// @ts-expect-error\nimport pluginPromise from 'eslint-plugin-promise';\nimport pluginReact from 'eslint-plugin-react';\nimport pluginReactHooks from 'eslint-plugin-react-hooks';\n// @ts-expect-error\nimport pluginRedos from 'eslint-plugin-redos';\n// @ts-expect-error\nimport pluginSecurity from 'eslint-plugin-security';\n// @ts-expect-error\nimport pluginSortDestructureKeys from 'eslint-plugin-sort-destructure-keys';\n// @ts-expect-error\nimport pluginStyledComponentsOrder from 'eslint-plugin-styled-components-order';\n\nimport {customRules} from '../rules/custom';\n\nexport const tsPlugins: Record<string, any> = {\n '@emotion': pluginEmotion,\n '@nfq': customRules,\n '@stylistic': pluginStylistic,\n '@typescript-eslint': pluginTS,\n 'array-func': pluginArrayFunc,\n cypress: pluginCypress,\n import: pluginImport,\n jsdoc: pluginJsDoc,\n 'jsx-a11y': pluginJsxA11y,\n n: pluginNode,\n 'no-unsanitized': pluginNoUnsanitized,\n promise: pluginPromise,\n react: pluginReact,\n 'react-hooks': pluginReactHooks,\n redos: pluginRedos,\n security: pluginSecurity,\n 'sort-destructure-keys': pluginSortDestructureKeys,\n 'styled-components-order': pluginStyledComponentsOrder\n};","import * as tsParser from '@typescript-eslint/parser';\n\nimport {\n commonEslintRules,\n commonPluginRules,\n cypressPluginRules,\n cypressResets,\n nodeRules,\n reactPluginRules,\n tsRules,\n typescriptRuleResets\n} from './rules';\nimport {globals} from './settings/globals';\nimport {plugins} from './settings/plugins';\nimport {settings} from './settings/settings';\nimport {tsPlugins} from './settings/tsPlugins';\n\nexport const NFQEslintConfig = [\n settings,\n {\n files: ['**/*.{js,cjs,mjs,jsx}'],\n languageOptions: {\n ecmaVersion: 'latest',\n globals,\n parser: tsParser,\n parserOptions: {\n ecmaFeatures: {jsx: true},\n ecmaVersion: 'latest',\n project: '**/tsconfig*.json'\n }\n },\n linterOptions: {\n reportUnusedDisableDirectives: 'error',\n reportUnusedInlineConfigs: 'error'\n },\n name: 'NFQ ESLint JS Config',\n plugins,\n rules: {\n ...commonEslintRules,\n ...commonPluginRules,\n ...nodeRules,\n ...reactPluginRules\n }\n },\n {\n files: ['**/*.{ts,cts,mts,tsx}'],\n languageOptions: {\n ecmaVersion: 'latest',\n globals,\n parser: tsParser,\n parserOptions: {\n ecmaFeatures: {jsx: true},\n ecmaVersion: 'latest',\n project: '**/tsconfig*.json'\n }\n },\n linterOptions: {\n reportUnusedDisableDirectives: 'error',\n reportUnusedInlineConfigs: 'error'\n },\n name: 'NFQ ESLint TS Config',\n plugins: tsPlugins,\n rules: {\n ...commonEslintRules,\n ...commonPluginRules,\n ...nodeRules,\n ...reactPluginRules,\n ...tsRules,\n ...typescriptRuleResets\n }\n },\n {\n files: ['**/*.cy.{ts,cts,mts,tsx}'],\n languageOptions: {\n ecmaVersion: 'latest',\n globals,\n parser: tsParser,\n parserOptions: {\n ecmaFeatures: {jsx: true},\n ecmaVersion: 'latest',\n project: '**/tsconfig*.json'\n }\n },\n linterOptions: {\n reportUnusedDisableDirectives: 'error',\n reportUnusedInlineConfigs: 'error'\n },\n name: 'NFQ ESLint Cypress Config',\n plugins: tsPlugins,\n rules: {\n ...commonEslintRules,\n ...commonPluginRules,\n ...nodeRules,\n ...reactPluginRules,\n ...tsRules,\n ...typescriptRuleResets,\n ...cypressPluginRules,\n ...cypressResets\n }\n }\n];\n\nexport {globals, plugins, settings, tsPlugins};"],"names":["codeQuality","getWithoutSet","setWithoutGet","allowImplicit","camelcase","ignoreDestructuring","properties","curly","commentPattern","allowKeywords","considerPropertyDescriptor","includeCommonJSModuleExports","max","skipBlankLines","skipComments","IIFEs","capIsNew","capIsNewExceptions","newIsCap","newIsCapExceptions","allowElseIf","allow","ignorePattern","message","object","property","selector","defaultAssignment","allowShortCircuit","allowTaggedTemplates","allowTernary","allowAsStatement","location","terms","allowEmptyReject","caseSensitive","yoda","complexity","exceptMethods","ignorePropertyModificationsFor","props","errorPrevention","eqeqeq","checkLoops","radix","requireStringLiterals","modernJavaScript","requireReturnForObjectLiteral","paths","patterns","ignoreExport","ignoreImport","avoidExplicitReturnArrows","avoidQuotes","ignoreConstructors","allowNamedFunctions","allowUnboundThis","destructuring","ignoreReadBeforeAssign","AssignmentExpression","array","VariableDeclarator","enforceForRenamedProperties","ignoreCase","ignoreDeclarationSort","ignoreMemberSort","strictMode","strict","variables","concat","confusingBrowserGlobals","args","argsIgnorePattern","caughtErrors","ignoreRestSiblings","vars","classes","functions","commonEslintRules","arrayFunc","emotion","importRules","importFunctions","webpackChunknameFormat","eot","otf","ttf","woff","woff2","ignoreTypeImports","allowComputed","allowAnonymousClass","allowAnonymousFunction","allowArray","allowArrowFunction","allowLiteral","allowObject","maxDepth","Infinity","considerQueryString","devDependencies","optionalDependencies","commonjs","ignore","ignoreExports","missingExports","unusedExports","alphabetize","caseInsensitive","order","groups","pathGroups","group","pattern","position","pathGroupsExcludedImportTypes","jsdoc","tags","checkDestructured","checkRestProperty","enableFixer","noFinalLineText","noMultilineBlocks","noSingleLineBlocks","noZeroLineText","exemptedBy","contexts","publicOnly","require","ArrowFunctionExpression","ClassDeclaration","ClassExpression","FunctionDeclaration","FunctionExpression","MethodDefinition","checkDestructuredRoots","enableRestElementFixer","enableRootFixer","unnamedRootBase","useDefaultObjectProperties","startLines","nfq","detectObjects","enforceConst","ignoreArrayIndexes","ignoreArrays","ignoreClassFieldInitialValues","ignoreConstDeclarations","ignoreDefaultValues","ignoreFunctions","decoratorNames","ignorePropTypes","methodsExtra","natural","promise","redos","cache","checker","ignoreErrors","permittableComplexities","timeout","sanitize","security","stylistic","after","before","allowSingleLine","exceptions","ArrayExpression","ArrayPattern","CallExpression","ImportDeclaration","NewExpression","ObjectExpression","ObjectPattern","VariableDeclaration","arguments","flatTernaryExpressions","body","parameters","ignoreComments","ignoredNodes","outerIIFEBody","SwitchCase","afterColon","beforeColon","mode","applyDefaultPatterns","exceptAfterSingleLine","code","ignoreRegExpLiterals","ignoreTemplateLiterals","ignoreUrls","multiline","delimiter","requireLast","multilineDetection","singleline","ignoreChainWithDepth","allowParens","allowSamePrecedence","maxBOF","maxEOF","overrides","ExportDeclaration","consistent","minProperties","TSEnumBody","TSInterfaceBody","TSTypeLiteral","blankLine","next","prev","keywords","numbers","unnecessary","avoidEscape","anonymous","asyncArrow","named","nonwords","words","block","balanced","markers","line","functionPrototypeMethods","commonPluginRules","cypress","nfqPluginRules","cypressPluginRules","cypressResets","nodeRules","ignores","SPACE_INDENT","reactRules","allowAfterSuper","allowAfterThis","enforceInMethodNames","propTypeNames","rule","button","reset","submit","allowRequiredDefaults","ignoreTranspilerName","forbid","allowInPropTypes","checkChildContextTypes","checkContextTypes","namedComponents","unnamedComponents","always","children","allowMultiline","extensions","eventHandlerPrefix","eventHandlerPropPrefix","checkAttributes","indentLogicalExpressions","checkFragmentShorthand","checkKeyMustBeforeSpread","warnOnDuplicates","maximum","when","prevent","allowArrowFunctions","allowBind","allowFunctions","ignoreDOMComponents","ignoreRefs","noStrings","name","enforceDynamicLinks","allowGlobals","allowAllCaps","custom","explicitSpread","html","callbacksLast","noSortAlphabetically","reservedFirst","shorthandFirst","shorthandLast","afterOpening","beforeClosing","beforeSelfClosing","closingSlash","arrow","assignment","condition","declaration","logical","prop","return","ignoreStateless","checkAliases","customValidators","skipShapeProps","ignorePureComponents","skipUndeclared","forbidDefaultForRequired","allowDecorators","lifecycle","rendering","requiredFirst","sortShapeProp","reactA11y","area","elements","img","components","aspects","specialLink","ignoreNonDom","assert","controlComponents","depth","labelAttributes","labelComponents","audio","track","video","ignoreNonDOM","tr","handlers","li","ol","table","td","ul","roles","reactHooks","reactPluginRules","eslint","react","typescriptRuleResets","nfqRules","tsEslint","default","assertionStyle","disallowTypeAnnotations","prefer","accessibility","interfaces","typeLiterals","checksVoidReturn","allowDeclarations","allowDefinitionFiles","allowedNames","checkIntersections","allowDefaultCaseForExhaustiveSwitch","considerDefaultExhaustiveForUnions","tsRules","globals","afterEach","beforeEach","chai","Chai","context","cy","Cypress","describe","it","JQuery","JSX","NodeJS","globalsEslint","browser","node","builtin","es2026","unwrapExpression","expression","current","type","isUppercaseName","test","COMPONENT_WRAPPERS","Set","isComponentWrapperCall","callee","has","getFunctionFromExpression","argument","nested","containsJsx","stack","length","pop","key","Object","keys","value","Array","isArray","item","push","isComponentSuperclass","isClassComponent","superClass","renderMethod","find","member","getSuperclassPropsType","withSuperParams","superParams","superTypeArguments","superTypeParameters","params","getTypeArguments","withTypeArgs","typeArgs","typeArguments","typeParameters","isForwardRefCallee","getForwardRefPropsType","getComponentInfoFromStatement","id","componentTypeNode","returnType","typeAnnotation","propsTypeNode","statement","declarator","declarations","ASTUtils","isIdentifier","init","functionNode","initPropsType","forwardRefPropsType","isDisplayNameAssignment","componentName","left","isComponentExport","specifiers","some","specifier","local","exported","isDefaultComponentExport","Boolean","isStyledDeclaration","isStyledTagExpression","tag","STYLED_FACTORY_NAMES","isStyledFactory","isStyledFactoryDeclaration","getTypeDeclarationInfo","collectTypeReferences","typeNode","names","typeName","add","createRule","ESLintUtils","RuleCreator","ORDER_LABELS","ORDER_MESSAGE","join","getSectionLabel","section","PAGE_TYPE_NAMES","componentFileStructure","defaultOptions","meta","docs","description","messages","invalidOrder","missingDisplayName","missingNamedExport","schema","create","sourceCode","programBody","ast","componentCandidates","filter","map","info","componentInfo","sort","right","range","typeDeclarations","Map","set","propsTypeNames","propsTypeRefs","isPageType","typeRefs","from","isPageLayoutAssignment","hasDefaultExport","hasLayoutAssignment","isPageComponent","hasStaticDisplayName","hasDisplayNameMember","static","isPropsTypeDeclaration","isNonPropsTypeDeclaration","isOptionalVarDeclaration","sectionForStatement","getStatementName","first","Program","lastSection","lastSectionName","hasDisplayName","hasNamedExport","report","data","currentName","previous","previousName","messageId","isHookCallee","startsWith","getComponentInfos","getHookCallFromStatement","isGuardClause","alternate","consequent","hasReturnStatement","componentSingleHook","invalidStatement","tooManyHooks","componentInfos","component","statements","hasReturn","hookCount","hookCall","isHookCall","isCyCommandCall","command","isMountHookCall","isThenCall","target","getThenChain","mountCall","thens","parent","getHookCallFromArrow","checkHookArguments","messageIds","allowedHookCalls","errors","isHooks","missingHooksArgs","invalidHookArgument","arg","hasWrapValues","wrapCall","containsMockComponent","openingElement","child","hasMountWithMock","hasAssertionCall","isAllowedFirstThenStatement","walk","visitor","isItCall","isThenCallbackValid","callback","param","isValuesGetCall","isValuesItsCall","hasValuesCurrentInChain","isCurrent","isValuesInvokeCall","hasValuesInvokeInCallback","found","checkFirstThenBody","needs","hasAssertion","hasInvalidOrder","hasInvalidStatement","hasMount","hasWrap","wrapIndex","mountIndex","index","cypressMountHook","assertionInFirstThen","invalidFirstThenStatement","invalidThenOrder","missingFirstThen","missingMount","missingSecondThen","missingThenAfterInvoke","missingThenDestructure","missingThenWrap","unwrappedHook","hookCalls","mountCalls","result","hasHookArgErrors","error","firstThen","validCallback","firstThenValid","secondThen","secondCallback","toPosix","replace","stripDrive","normalizePath","normalized","path","posix","normalize","withoutDrive","ensureTrailingSlash","endsWith","buildAliasMap","aliases","alias","aliasPath","readAliasesFromSettings","settings","resolver","resolveAliasImport","source","aliasMap","entries","slice","resolveRelativeImport","filename","normalizedFile","dir","split","getLayer","resolvedPath","pathValue","pathWithSlash","contains","includes","isClientLayer","layer","isServerLayer","isDomainLayer","isClientUtils","isServerUtils","isConfigLayer","isMobxStoreFile","program","hasMakeAutoObservable","usesMakeAutoObservable","imported","requiredAliases","hexagonalDependencyDirection","apiImport","clientApiImport","crossBoundary","domainImport","domainUtilsImport","missingServiceClass","missingServiceImplements","serverDirection","uiApplicationImport","missing","currentLayer","isClient","isServer","reportInvalidService","classNode","implements","resolveImport","aliasResolved","checkImport","resolved","targetLayer","allowed","noEmptyLinesInObjects","fixable","noEmptyLine","reportGap","startToken","endToken","startIndex","endLineStartIndex","getIndexFromLoc","column","loc","start","gapText","text","indent","sourceText","scanIndex","fixStartIndex","Math","fix","fixer","replaceTextRange","checkBlockMembers","members","leftBrace","getFirstToken","rightBrace","getLastToken","memberItems","memberTokens","getTokens","end","memberRanges","commentItems","getTokensBetween","includeComments","token","comment","items","a","b","i","listeners","objectNode","noEmptyLinesInTypes","interfaceNode","typeLiteralNode","getStaticPropertyName","String","expressions","quasis","cooked","isComputed","computed","checkText","actual","expected","skipChainExpression","isNumericLiteral","isSpecificId","isSpecificMemberAccess","objectName","propertyName","checkNode","actualPropertyName","normalizeIgnoreValue","BigInt","MAX_ARRAY_LENGTH","noMagicNumbers","noMagic","useConst","additionalProperties","anyOf","uniqueItems","config","options","okTypes","AST_NODE_TYPES","Property","isIgnoredValue","isDefaultValue","fullNumberNode","AssignmentPattern","isClassFieldInitialValue","PropertyDefinition","isParseIntRadix","isJSXNumber","isArrayIndex","MemberExpression","Number","isInteger","isConstValue","kind","shouldIgnoreFunctions","shouldIgnoreArrays","Literal","numericValue","raw","UnaryExpression","operator","Identifier","DEFAULT_DECORATORS","normalizeDecoratorNames","trim","getDecoratorName","decorator","ts","isCallExpression","isPropertyAccessExpression","methodUsesThis","visit","SyntaxKind","ThisKeyword","forEachChild","ChainExpression","TSNonNullExpression","TSAsExpression","TSTypeAssertion","unwrapUsage","isThisBindCall","grandParent","firstArg","ThisExpression","isCallbackUsage","JSXExpressionContainer","JSXAttribute","ReturnStatement","noUnboundMethod","constructorBind","unboundMethod","services","getParserServices","getTypeChecker","decoratorLabel","methodCache","reportCache","aliasCache","memberSymbolCache","classAutoBindCache","WeakMap","isAutoBindOption","isObjectLiteralExpression","isPropertyAssignment","isStringLiteral","initializer","TrueKeyword","isMakeAutoObservableCallee","hasAutoBindInConstructor","classDecl","cached","get","undefined","ctor","isConstructorDeclaration","isExpressionStatement","expr","hasAutoBind","resolveSymbol","symbol","flags","SymbolFlags","Alias","getAliasedSymbol","getMethodInfo","aliased","Method","Function","GetAccessor","SetAccessor","getDeclarations","methodDecl","decl","isMethodDeclaration","isClassLike","getCombinedModifierFlags","isStatic","ModifierFlags","Static","decorators","canHaveDecorators","getDecorators","hasDecorator","autoBind","usesThis","shouldReportSymbol","shouldReport","getSymbolForMember","tsNode","esTreeNodeToTSNodeMap","getSymbolAtLocation","isElementAccessExpression","argumentExpression","isStringLiteralLike","reportConstructorBinding","methodName","decoratorName","constructorBody","ExpressionStatement","DEFAULT_SCREEN_SIZES","objectPropertyNewline","allowAllPropertiesOnSameLine","allowMultiplePropertiesPerLine","ignoredProperties","propertiesOnNewline","propertiesOnNewlineAll","shared","allowSameLine","isScreenSizeProperty","firstToken","lastToken","every","curr","lastTokenOfPrevious","firstTokenOfCurrent","comma","getTokenBefore","rangeAfterComma","isCypressCommandsObject","isGetCyRegistration","nameArg","isCyGetCall","isAliasGetCall","requireGetCy","useGetCy","isInsideGetCyRegistration","isValidOrders","asc","ascF","method","ascI","toLowerCase","ascIF","ascIN","naturalCompare","ascINF","ascN","ascNF","desc","descF","descI","descIF","descIN","descINF","descN","descNF","getPropertyName","staticName","astUtils","sortKeys","ignoredPropertiesOrder","outOfOrder","enum","ignoredPropertySet","ignoredOrderIndex","insensitive","natual","orderFuncKey","isValidOrder","isIgnoredOnlyObject","SpreadElement","prevName","ExperimentalSpreadProperty","upper","ignoreSort","prevNode","thisName","prevIndex","thisIndex","fixes","moveProperty","fromNode","toNode","prevText","getText","thisComments","getCommentsBefore","thisComment","insertTextBefore","remove","replaceText","methods","isStyledBase","getDependencyNames","template","identifier","unwrapTypeStatement","compareBy","compare","styledComponentsOrder","dependencyOrder","renderOrder","definitions","renderSet","getStatementInfo","parentNode","statementIndex","indexOf","groupFirst","candidate","canFix","groupLast","buildReorderFix","desired","definition","groupEntries","endIndex","entry","ranges","minIndex","min","maxIndex","covered","forEach","minRange","maxRange","desiredText","recordDefinition","statementInfo","dependencies","quasi","Program:exit","orderedDefinitions","values","definitionIndex","dependencyMap","renderIndex","graph","inDegree","deps","dep","size","priorityFor","renderPos","POSITIVE_INFINITY","byPriority","leftRender","leftIndex","rightRender","rightIndex","pending","desiredOrder","shift","dependent","nextDegree","dependentDefinition","renderNames","needsRenderOrder","reorderFix","fixUsed","attachFix","currentIndex","depIndex","dependency","earlierRendered","maxDefIndex","maxDefName","isDependencyForEarlier","earlier","JSXOpeningElement","customRules","rules","plugins","pluginEmotion","pluginStylistic","pluginArrayFunc","pluginCypress","import","pluginImport","pluginJsDoc","pluginJsxA11y","n","pluginNode","pluginNoUnsanitized","pluginPromise","pluginReact","pluginReactHooks","pluginRedos","pluginSecurity","pluginSortDestructureKeys","pluginStyledComponentsOrder","ignoreInternal","ignorePrivate","maxLines","minLines","tagNamePreference","augments","linkComponents","linkAttribute","version","tsPlugins","pluginTS","NFQEslintConfig","files","languageOptions","ecmaVersion","parser","tsParser","parserOptions","ecmaFeatures","jsx","project","linterOptions","reportUnusedDisableDirectives","reportUnusedInlineConfigs"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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GAAGqJ,iBAAiB;AACpB,IAAA,GAAGK,SAAS;AACZ,IAAA,GAAGqG,gBAAgB;AACnB,IAAA,GAAGoB,OAAO;AACV,IAAA,GAAGjB,oBAAoB;AACvB,IAAA,GAAG1G,kBAAkB;IACrB,GAAGC;AACP;AACJ,CAAC;;;;;;;;"}
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../src/rules/common/eslint/code-quality.ts","../src/rules/common/eslint/complexity.ts","../src/rules/common/eslint/error-prevention.ts","../src/rules/common/eslint/modern-javascript.ts","../src/rules/common/eslint/strict-mode.ts","../src/rules/common/eslint/variables.ts","../src/rules/common/eslint/index.ts","../src/rules/common/plugins/array-func.ts","../src/rules/common/plugins/emotion.ts","../src/rules/common/plugins/import.ts","../src/rules/common/plugins/jsdoc.ts","../src/rules/common/plugins/nfq.ts","../src/rules/common/plugins/promise.ts","../src/rules/common/plugins/redos.ts","../src/rules/common/plugins/sanitize.ts","../src/rules/common/plugins/security.ts","../src/rules/common/plugins/stylistic.ts","../src/rules/common/plugins/index.ts","../src/rules/cypress/plugins/cypress.ts","../src/rules/cypress/plugins/nfq.ts","../src/rules/cypress/plugins/index.ts","../src/rules/cypress/overrides/resets.ts","../src/rules/node/plugins/node.ts","../src/rules/react/plugins/nfq.ts","../src/rules/react/plugins/react.ts","../src/rules/react/plugins/react-a11y.ts","../src/rules/react/plugins/react-hooks.ts","../src/rules/react/plugins/index.ts","../src/rules/typescript/overrides/eslint.ts","../src/rules/typescript/overrides/react.ts","../src/rules/typescript/overrides/security.ts","../src/rules/typescript/overrides/index.ts","../src/rules/typescript/plugins/nfq.ts","../src/rules/typescript/plugins/ts-eslint.ts","../src/rules/typescript/plugins/index.ts","../src/rules/storybook/overrides/resets.ts","../src/settings/globals.ts","../src/rules/custom/utils/expression-utils.ts","../src/rules/custom/utils/component-utils.ts","../src/rules/custom/utils/component-file-structure-utils.ts","../src/rules/custom/component-file-structure.ts","../src/rules/custom/utils/hook-utils.ts","../src/rules/custom/utils/component-single-hook-utils.ts","../src/rules/custom/component-single-hook.ts","../src/rules/custom/utils/cypress-mount-hook-utils.ts","../src/rules/custom/cypress-mount-hook.ts","../src/rules/custom/utils/hexagonal-dependency-direction-utils.ts","../src/rules/custom/hexagonal-dependency-direction.ts","../src/rules/custom/no-empty-lines-in-objects.ts","../src/rules/custom/no-empty-lines-in-types.ts","../src/rules/custom/utils/ast-utils.ts","../src/rules/custom/utils/no-magic-numbers-utils.ts","../src/rules/custom/no-magic-numbers.ts","../src/rules/custom/utils/no-unbound-method-utils.ts","../src/rules/custom/no-unbound-method.ts","../src/rules/custom/object-property-newline.ts","../src/rules/custom/utils/require-getcy-utils.ts","../src/rules/custom/require-getcy.ts","../src/rules/custom/utils/isValidOrders.ts","../src/rules/custom/utils/sort-keys-utils.ts","../src/rules/custom/sort-keys.ts","../src/rules/custom/utils/styled-components-order-utils.ts","../src/rules/custom/styled-components-order.ts","../src/rules/custom/index.ts","../src/settings/plugins.ts","../src/settings/settings.ts","../src/settings/tsPlugins.ts","../src/index.ts"],"sourcesContent":["export const codeQuality = {\n 'accessor-pairs': [\n 'error',\n {\n getWithoutSet: false,\n setWithoutGet: true\n }\n ],\n 'array-callback-return': ['error', {allowImplicit: true}],\n 'block-scoped-var': 'error',\n camelcase: [\n 'error',\n {\n ignoreDestructuring: false,\n properties: 'always'\n }\n ],\n 'consistent-return': 'error',\n 'consistent-this': ['error', 'self'],\n curly: ['error', 'multi-line', 'consistent'],\n 'default-case': ['warn', {commentPattern: '^no default$'}],\n 'default-param-last': 'error',\n 'dot-notation': ['error', {allowKeywords: true}],\n 'func-name-matching': [\n 'off',\n 'always',\n {\n considerPropertyDescriptor: true,\n includeCommonJSModuleExports: false\n }\n ],\n 'func-names': ['warn', 'as-needed'],\n 'func-style': ['off', 'expression'],\n 'guard-for-in': 'warn',\n 'id-denylist': 'off',\n 'id-length': 'off',\n 'id-match': 'off',\n 'max-depth': ['error', {max: 5}],\n 'max-lines': [\n 'error',\n {\n max: 500,\n skipBlankLines: true,\n skipComments: true\n }\n ],\n 'max-lines-per-function': [\n 'warn',\n {\n IIFEs: true,\n max: 200,\n skipBlankLines: true,\n skipComments: true\n }\n ],\n 'max-nested-callbacks': 'off',\n 'max-statements': ['off', {max: 10}],\n 'multiline-comment-style': ['off', 'starred-block'],\n 'new-cap': [\n 'error',\n {\n capIsNew: false,\n capIsNewExceptions: ['Immutable.Map', 'Immutable.Set', 'Immutable.List'],\n newIsCap: true,\n newIsCapExceptions: []\n }\n ],\n 'no-alert': 'error',\n 'no-array-constructor': 'error',\n 'no-bitwise': 'error',\n 'no-caller': 'error',\n 'no-case-declarations': 'error',\n 'no-console': 'warn',\n 'no-constructor-return': 'off',\n 'no-continue': 'off',\n 'no-div-regex': 'error',\n 'no-else-return': ['error', {allowElseIf: true}],\n 'no-empty-function': ['error', {allow: ['arrowFunctions', 'methods', 'asyncMethods']}],\n 'no-empty-pattern': 'error',\n 'no-eq-null': 'error',\n 'no-extend-native': 'error',\n 'no-extra-bind': 'error',\n 'no-extra-label': 'error',\n 'no-fallthrough': 'error',\n 'no-implicit-coercion': 'error',\n 'no-implicit-globals': 'error',\n 'no-inline-comments': [\n 'error',\n {ignorePattern: '(@type|css) .+'}\n ],\n 'no-invalid-this': 'error',\n 'no-iterator': 'error',\n 'no-labels': 'error',\n 'no-lone-blocks': 'error',\n 'no-lonely-if': 'error',\n 'no-loop-func': 'error',\n 'no-multi-assign': 'error',\n 'no-multi-str': 'error',\n 'no-negated-condition': 'error',\n 'no-nested-ternary': 'error',\n 'no-new': 'error',\n 'no-new-func': 'error',\n 'no-new-object': 'error',\n 'no-new-wrappers': 'error',\n 'no-octal': 'error',\n 'no-octal-escape': 'error',\n 'no-plusplus': 'off',\n 'no-proto': 'error',\n 'no-restricted-properties': [\n 'error',\n {\n message: 'arguments.callee is deprecated',\n object: 'arguments',\n property: 'callee'\n },\n {\n message: 'Please use Number.isFinite instead',\n object: 'global',\n property: 'isFinite'\n },\n {\n message: 'Please use Number.isFinite instead',\n object: 'self',\n property: 'isFinite'\n },\n {\n message: 'Please use Number.isFinite instead',\n object: 'window',\n property: 'isFinite'\n },\n {\n message: 'Please use Number.isNaN instead',\n object: 'global',\n property: 'isNaN'\n },\n {\n message: 'Please use Number.isNaN instead',\n object: 'self',\n property: 'isNaN'\n },\n {\n message: 'Please use Number.isNaN instead',\n object: 'window',\n property: 'isNaN'\n },\n {\n message: 'Please use Object.defineProperty instead.',\n property: '__defineGetter__'\n },\n {\n message: 'Please use Object.defineProperty instead.',\n property: '__defineSetter__'\n },\n {\n message: 'Use the exponentiation operator (**) instead.',\n object: 'Math',\n property: 'pow'\n }\n ],\n 'no-restricted-syntax': [\n 'error',\n {\n message: 'Labels are a form of GOTO; using them makes code confusing and hard to maintain'\n + ' and understand.',\n selector: 'LabeledStatement'\n },\n {\n message: '`with` is disallowed in strict mode because it makes code'\n + ' impossible to predict and optimize.',\n selector: 'WithStatement'\n }\n ],\n 'no-return-assign': ['error', 'except-parens'],\n 'no-return-await': 'error',\n 'no-script-url': 'error',\n 'no-sequences': 'error',\n 'no-ternary': 'off',\n 'no-unneeded-ternary': [\n 'error',\n {defaultAssignment: false}\n ],\n 'no-unused-expressions': [\n 'error',\n {\n allowShortCircuit: true,\n allowTaggedTemplates: false,\n allowTernary: true\n }\n ],\n 'no-unused-labels': 'error',\n 'no-useless-call': 'error',\n 'no-useless-concat': 'error',\n 'no-useless-escape': 'error',\n 'no-useless-return': 'error',\n 'no-void': ['error', {allowAsStatement: true}],\n 'no-warning-comments': [\n 'off',\n {\n location: 'start',\n terms: [\n 'todo',\n 'fixme',\n 'xxx'\n ]\n }\n ],\n 'no-with': 'error',\n 'one-var': ['off', 'never'],\n 'operator-assignment': ['error', 'always'],\n 'prefer-exponentiation-operator': 'error',\n 'prefer-named-capture-group': 'off',\n 'prefer-object-spread': 'error',\n 'prefer-promise-reject-errors': ['error', {allowEmptyReject: true}],\n 'prefer-regex-literals': 'error',\n 'require-await': 'off',\n 'require-unicode-regexp': 'error',\n 'sort-destructure-keys/sort-destructure-keys': ['error', {caseSensitive: false}],\n 'sort-vars': 'error',\n 'unicode-bom': ['error', 'never'],\n yoda: 'error'\n};","/* eslint-disable no-inline-comments */\nexport const complexity = {\n 'class-methods-use-this': ['off', {exceptMethods: []}],\n complexity: ['warn', {max: 20}],\n 'max-classes-per-file': ['error', 1],\n 'no-param-reassign': [\n 'error',\n {\n ignorePropertyModificationsFor: [\n '$scope', // for Angular 1 scopes\n 'acc', // for reduce accumulators\n 'accumulator', // for reduce accumulators\n 'ctx', // for Koa routing\n 'descriptor', // for decorators\n 'e', // for e.returnvalue\n 'item', // array foreach\n 'key', // for reduce key value pairs\n 'req', // for Express requests\n 'request', // for Express requests\n 'res', // for Express responses\n 'response', // for Express responses\n 'staticContext', // for ReactRouter context\n 'value' // for reduce key value pairs\n ],\n props: true\n }\n ],\n 'vars-on-top': 'error'\n};","export const errorPrevention = {\n eqeqeq: ['error', 'always'],\n 'for-direction': 'error',\n 'getter-return': ['error', {allowImplicit: false}],\n 'no-async-promise-executor': 'error',\n 'no-await-in-loop': 'warn',\n 'no-compare-neg-zero': 'error',\n 'no-cond-assign': 'error',\n 'no-constant-condition': ['warn', {checkLoops: false}],\n 'no-control-regex': 'error',\n 'no-debugger': 'error',\n 'no-dupe-args': 'error',\n 'no-dupe-else-if': 'error',\n 'no-dupe-keys': 'error',\n 'no-duplicate-case': 'error',\n 'no-empty-character-class': 'error',\n 'no-eval': 'error',\n 'no-ex-assign': 'error',\n 'no-extra-boolean-cast': 'error',\n 'no-func-assign': 'error',\n 'no-global-assign': 'error',\n 'no-implied-eval': 'error',\n 'no-import-assign': 'error',\n 'no-inner-declarations': 'error',\n 'no-invalid-regexp': 'error',\n 'no-irregular-whitespace': 'error',\n 'no-misleading-character-class': 'error',\n 'no-obj-calls': 'error',\n 'no-prototype-builtins': 'error',\n 'no-redeclare': 'error',\n 'no-regex-spaces': 'error',\n 'no-self-assign': ['error', {props: true}],\n 'no-self-compare': 'error',\n 'no-setter-return': 'error',\n 'no-sparse-arrays': 'error',\n 'no-template-curly-in-string': 'error',\n 'no-throw-literal': 'error',\n 'no-unexpected-multiline': 'error',\n 'no-unmodified-loop-condition': 'error',\n 'no-unreachable': 'error',\n 'no-unsafe-finally': 'error',\n 'no-unsafe-negation': 'error',\n 'no-useless-catch': 'error',\n radix: ['error', 'always'],\n 'require-atomic-updates': 'off',\n 'use-isnan': 'error',\n 'valid-typeof': ['error', {requireStringLiterals: true}]\n};","export const modernJavaScript = {\n 'arrow-body-style': ['error', 'as-needed', {requireReturnForObjectLiteral: false}],\n 'constructor-super': 'error',\n 'no-class-assign': 'error',\n 'no-const-assign': 'error',\n 'no-dupe-class-members': 'error',\n 'no-new-symbol': 'error',\n 'no-restricted-imports': [\n 'off',\n {\n paths: [],\n patterns: []\n }\n ],\n 'no-this-before-super': 'error',\n 'no-useless-computed-key': 'error',\n 'no-useless-constructor': 'error',\n 'no-useless-rename': [\n 'error',\n {\n ignoreDestructuring: false,\n ignoreExport: false,\n ignoreImport: false\n }\n ],\n 'no-var': 'error',\n 'object-shorthand': [\n 'error',\n 'always',\n {\n avoidExplicitReturnArrows: true,\n avoidQuotes: true,\n ignoreConstructors: false\n }\n ],\n 'prefer-arrow-callback': [\n 'error',\n {\n allowNamedFunctions: false,\n allowUnboundThis: true\n }\n ],\n 'prefer-const': [\n 'error',\n {\n destructuring: 'any',\n ignoreReadBeforeAssign: true\n }\n ],\n 'prefer-destructuring': [\n 'error',\n {\n AssignmentExpression: {\n array: true,\n object: false\n },\n VariableDeclarator: {\n array: false,\n object: true\n }\n },\n {enforceForRenamedProperties: false}\n ],\n 'prefer-numeric-literals': 'error',\n 'prefer-rest-params': 'error',\n 'prefer-spread': 'error',\n 'prefer-template': 'error',\n 'require-yield': 'error',\n 'sort-imports': [\n 'error',\n {\n ignoreCase: true,\n ignoreDeclarationSort: true,\n ignoreMemberSort: false\n }\n ],\n 'symbol-description': 'error'\n};","export const strictMode = {\n strict: [\n 'error',\n 'never'\n ]\n};","// @ts-expect-error\nimport confusingBrowserGlobals from 'confusing-browser-globals';\n\nexport const variables = {\n 'init-declarations': 'off',\n 'no-delete-var': 'error',\n 'no-label-var': 'error',\n 'no-restricted-globals': ['error', 'isFinite', 'isNaN'].concat(confusingBrowserGlobals as ConcatArray<string>),\n 'no-shadow': 'error',\n 'no-shadow-restricted-names': 'error',\n 'no-undef': 'error',\n 'no-undef-init': 'error',\n 'no-undefined': 'error',\n 'no-unused-vars': [\n 'error',\n {\n args: 'after-used',\n argsIgnorePattern: '^e$',\n caughtErrors: 'none',\n ignoreRestSiblings: true,\n vars: 'all'\n }\n ],\n 'no-use-before-define': [\n 'error',\n {\n classes: false,\n functions: false,\n variables: false\n }\n ]\n};","import {codeQuality} from './code-quality';\nimport {complexity} from './complexity';\nimport {errorPrevention} from './error-prevention';\nimport {modernJavaScript} from './modern-javascript';\nimport {strictMode} from './strict-mode';\nimport {variables} from './variables';\n\nexport const commonEslintRules = {\n ...errorPrevention,\n ...codeQuality,\n ...modernJavaScript,\n ...complexity,\n ...variables,\n ...strictMode\n};\n\nexport {\n codeQuality,\n complexity,\n errorPrevention,\n modernJavaScript,\n strictMode,\n variables\n};","export const arrayFunc = {\n 'array-func/avoid-reverse': 'error',\n 'array-func/from-map': 'error',\n 'array-func/no-unnecessary-this-arg': 'error',\n 'array-func/prefer-array-from': 'error',\n 'array-func/prefer-flat': 'error',\n 'array-func/prefer-flat-map': 'error'\n};","export const emotion = {\n '@emotion/jsx-import': 'off',\n '@emotion/no-vanilla': 'error',\n '@emotion/styled-import': 'error',\n '@emotion/syntax-preference': ['error', 'string'],\n 'styled-components-order/sort-declarations-alphabetically': 'error'\n};","/* eslint-disable no-inline-comments */\nexport const importRules = {\n 'import/default': 2,\n 'import/dynamic-import-chunkname': [\n 2,\n {\n importFunctions: [],\n webpackChunknameFormat: '[0-9a-zA-Z-_/.]+'\n }\n ],\n 'import/export': 2,\n 'import/exports-last': 0,\n 'import/extensions': [\n 2,\n 'never',\n {\n eot: 'always',\n otf: 'always',\n ttf: 'always',\n woff: 'always',\n woff2: 'always'\n }\n ],\n 'import/first': 2,\n 'import/group-exports': 0,\n 'import/max-dependencies': [\n 1,\n {\n ignoreTypeImports: true,\n max: 20\n }\n ],\n 'import/named': 2,\n 'import/namespace': [2, {allowComputed: true}],\n 'import/newline-after-import': 2,\n 'import/no-absolute-path': 2,\n 'import/no-amd': 2,\n 'import/no-anonymous-default-export': [\n 0,\n {\n allowAnonymousClass: false,\n allowAnonymousFunction: false,\n allowArray: false,\n allowArrowFunction: false,\n allowLiteral: false,\n allowObject: false\n }\n ],\n 'import/no-commonjs': 0,\n 'import/no-cycle': [\n 0,\n {maxDepth: Infinity}\n ],\n 'import/no-default-export': 0,\n 'import/no-deprecated': 1,\n 'import/no-duplicates': ['error', {considerQueryString: true}],\n 'import/no-dynamic-require': 0,\n 'import/no-extraneous-dependencies': [\n 0,\n {\n devDependencies: [\n 'test/**', // tape, common npm pattern\n 'tests/**', // also common npm pattern\n 'spec/**', // mocha, rspec-like pattern\n '**/__tests__/**', // jest pattern\n '**/__mocks__/**', // jest pattern\n 'test.{js,jsx}', // repos with a single test file\n 'test-*.{js,jsx}', // repos with multiple top-level test files\n '**/*{.,_}{test,spec}.{js,jsx}', // tests where the extension or filename suffix denotes that it is a test\n '**/jest.config.js', // jest config\n '**/jest.setup.js', // jest setup\n '**/vue.config.js', // vue-cli config\n '**/webpack.config.js', // webpack config\n '**/webpack.config.*.js', // webpack config\n '**/rollup.config.js', // rollup config\n '**/rollup.config.*.js', // rollup config\n '**/gulpfile.js', // gulp config\n '**/gulpfile.*.js', // gulp config\n '**/Gruntfile{,.js}', // grunt config\n '**/protractor.conf.js', // protractor config\n '**/protractor.conf.*.js', // protractor config\n '**/karma.conf.js' // karma config\n ],\n optionalDependencies: false\n }\n ],\n 'import/no-internal-modules': [0, {allow: []}],\n 'import/no-mutable-exports': 2,\n 'import/no-named-as-default': 2,\n 'import/no-named-as-default-member': 2,\n 'import/no-named-default': 2,\n 'import/no-named-export': 0,\n 'import/no-namespace': 0,\n 'import/no-nodejs-modules': 0,\n 'import/no-relative-parent-imports': 0,\n 'import/no-restricted-paths': 0,\n 'import/no-self-import': 2,\n 'import/no-unassigned-import': 0,\n 'import/no-unresolved': [\n 2,\n {\n caseSensitive: true,\n commonjs: true,\n ignore: ['@app/features']\n }\n ],\n 'import/no-unused-modules': [\n 0,\n {\n ignoreExports: [],\n missingExports: true,\n unusedExports: true\n }\n ],\n 'import/no-useless-path-segments': [2, {commonjs: true}],\n 'import/no-webpack-loader-syntax': 2,\n 'import/order': [\n 2,\n {\n alphabetize: {\n caseInsensitive: true,\n order: 'asc'\n },\n groups: ['builtin', 'external', 'parent', 'internal', 'sibling', 'type'],\n 'newlines-between': 'always',\n pathGroups: [\n {\n group: 'external',\n pattern: 'react',\n position: 'before'\n },\n {\n group: 'external',\n pattern: 'react-dom',\n position: 'before'\n },\n {\n group: 'parent',\n pattern: '**/classes/**'\n },\n {\n group: 'parent',\n pattern: 'Classes/**'\n },\n {\n group: 'parent',\n pattern: '**/screens/**'\n },\n {\n group: 'parent',\n pattern: 'Screens/**'\n },\n {\n group: 'parent',\n pattern: '**/containers/**'\n },\n {\n group: 'parent',\n pattern: 'Containers/**'\n },\n {\n group: 'parent',\n pattern: '**/components/**'\n },\n {\n group: 'parent',\n pattern: 'Components/**'\n },\n {\n group: 'parent',\n pattern: '**/stores/**'\n },\n {\n group: 'parent',\n pattern: 'Stores/**'\n },\n {\n group: 'sibling',\n pattern: '**/utils/**'\n },\n {\n group: 'sibling',\n pattern: 'Utils/**'\n },\n {\n group: 'sibling',\n pattern: '**/configs/**'\n },\n {\n group: 'sibling',\n pattern: 'Configs'\n },\n {\n group: 'sibling',\n pattern: '**/fonts/**'\n },\n {\n group: 'sibling',\n pattern: 'Fonts/**'\n },\n {\n group: 'sibling',\n pattern: '**/images/**'\n },\n {\n group: 'sibling',\n pattern: 'Images/**'\n }\n ],\n pathGroupsExcludedImportTypes: ['react', 'react-dom']\n }\n ],\n 'import/prefer-default-export': 0,\n 'import/unambiguous': 0\n};","export const jsdoc = {\n 'jsdoc/check-access': 'off',\n 'jsdoc/check-alignment': 'error',\n 'jsdoc/check-examples': 'off',\n 'jsdoc/check-indentation': 'error',\n 'jsdoc/check-line-alignment': [\n 'error',\n 'always',\n {tags: ['param', 'arg', 'argument', 'property', 'prop']}\n ],\n 'jsdoc/check-param-names': [\n 'error',\n {\n checkDestructured: false,\n checkRestProperty: false,\n enableFixer: true\n }\n ],\n 'jsdoc/check-property-names': [\n 'error',\n {enableFixer: true}\n ],\n 'jsdoc/check-syntax': 'error',\n 'jsdoc/check-tag-names': 'error',\n 'jsdoc/check-types': 'error',\n 'jsdoc/check-values': 'error',\n 'jsdoc/empty-tags': 'error',\n 'jsdoc/implements-on-classes': 'error',\n 'jsdoc/match-description': 'error',\n 'jsdoc/match-name': 'off',\n 'jsdoc/multiline-blocks': [\n 'error',\n {\n noFinalLineText: true,\n noMultilineBlocks: false,\n noSingleLineBlocks: false,\n noZeroLineText: true\n }\n ],\n 'jsdoc/no-bad-blocks': 'error',\n 'jsdoc/no-defaults': 'off',\n 'jsdoc/no-missing-syntax': 'off',\n 'jsdoc/no-multi-asterisks': 'error',\n 'jsdoc/no-restricted-syntax': 'off',\n 'jsdoc/no-types': 'off',\n 'jsdoc/no-undefined-types': 'off',\n 'jsdoc/require-asterisk-prefix': ['error', 'always'],\n 'jsdoc/require-description': ['error', {exemptedBy: ['type', 'inheritdoc']}],\n 'jsdoc/require-description-complete-sentence': 'error',\n 'jsdoc/require-example': 'off',\n 'jsdoc/require-file-overview': 'off',\n 'jsdoc/require-hyphen-before-param-description': ['error', 'never'],\n 'jsdoc/require-jsdoc': [\n 'error',\n {\n contexts: ['VariableDeclaration > VariableDeclarator > ArrowFunctionExpression'],\n publicOnly: false,\n require: {\n ArrowFunctionExpression: false,\n ClassDeclaration: true,\n ClassExpression: true,\n FunctionDeclaration: true,\n FunctionExpression: true,\n MethodDefinition: true\n }\n }\n ],\n 'jsdoc/require-param': [\n 'error',\n {\n checkDestructured: true,\n checkDestructuredRoots: true,\n checkRestProperty: false,\n enableFixer: true,\n enableRestElementFixer: true,\n enableRootFixer: true,\n unnamedRootBase: ['props', 'obj', 'root'],\n useDefaultObjectProperties: true\n }\n ],\n 'jsdoc/require-param-description': 'error',\n 'jsdoc/require-param-name': 'error',\n 'jsdoc/require-param-type': 'error',\n 'jsdoc/require-property': 'error',\n 'jsdoc/require-property-description': 'error',\n 'jsdoc/require-property-name': 'error',\n 'jsdoc/require-property-type': 'error',\n 'jsdoc/require-returns': 'error',\n 'jsdoc/require-returns-check': 'error',\n 'jsdoc/require-returns-description': 'error',\n 'jsdoc/require-returns-type': 'error',\n 'jsdoc/require-throws': 'error',\n 'jsdoc/require-yields': 'error',\n 'jsdoc/require-yields-check': 'error',\n 'jsdoc/sort-tags': 'off',\n 'jsdoc/tag-lines': ['error', 'any', {startLines: 1}]\n};","export const nfq = {\n '@nfq/no-empty-lines-in-objects': 'error',\n '@nfq/no-magic-numbers': [\n 'error',\n {\n detectObjects: false,\n enforceConst: true,\n ignore: [0, 1, -1],\n ignoreArrayIndexes: true,\n ignoreArrays: true,\n ignoreClassFieldInitialValues: true,\n ignoreConstDeclarations: false,\n ignoreDefaultValues: true,\n ignoreFunctions: [\n 'darken',\n 'lighten',\n 'setTimeout',\n 'setInterval',\n 'spacing',\n 'translucify',\n 'wait',\n 'toFixed'\n ]\n }\n ],\n '@nfq/no-unbound-method': ['error', {decoratorNames: ['autobind']}],\n '@nfq/object-property-newline': 'error',\n '@nfq/sort-keys': [\n 'error',\n 'asc',\n {\n caseSensitive: false,\n ignorePropTypes: true,\n methodsExtra: true,\n natural: true\n }\n ]\n};","export const promise = {\n 'promise/always-return': 'error',\n 'promise/avoid-new': 'off',\n 'promise/catch-or-return': 'error',\n 'promise/no-callback-in-promise': 'error',\n 'promise/no-native': 'off',\n 'promise/no-nesting': 'error',\n 'promise/no-new-statics': 'error',\n 'promise/no-promise-in-callback': 'error',\n 'promise/no-return-in-finally': 'error',\n 'promise/no-return-wrap': 'error',\n 'promise/param-names': 'error',\n 'promise/prefer-await-to-callbacks': 'error',\n 'promise/prefer-await-to-then': 'error',\n 'promise/valid-params': 'warn'\n};","/* eslint-disable no-inline-comments */\nexport const redos = {\n 'redos/no-vulnerable': [\n 'error',\n {\n cache: true,\n checker: 'auto',\n ignoreErrors: true,\n permittableComplexities: ['polynomial', 'exponential'],\n timeout: 10000\n }\n ] // Superior ReDoS detection using advanced algorithms (automaton + fuzzing) with caching. Replaces security/detect-unsafe-regex. https://github.com/MakeNowJust-Labo/recheck\n};","/* eslint-disable no-inline-comments */\nexport const sanitize = {\n 'no-unsanitized/method': 'error', // The method rule in eslint-plugin-no-unsanitized perform basic security checks for function calls. https://github.com/mozilla/eslint-plugin-no-unsanitized/blob/master/docs/rules/method.md\n 'no-unsanitized/property': 'error' // The property rule in eslint-plugin-no-unsanitized perform basic security checks for property assignments. https://github.com/mozilla/eslint-plugin-no-unsanitized/blob/master/docs/rules/property.md\n};","/* eslint-disable no-inline-comments */\nexport const security = {\n 'security/detect-bidi-characters': 'error',\n 'security/detect-buffer-noassert': 'error', // Detects calls to buffer with noAssert flag set https://github.com/nodesecurity/eslint-plugin-security\n 'security/detect-child-process': 'error', // Detects instances of child_process & non-literal exec() https://github.com/nodesecurity/eslint-plugin-security/blob/master/docs/avoid-command-injection-node.md\n 'security/detect-disable-mustache-escape': 'error', // Detects object.escapeMarkup = false, which can be used with some template engines to disable escaping of HTML entities. This can lead to Cross-Site Scripting (XSS) vulnerabilities. https://github.com/nodesecurity/eslint-plugin-security\n 'security/detect-eval-with-expression': 'error', // Detects eval(variable) which can allow an attacker to run arbitary code inside your process. https://github.com/nodesecurity/eslint-plugin-security\n 'security/detect-new-buffer': 'error', // Detects buffer instantiation https://github.com/nodesecurity/eslint-plugin-security\n 'security/detect-no-csrf-before-method-override': 'error', // Detects Express csrf middleware setup before method-override middleware. This can allow GET requests (which are not checked by csrf) to turn into POST requests later. https://github.com/nodesecurity/eslint-plugin-security\n 'security/detect-non-literal-fs-filename': 'warn', // Detects variable in filename argument of fs calls, which might allow an attacker to access anything on your system. https://github.com/nodesecurity/eslint-plugin-security\n 'security/detect-non-literal-regexp': 'warn', // Detects RegExp(variable), which might allow an attacker to DOS your server with a long-running regular expression. https://github.com/nodesecurity/eslint-plugin-security\n 'security/detect-non-literal-require': 'warn', // Detects require(variable), which might allow an attacker to load and run arbitrary code, or access arbitrary files on disk. https://github.com/nodesecurity/eslint-plugin-security\n 'security/detect-object-injection': 'warn', // Detects variable[key] as a left- or right-hand assignment operand. https://github.com/nodesecurity/eslint-plugin-security\n 'security/detect-possible-timing-attacks': 'warn', // Detects insecure comparisons (==, !=, !== and ===), which check input sequentially. https://github.com/nodesecurity/eslint-plugin-security\n 'security/detect-pseudoRandomBytes': 'warn', // Detects if pseudoRandomBytes() is in use, which might not give you the randomness you need and expect. https://github.com/nodesecurity/eslint-plugin-security\n 'security/detect-unsafe-regex': 'off' // Locates potentially unsafe regular expressions, which may take a very long time to run, blocking the event loop. https://github.com/nodesecurity/eslint-plugin-security\n};","export const stylistic = {\n '@stylistic/array-bracket-newline': ['error', 'consistent'],\n '@stylistic/array-bracket-spacing': ['error', 'never'],\n '@stylistic/array-element-newline': ['error', 'consistent'],\n '@stylistic/arrow-parens': ['error', 'as-needed'],\n '@stylistic/arrow-spacing': ['error', {\n after: true,\n before: true\n }],\n '@stylistic/block-spacing': ['error', 'never'],\n '@stylistic/brace-style': ['error', '1tbs', {allowSingleLine: false}],\n '@stylistic/comma-dangle': ['error', 'never'],\n '@stylistic/comma-spacing': ['error', {\n after: true,\n before: false\n }],\n '@stylistic/comma-style': [\n 'error',\n 'last',\n {\n exceptions: {\n ArrayExpression: false,\n ArrayPattern: false,\n ArrowFunctionExpression: false,\n CallExpression: false,\n FunctionDeclaration: false,\n FunctionExpression: false,\n ImportDeclaration: false,\n NewExpression: false,\n ObjectExpression: false,\n ObjectPattern: false,\n VariableDeclaration: false\n }\n }\n ],\n '@stylistic/computed-property-spacing': ['error', 'never'],\n '@stylistic/dot-location': ['error', 'property'],\n '@stylistic/eol-last': ['error', 'never'],\n '@stylistic/function-call-argument-newline': ['error', 'consistent'],\n '@stylistic/function-call-spacing': ['error', 'never'],\n '@stylistic/function-paren-newline': ['error', 'consistent'],\n '@stylistic/generator-star-spacing': ['error', {\n after: true,\n before: false\n }],\n '@stylistic/implicit-arrow-linebreak': ['error', 'beside'],\n '@stylistic/indent': [\n 'error',\n 4,\n {\n ArrayExpression: 'first',\n CallExpression: {arguments: 'first'},\n flatTernaryExpressions: false,\n FunctionDeclaration: {\n body: 1,\n parameters: 'first'\n },\n FunctionExpression: {\n body: 1,\n parameters: 'first'\n },\n ignoreComments: false,\n ignoredNodes: [\n 'JSXElement',\n 'JSXElement > *',\n 'JSXAttribute',\n 'JSXIdentifier',\n 'JSXNamespacedName',\n 'JSXMemberExpression',\n 'JSXSpreadAttribute',\n 'JSXExpressionContainer',\n 'JSXOpeningElement',\n 'JSXClosingElement',\n 'JSXFragment',\n 'JSXOpeningFragment',\n 'JSXClosingFragment',\n 'JSXText',\n 'JSXEmptyExpression',\n 'JSXSpreadChild'\n ],\n ImportDeclaration: 'first',\n ObjectExpression: 'first',\n outerIIFEBody: 1,\n SwitchCase: 1,\n VariableDeclarator: 'first'\n }\n ],\n '@stylistic/indent-binary-ops': ['error', 4],\n '@stylistic/jsx-quotes': ['error', 'prefer-double'],\n '@stylistic/key-spacing': [\n 'error',\n {\n afterColon: true,\n beforeColon: false,\n mode: 'minimum'\n }\n ],\n '@stylistic/keyword-spacing': ['error', {\n after: true,\n before: true\n }],\n '@stylistic/line-comment-position': [\n 'off',\n {\n applyDefaultPatterns: true,\n ignorePattern: '',\n position: 'above'\n }\n ],\n '@stylistic/linebreak-style': ['error', 'unix'],\n '@stylistic/lines-around-comment': 'off',\n '@stylistic/lines-between-class-members': [\n 'error',\n 'always',\n {exceptAfterSingleLine: false}\n ],\n '@stylistic/max-len': [\n 'error',\n {\n code: 120,\n ignoreComments: true,\n ignoreRegExpLiterals: true,\n ignoreTemplateLiterals: true,\n ignoreUrls: true\n }\n ],\n '@stylistic/max-statements-per-line': ['error', {max: 1}],\n '@stylistic/member-delimiter-style': [\n 'error',\n {\n multiline: {\n delimiter: 'semi',\n requireLast: true\n },\n multilineDetection: 'brackets',\n singleline: {\n delimiter: 'semi',\n requireLast: false\n }\n }\n ],\n '@stylistic/multiline-ternary': ['off', 'never'],\n '@stylistic/new-parens': ['error', 'always'],\n '@stylistic/newline-per-chained-call': ['error', {ignoreChainWithDepth: 4}],\n '@stylistic/no-confusing-arrow': ['error', {allowParens: true}],\n '@stylistic/no-extra-parens': 'off',\n '@stylistic/no-extra-semi': 'error',\n '@stylistic/no-floating-decimal': 'error',\n '@stylistic/no-mixed-operators': [\n 'error',\n {\n allowSamePrecedence: false,\n groups: [\n ['%', '**'],\n ['%', '+'],\n ['%', '-'],\n ['%', '*'],\n ['%', '/'],\n ['/', '*'],\n ['&', '|', '<<', '>>', '>>>'],\n ['==', '!=', '===', '!=='],\n ['&&', '||']\n ]\n }\n ],\n '@stylistic/no-mixed-spaces-and-tabs': 'error',\n '@stylistic/no-multi-spaces': 'error',\n '@stylistic/no-multiple-empty-lines': ['error', {\n max: 1,\n maxBOF: 0,\n maxEOF: 0\n }],\n '@stylistic/no-tabs': 'error',\n '@stylistic/no-trailing-spaces': 'error',\n '@stylistic/no-whitespace-before-property': 'error',\n '@stylistic/nonblock-statement-body-position': ['error', 'beside', {overrides: {}}],\n '@stylistic/object-curly-newline': [\n 'error', {\n ExportDeclaration: {consistent: true},\n ImportDeclaration: {consistent: true},\n ObjectExpression: {\n minProperties: 2,\n multiline: true\n },\n ObjectPattern: {consistent: true},\n TSEnumBody: {consistent: true},\n TSInterfaceBody: {consistent: true},\n TSTypeLiteral: {consistent: true}\n }\n ],\n '@stylistic/object-curly-spacing': ['error', 'never'],\n '@stylistic/object-property-newline': 'off',\n '@stylistic/one-var-declaration-per-line': ['error', 'always'],\n '@stylistic/operator-linebreak': ['error', 'before'],\n '@stylistic/padded-blocks': ['error', 'never'],\n '@stylistic/padding-line-between-statements': [\n 'error',\n {\n blankLine: 'always',\n next: '*',\n prev: ['const', 'let', 'var']\n },\n {\n blankLine: 'any',\n next: ['const', 'let', 'var'],\n prev: ['const', 'let', 'var']\n },\n {\n blankLine: 'always',\n next: '*',\n prev: 'directive'\n },\n {\n blankLine: 'any',\n next: 'directive',\n prev: 'directive'\n },\n {\n blankLine: 'always',\n next: 'return',\n prev: '*'\n }\n ],\n '@stylistic/quote-props': [\n 'error',\n 'as-needed',\n {\n keywords: false,\n numbers: false,\n unnecessary: true\n }\n ],\n '@stylistic/quotes': ['error', 'single', {avoidEscape: true}],\n '@stylistic/rest-spread-spacing': ['error', 'never'],\n '@stylistic/semi': ['error', 'always'],\n '@stylistic/semi-spacing': ['error', {\n after: true,\n before: false\n }],\n '@stylistic/semi-style': ['error', 'last'],\n '@stylistic/space-before-blocks': ['error', 'always'],\n '@stylistic/space-before-function-paren': [\n 'error',\n {\n anonymous: 'never',\n asyncArrow: 'always',\n named: 'never'\n }\n ],\n '@stylistic/space-in-parens': ['error', 'never'],\n '@stylistic/space-infix-ops': 'error',\n '@stylistic/space-unary-ops': [\n 'error',\n {\n nonwords: false,\n overrides: {},\n words: true\n }\n ],\n '@stylistic/spaced-comment': [\n 'error',\n 'always',\n {\n block: {\n balanced: true,\n exceptions: ['-', '+'],\n markers: ['=', '!', ':', '::']\n },\n line: {\n exceptions: ['-', '+'],\n markers: ['=', '!', '/']\n }\n }\n ],\n '@stylistic/switch-colon-spacing': ['error', {\n after: true,\n before: false\n }],\n '@stylistic/template-curly-spacing': ['error', 'never'],\n '@stylistic/template-tag-spacing': ['error', 'never'],\n '@stylistic/type-annotation-spacing': 'error',\n '@stylistic/type-generic-spacing': 'error',\n '@stylistic/type-named-tuple-spacing': 'error',\n '@stylistic/wrap-iife': ['error', 'outside', {functionPrototypeMethods: false}],\n '@stylistic/wrap-regex': 'error',\n '@stylistic/yield-star-spacing': ['error', 'after']\n};","import {arrayFunc} from './array-func';\nimport {emotion} from './emotion';\nimport {importRules} from './import';\nimport {jsdoc} from './jsdoc';\nimport {nfq} from './nfq';\nimport {promise} from './promise';\nimport {redos} from './redos';\nimport {sanitize} from './sanitize';\nimport {security} from './security';\nimport {stylistic} from './stylistic';\n\nexport const commonPluginRules = {\n ...arrayFunc,\n ...emotion,\n ...importRules,\n ...jsdoc,\n ...nfq,\n ...promise,\n ...redos,\n ...sanitize,\n ...security,\n ...stylistic\n};\n\nexport {\n arrayFunc,\n emotion,\n importRules,\n jsdoc,\n nfq,\n promise,\n redos,\n sanitize,\n security,\n stylistic\n}","export const cypress = {\n 'cypress/assertion-before-screenshot': 'error',\n 'cypress/no-assigning-return-values': 'error',\n 'cypress/no-async-before': 'error',\n 'cypress/no-async-tests': 'error',\n 'cypress/no-chained-get': 'error',\n 'cypress/no-debug': 'error',\n 'cypress/no-force': 'error',\n 'cypress/no-pause': 'error',\n 'cypress/no-unnecessary-waiting': 'error',\n 'cypress/no-xpath': 'error',\n 'cypress/require-data-selectors': 'off',\n 'cypress/unsafe-to-chain-command': 'off'\n};","export const nfqPluginRules = {\n '@nfq/cypress-mount-hook': 'error',\n '@nfq/require-getcy': 'error'\n};","import {cypress} from './cypress';\nimport {nfqPluginRules} from './nfq';\n\nexport const cypressPluginRules = {\n ...cypress,\n ...nfqPluginRules\n};\n\nexport {cypress as cypressRules, nfqPluginRules as cypressNfqRules};","export const cypressResets = {\n '@nfq/no-magic-numbers': 'off',\n '@stylistic/max-len': 'off',\n '@stylistic/newline-per-chained-call': 'off',\n '@typescript-eslint/no-unused-expression': 'off',\n '@typescript-eslint/no-unused-expressions': 'off',\n 'max-lines': 'off',\n 'max-lines-per-function': 'off',\n 'promise/always-return': 'off',\n 'promise/catch-or-return': 'off',\n 'promise/prefer-await-to-callbacks': 'off',\n 'promise/prefer-await-to-then': 'off'\n};","export const nodeRules = {\n 'n/callback-return': 'off',\n 'n/exports-style': ['error', 'module.exports'],\n 'n/file-extension-in-import': 'off',\n 'n/global-require': 'off',\n 'n/handle-callback-err': 'error',\n 'n/hashbang': 'error',\n 'n/no-callback-literal': 'error',\n 'n/no-deprecated-api': 'error',\n 'n/no-exports-assign': 'error',\n 'n/no-extraneous-import': 'off',\n 'n/no-extraneous-require': 'off',\n 'n/no-missing-import': 'off',\n 'n/no-missing-require': 'off',\n 'n/no-mixed-requires': 'error',\n 'n/no-new-require': 'error',\n 'n/no-path-concat': 'error',\n 'n/no-process-env': 'off',\n 'n/no-process-exit': 'off',\n 'n/no-restricted-import': 'off',\n 'n/no-restricted-require': 'off',\n 'n/no-sync': 'warn',\n 'n/no-top-level-await': 'error',\n 'n/no-unpublished-bin': 'off',\n 'n/no-unpublished-import': 'off',\n 'n/no-unpublished-require': 'off',\n 'n/no-unsupported-features/es-builtins': 'error',\n 'n/no-unsupported-features/es-syntax': ['error', {ignores: ['dynamicImport']}],\n 'n/no-unsupported-features/node-builtins': 'error',\n 'n/prefer-global/buffer': ['error', 'always'],\n 'n/prefer-global/console': ['error', 'always'],\n 'n/prefer-global/process': ['error', 'always'],\n 'n/prefer-global/text-decoder': ['error', 'always'],\n 'n/prefer-global/text-encoder': ['error', 'always'],\n 'n/prefer-global/url': ['error', 'always'],\n 'n/prefer-global/url-search-params': ['error', 'always'],\n 'n/prefer-node-protocol': 'off',\n 'n/prefer-promises/dns': 'error',\n 'n/prefer-promises/fs': 'error',\n 'n/process-exit-as-throw': 'error'\n};","export const nfqPluginRules = {\n '@nfq/component-file-structure': 'error',\n '@nfq/component-single-hook': 'error',\n '@nfq/styled-components-order': 'error'\n};","const SPACE_INDENT = 4;\n\nexport const reactRules = {\n 'no-underscore-dangle': [\n 'error',\n {\n allow: ['_id', '__REDUX_DEVTOOLS_EXTENSION_COMPOSE__'],\n allowAfterSuper: false,\n allowAfterThis: false,\n enforceInMethodNames: true\n }\n ],\n 'react/boolean-prop-naming': [\n 'warn',\n {\n message: 'It is better if your prop ({{ propName }}) matches an common boolean pattern!',\n propTypeNames: ['bool', 'mutuallyExclusiveTrueProps'],\n rule: '^(is|has)[A-Z]([A-Za-z0-9]?)+'\n }\n ],\n 'react/button-has-type': [\n 'error',\n {\n button: true,\n reset: true,\n submit: true\n }\n ],\n 'react/checked-requires-onchange-or-readonly': 'error',\n 'react/default-props-match-prop-types': ['error', {allowRequiredDefaults: false}],\n 'react/destructuring-assignment': ['error', 'always'],\n 'react/display-name': ['off', {ignoreTranspilerName: true}],\n 'react/forbid-component-props': ['off', {forbid: []}],\n 'react/forbid-dom-props': ['off', {forbid: []}],\n 'react/forbid-elements': ['off', {forbid: []}],\n 'react/forbid-foreign-prop-types': ['warn', {allowInPropTypes: true}],\n 'react/forbid-prop-types': [\n 'error',\n {\n checkChildContextTypes: true,\n checkContextTypes: true,\n forbid: ['any']\n }\n ],\n 'react/function-component-definition': [\n 'error',\n {\n namedComponents: 'arrow-function',\n unnamedComponents: 'arrow-function'\n }\n ],\n 'react/iframe-missing-sandbox': 'error',\n 'react/jsx-boolean-value': ['error', 'never', {always: []}],\n 'react/jsx-child-element-spacing': 'error',\n 'react/jsx-closing-bracket-location': ['error', 'line-aligned'],\n 'react/jsx-closing-tag-location': 'error',\n 'react/jsx-curly-brace-presence': [\n 'error',\n {\n children: 'never',\n props: 'never'\n }\n ],\n 'react/jsx-curly-newline': [\n 'error',\n {\n multiline: 'consistent',\n singleline: 'consistent'\n }\n ],\n 'react/jsx-curly-spacing': ['error', 'never', {allowMultiline: true}],\n 'react/jsx-equals-spacing': ['error', 'never'],\n 'react/jsx-filename-extension': ['error', {extensions: ['.jsx', '.tsx']}],\n 'react/jsx-first-prop-new-line': ['error', 'multiline-multiprop'],\n 'react/jsx-fragments': ['error', 'syntax'],\n 'react/jsx-handler-names': [\n 'error',\n {\n eventHandlerPrefix: 'handle',\n eventHandlerPropPrefix: 'on'\n }\n ],\n 'react/jsx-indent': [\n 'error',\n SPACE_INDENT,\n {\n checkAttributes: true,\n indentLogicalExpressions: true\n }\n ],\n 'react/jsx-indent-props': ['error', SPACE_INDENT],\n 'react/jsx-key': [\n 'error',\n {\n checkFragmentShorthand: true,\n checkKeyMustBeforeSpread: true,\n warnOnDuplicates: true\n }\n ],\n 'react/jsx-max-depth': 'off',\n 'react/jsx-max-props-per-line': [\n 'error',\n {\n maximum: 1,\n when: 'multiline'\n }\n ],\n 'react/jsx-newline': ['error', {prevent: true}],\n 'react/jsx-no-bind': [\n 'error',\n {\n allowArrowFunctions: true,\n allowBind: false,\n allowFunctions: false,\n ignoreDOMComponents: false,\n ignoreRefs: true\n }\n ],\n 'react/jsx-no-comment-textnodes': 'error',\n 'react/jsx-no-duplicate-props': ['error', {ignoreCase: true}],\n 'react/jsx-no-leaked-render': 'off',\n 'react/jsx-no-literals': ['off', {noStrings: true}],\n 'react/jsx-no-script-url': [\n 'error',\n [\n {\n name: 'Link',\n props: ['to']\n }\n ]\n ],\n 'react/jsx-no-target-blank': ['error', {enforceDynamicLinks: 'always'}],\n 'react/jsx-no-undef': ['error', {allowGlobals: true}],\n 'react/jsx-no-useless-fragment': 'error',\n 'react/jsx-one-expression-per-line': ['off', {allow: 'single-child'}],\n 'react/jsx-pascal-case': [\n 'error',\n {\n allowAllCaps: false,\n ignore: []\n }\n ],\n 'react/jsx-props-no-multi-spaces': 'error',\n 'react/jsx-props-no-spread-multi': 'error',\n 'react/jsx-props-no-spreading': [\n 'error',\n {\n custom: 'enforce',\n exceptions: [],\n explicitSpread: 'ignore',\n html: 'enforce'\n }\n ],\n 'react/jsx-sort-props': [\n 'error',\n {\n callbacksLast: true,\n ignoreCase: true,\n noSortAlphabetically: false,\n reservedFirst: true,\n shorthandFirst: false,\n shorthandLast: true\n }\n ],\n 'react/jsx-tag-spacing': [\n 'error',\n {\n afterOpening: 'never',\n beforeClosing: 'never',\n beforeSelfClosing: 'always',\n closingSlash: 'never'\n }\n ],\n 'react/jsx-uses-react': 'error',\n 'react/jsx-uses-vars': 'error',\n 'react/jsx-wrap-multilines': [\n 'error',\n {\n arrow: 'parens-new-line',\n assignment: 'parens-new-line',\n condition: 'parens-new-line',\n declaration: 'parens-new-line',\n logical: 'parens-new-line',\n prop: 'parens-new-line',\n return: 'parens-new-line'\n }\n ],\n 'react/no-access-state-in-setstate': 'error',\n 'react/no-adjacent-inline-elements': 'off',\n 'react/no-array-index-key': 'error',\n 'react/no-arrow-function-lifecycle': 'error',\n 'react/no-children-prop': 'error',\n 'react/no-danger': 'warn',\n 'react/no-danger-with-children': 'error',\n 'react/no-deprecated': 'error',\n 'react/no-did-mount-set-state': 'off',\n 'react/no-did-update-set-state': 'error',\n 'react/no-direct-mutation-state': 'error',\n 'react/no-find-dom-node': 'error',\n 'react/no-is-mounted': 'error',\n 'react/no-multi-comp': ['error', {ignoreStateless: true}],\n 'react/no-namespace': 'error',\n 'react/no-redundant-should-component-update': 'error',\n 'react/no-render-return-value': 'error',\n 'react/no-set-state': 'off',\n 'react/no-string-refs': 'error',\n 'react/no-this-in-sfc': 'error',\n 'react/no-typos': 'error',\n 'react/no-unescaped-entities': 'error',\n 'react/no-unknown-property': 'error',\n 'react/no-unsafe': ['error', {checkAliases: true}],\n 'react/no-unused-class-component-methods': 'off',\n 'react/no-unused-prop-types': [\n 'error',\n {\n customValidators: [],\n skipShapeProps: true\n }\n ],\n 'react/no-unused-state': 'error',\n 'react/no-will-update-set-state': 'error',\n 'react/prefer-es6-class': ['error', 'always'],\n 'react/prefer-read-only-props': 'off',\n 'react/prefer-stateless-function': ['off', {ignorePureComponents: true}],\n 'react/prop-types': [\n 'off',\n {\n customValidators: [],\n ignore: [],\n skipUndeclared: false\n }\n ],\n 'react/react-in-jsx-scope': 'off',\n 'react/require-default-props': ['error', {forbidDefaultForRequired: true}],\n 'react/require-optimization': ['off', {allowDecorators: ['viewRender']}],\n 'react/require-render-return': 'error',\n 'react/self-closing-comp': 'error',\n 'react/sort-comp': [\n 'error',\n {\n groups: {\n lifecycle: [\n 'displayName',\n 'propTypes',\n 'contextTypes',\n 'childContextTypes',\n 'mixins',\n 'statics',\n 'defaultProps',\n 'constructor',\n 'getDefaultProps',\n 'getInitialState',\n 'state',\n 'getChildContext',\n 'getDerivedStateFromProps',\n 'componentWillMount',\n 'UNSAFE_componentWillMount',\n 'componentDidMount',\n 'componentWillReceiveProps',\n 'UNSAFE_componentWillReceiveProps',\n 'shouldComponentUpdate',\n 'componentWillUpdate',\n 'UNSAFE_componentWillUpdate',\n 'getSnapshotBeforeUpdate',\n 'componentDidUpdate',\n 'componentDidCatch',\n 'componentWillUnmount'\n ],\n rendering: [\n '/^render.+$/',\n 'render'\n ]\n },\n order: [\n 'static-variables',\n 'static-methods',\n 'instance-variables',\n 'lifecycle',\n '/^on.+$/',\n 'getters',\n 'setters',\n '/^(get|set)(?!(InitialState$|DefaultProps$|ChildContext$)).+$/',\n 'instance-methods',\n 'everything-else',\n 'rendering'\n ]\n }\n ],\n 'react/sort-default-props': ['error', {ignoreCase: true}],\n 'react/sort-prop-types': [\n 'error',\n {\n callbacksLast: true,\n ignoreCase: true,\n requiredFirst: true,\n sortShapeProp: true\n }\n ],\n 'react/state-in-constructor': ['error', 'always'],\n 'react/static-property-placement': ['error', 'static public field'],\n 'react/style-prop-object': 'off',\n 'react/void-dom-elements-no-children': 'error'\n};","export const reactA11y = {\n 'jsx-a11y/accessible-emoji': 'error',\n 'jsx-a11y/alt-text': [\n 'error',\n {\n area: [],\n elements: [\n 'img',\n 'object',\n 'area',\n 'input[type=\"image\"]'\n ],\n img: [],\n 'input[type=\"image\"]': [],\n object: []\n }\n ],\n 'jsx-a11y/anchor-has-content': ['error', {components: []}],\n 'jsx-a11y/anchor-is-valid': [\n 'error',\n {\n aspects: ['noHref', 'invalidHref', 'preferButton'],\n components: ['Link'],\n specialLink: ['to']\n }\n ],\n 'jsx-a11y/aria-activedescendant-has-tabindex': 'error',\n 'jsx-a11y/aria-props': 'error',\n 'jsx-a11y/aria-proptypes': 'error',\n 'jsx-a11y/aria-role': ['error', {ignoreNonDom: false}],\n 'jsx-a11y/aria-unsupported-elements': 'error',\n 'jsx-a11y/click-events-have-key-events': 'error',\n 'jsx-a11y/heading-has-content': ['error', {components: []}],\n 'jsx-a11y/html-has-lang': 'error',\n 'jsx-a11y/iframe-has-title': 'error',\n 'jsx-a11y/img-redundant-alt': 'error',\n 'jsx-a11y/interactive-supports-focus': 'error',\n 'jsx-a11y/label-has-associated-control': [\n 'error',\n {\n assert: 'both',\n controlComponents: [],\n depth: 25,\n labelAttributes: [],\n labelComponents: []\n }\n ],\n 'jsx-a11y/lang': 'error',\n 'jsx-a11y/media-has-caption': [\n 'error',\n {\n audio: [],\n track: [],\n video: []\n }\n ],\n 'jsx-a11y/mouse-events-have-key-events': 'error',\n 'jsx-a11y/no-access-key': 'error',\n 'jsx-a11y/no-autofocus': ['error', {ignoreNonDOM: true}],\n 'jsx-a11y/no-distracting-elements': ['error', {elements: ['marquee', 'blink']}],\n 'jsx-a11y/no-interactive-element-to-noninteractive-role': ['error', {tr: ['none', 'presentation']}],\n 'jsx-a11y/no-noninteractive-element-interactions': [\n 'error',\n {\n handlers: [\n 'onClick',\n 'onMouseDown',\n 'onMouseUp',\n 'onKeyPress',\n 'onKeyDown',\n 'onKeyUp'\n ]\n }\n ],\n 'jsx-a11y/no-noninteractive-element-to-interactive-role': [\n 'error',\n {\n li: ['menuitem', 'option', 'row', 'tab', 'treeitem'],\n ol: ['listbox', 'menu', 'menubar', 'radiogroup', 'tablist', 'tree', 'treegrid'],\n table: ['grid'],\n td: ['gridcell'],\n ul: ['listbox', 'menu', 'menubar', 'radiogroup', 'tablist', 'tree', 'treegrid']\n }\n ],\n 'jsx-a11y/no-noninteractive-tabindex': [\n 'error',\n {\n roles: ['tabpanel'],\n tags: []\n }\n ],\n 'jsx-a11y/no-onchange': 'error',\n 'jsx-a11y/no-redundant-roles': 'error',\n 'jsx-a11y/no-static-element-interactions': [\n 'error',\n {\n handlers: [\n 'onClick',\n 'onMouseDown',\n 'onMouseUp',\n 'onKeyPress',\n 'onKeyDown',\n 'onKeyUp'\n ]\n }\n ],\n 'jsx-a11y/role-has-required-aria-props': 'error',\n 'jsx-a11y/role-supports-aria-props': 'error',\n 'jsx-a11y/scope': 'error',\n 'jsx-a11y/tabindex-no-positive': 'error'\n};","export const reactHooks = {\n 'react-hooks/component-hook-factories': 'warn',\n 'react-hooks/error-boundaries': 'error',\n 'react-hooks/exhaustive-deps': 'warn',\n 'react-hooks/globals': 'error',\n 'react-hooks/immutability': 'off',\n 'react-hooks/purity': 'error',\n 'react-hooks/rules-of-hooks': 'error',\n 'react-hooks/set-state-in-effect': 'error',\n 'react-hooks/set-state-in-render': 'error',\n 'react-hooks/static-components': 'error',\n 'react-hooks/use-memo': 'error'\n};","import {nfqPluginRules} from './nfq';\nimport {reactRules} from './react';\nimport {reactA11y} from './react-a11y';\nimport {reactHooks} from './react-hooks';\n\nexport const reactPluginRules = {\n ...nfqPluginRules,\n ...reactRules,\n ...reactA11y,\n ...reactHooks\n};\n\nexport {\n nfqPluginRules,\n reactRules,\n reactA11y,\n reactHooks\n}","export const eslint = {\n '@stylistic/brace-style': 'off',\n '@stylistic/comma-dangle': 'off',\n '@stylistic/comma-spacing': 'off',\n '@stylistic/function-call-spacing': 'off',\n '@stylistic/keyword-spacing': 'off',\n '@stylistic/lines-between-class-members': 'off',\n '@stylistic/no-extra-semi': 'off',\n '@stylistic/object-curly-spacing': 'off',\n '@stylistic/padding-line-between-statements': 'off',\n '@stylistic/quotes': 'off',\n '@stylistic/semi': 'off',\n '@stylistic/space-before-blocks': 'off',\n '@stylistic/space-before-function-paren': 'off',\n '@stylistic/space-infix-ops': 'off',\n 'default-param-last': 'off',\n 'dot-notation': 'off',\n 'jsdoc/require-param-type': 'off',\n 'jsdoc/require-returns-type': 'off',\n 'no-array-constructor': 'off',\n 'no-dupe-class-members': 'off',\n 'no-empty-function': 'off',\n 'no-implied-eval': 'off',\n 'no-invalid-this': 'off',\n 'no-loop-func': 'off',\n 'no-loss-of-precision': 'off',\n 'no-redeclare': 'off',\n 'no-return-await': 'off',\n 'no-shadow': 'off',\n 'no-throw-literal': 'off',\n 'no-undefined': 'off',\n 'no-unused-expressions': 'off',\n 'no-unused-vars': 'off',\n 'no-use-before-define': 'off',\n 'no-useless-constructor': 'off'\n};","export const react = {\n 'react/default-props-match-prop-types': 'off',\n 'react/require-default-props': 'off'\n};","/* eslint-disable @stylistic/object-curly-newline */\nexport const security = {\n 'security/detect-object-injection': 'off'\n};","import {eslint} from './eslint';\nimport {react} from './react';\nimport {security} from './security';\n\nexport const typescriptRuleResets = {\n ...react,\n ...eslint,\n ...security\n};\n\nexport {\n eslint as typescriptEslintRules,\n react as typescriptReactRules,\n security as typescriptSecurityRules\n}","/* eslint-disable @stylistic/object-curly-newline */\nexport const nfqRules = {\n '@nfq/no-empty-lines-in-types': 'error'\n};","export const tsEslint = {\n '@typescript-eslint/adjacent-overload-signatures': 'error',\n '@typescript-eslint/array-type': ['error', {default: 'array'}],\n '@typescript-eslint/class-literal-property-style': 'error',\n '@typescript-eslint/consistent-generic-constructors': ['error', 'constructor'],\n '@typescript-eslint/consistent-indexed-object-style': ['error', 'record'],\n '@typescript-eslint/consistent-type-assertions': ['error', {assertionStyle: 'as'}],\n '@typescript-eslint/consistent-type-definitions': 'off',\n '@typescript-eslint/consistent-type-exports': 'error',\n '@typescript-eslint/consistent-type-imports': [\n 'error',\n {\n disallowTypeAnnotations: true,\n prefer: 'type-imports'\n }\n ],\n '@typescript-eslint/default-param-last': 'error',\n '@typescript-eslint/dot-notation': ['error', {allowKeywords: true}],\n '@typescript-eslint/explicit-function-return-type': 'off',\n '@typescript-eslint/explicit-member-accessibility': ['error', {accessibility: 'no-public'}],\n '@typescript-eslint/explicit-module-boundary-types': 'off',\n '@typescript-eslint/indent': 'off',\n '@typescript-eslint/init-declarations': 'off',\n '@typescript-eslint/member-ordering': [\n 'error',\n {\n default: {order: 'as-written'},\n interfaces: {order: 'alphabetically-case-insensitive'},\n typeLiterals: {order: 'alphabetically-case-insensitive'}\n }\n ],\n '@typescript-eslint/method-signature-style': ['error', 'method'],\n '@typescript-eslint/no-array-constructor': 'error',\n '@typescript-eslint/no-base-to-string': 'error',\n '@typescript-eslint/no-confusing-non-null-assertion': 'warn',\n '@typescript-eslint/no-confusing-void-expression': 'off',\n '@typescript-eslint/no-dupe-class-members': 'error',\n '@typescript-eslint/no-duplicate-enum-values': 'warn',\n '@typescript-eslint/no-dynamic-delete': 'off',\n '@typescript-eslint/no-empty-function': ['error', {allow: ['arrowFunctions', 'methods', 'asyncMethods']}],\n '@typescript-eslint/no-empty-interface': 'error',\n '@typescript-eslint/no-empty-object-type': 'error',\n '@typescript-eslint/no-explicit-any': 'off',\n '@typescript-eslint/no-extra-non-null-assertion': 'error',\n '@typescript-eslint/no-extraneous-class': 'off',\n '@typescript-eslint/no-floating-promises': 'error',\n '@typescript-eslint/no-for-in-array': 'error',\n '@typescript-eslint/no-implied-eval': 'error',\n '@typescript-eslint/no-inferrable-types': 'error',\n '@typescript-eslint/no-invalid-this': 'error',\n '@typescript-eslint/no-invalid-void-type': 'off',\n '@typescript-eslint/no-loop-func': 'error',\n '@typescript-eslint/no-loss-of-precision': 'error',\n '@typescript-eslint/no-misused-new': 'error',\n '@typescript-eslint/no-misused-promises': ['error', {checksVoidReturn: false}],\n '@typescript-eslint/no-namespace': [\n 'error',\n {\n allowDeclarations: true,\n allowDefinitionFiles: true\n }\n ],\n '@typescript-eslint/no-non-null-asserted-nullish-coalescing': 'error',\n '@typescript-eslint/no-non-null-asserted-optional-chain': 'error',\n '@typescript-eslint/no-non-null-assertion': 'off',\n '@typescript-eslint/no-redeclare': 'error',\n '@typescript-eslint/no-redundant-type-constituents': 'warn',\n '@typescript-eslint/no-require-imports': 'warn',\n '@typescript-eslint/no-shadow': 'error',\n '@typescript-eslint/no-this-alias': ['error', {allowedNames: ['self']}],\n '@typescript-eslint/no-unnecessary-boolean-literal-compare': 'error',\n '@typescript-eslint/no-unnecessary-condition': 'error',\n '@typescript-eslint/no-unnecessary-qualifier': 'error',\n '@typescript-eslint/no-unnecessary-type-arguments': 'warn',\n '@typescript-eslint/no-unnecessary-type-assertion': 'warn',\n '@typescript-eslint/no-unnecessary-type-constraint': 'error',\n '@typescript-eslint/no-unsafe-argument': 'error',\n '@typescript-eslint/no-unsafe-assignment': 'off',\n '@typescript-eslint/no-unsafe-call': 'error',\n '@typescript-eslint/no-unsafe-function-type': 'error',\n '@typescript-eslint/no-unsafe-member-access': 'error',\n '@typescript-eslint/no-unsafe-return': 'error',\n '@typescript-eslint/no-unused-expressions': [\n 'error',\n {\n allowShortCircuit: true,\n allowTaggedTemplates: false,\n allowTernary: true\n }\n ],\n '@typescript-eslint/no-unused-vars': [\n 'error',\n {\n args: 'after-used',\n argsIgnorePattern: '^e$',\n caughtErrors: 'none',\n ignoreRestSiblings: true,\n vars: 'all'\n }\n ],\n '@typescript-eslint/no-use-before-define': [\n 'error',\n {\n classes: false,\n functions: false,\n variables: false\n }\n ],\n '@typescript-eslint/no-useless-constructor': 'error',\n '@typescript-eslint/no-useless-empty-export': 'error',\n '@typescript-eslint/no-var-requires': 'error',\n '@typescript-eslint/no-wrapper-object-types': 'error',\n '@typescript-eslint/non-nullable-type-assertion-style': 'error',\n '@typescript-eslint/only-throw-error': 'error',\n '@typescript-eslint/prefer-as-const': 'error',\n '@typescript-eslint/prefer-enum-initializers': 'off',\n '@typescript-eslint/prefer-for-of': 'error',\n '@typescript-eslint/prefer-function-type': 'off',\n '@typescript-eslint/prefer-includes': 'error',\n '@typescript-eslint/prefer-literal-enum-member': 'error',\n '@typescript-eslint/prefer-namespace-keyword': 'error',\n '@typescript-eslint/prefer-nullish-coalescing': 'error',\n '@typescript-eslint/prefer-optional-chain': 'error',\n '@typescript-eslint/prefer-readonly': 'error',\n '@typescript-eslint/prefer-readonly-parameter-types': 'off',\n '@typescript-eslint/prefer-reduce-type-parameter': 'error',\n '@typescript-eslint/prefer-return-this-type': 'error',\n '@typescript-eslint/prefer-string-starts-ends-with': 'error',\n '@typescript-eslint/prefer-ts-expect-error': 'error',\n '@typescript-eslint/promise-function-async': 'error',\n '@typescript-eslint/require-array-sort-compare': 'off',\n '@typescript-eslint/require-await': 'error',\n '@typescript-eslint/restrict-plus-operands': 'error',\n '@typescript-eslint/restrict-template-expressions': 'error',\n '@typescript-eslint/return-await': 'error',\n '@typescript-eslint/sort-type-constituents': ['error', {checkIntersections: false}],\n '@typescript-eslint/strict-boolean-expressions': 'off',\n '@typescript-eslint/switch-exhaustiveness-check': [\n 'error',\n {\n allowDefaultCaseForExhaustiveSwitch: true,\n considerDefaultExhaustiveForUnions: true\n }\n ],\n '@typescript-eslint/triple-slash-reference': 'error',\n '@typescript-eslint/unified-signatures': 'error'\n};","import {nfqRules} from './nfq';\nimport {tsEslint} from './ts-eslint';\n\nexport const tsRules = {\n ...tsEslint,\n ...nfqRules\n};\n\nexport {nfqRules as tsNfqRules, tsEslint as tsEslintRules};","export const storybookResets = {\n '@nfq/component-file-structure': 'off',\n '@stylistic/newline-per-chained-call': 'off',\n '@typescript-eslint/no-unused-expression': 'off',\n '@typescript-eslint/no-unused-expressions': 'off',\n 'max-lines': 'off',\n 'promise/always-return': 'off',\n 'promise/catch-or-return': 'off',\n 'promise/prefer-await-to-callbacks': 'off',\n 'promise/prefer-await-to-then': 'off'\n};","import globalsEslint from 'globals';\n\nexport const globals: Record<string, boolean> = {\n after: false,\n afterEach: false,\n before: false,\n beforeEach: false,\n chai: false,\n Chai: false,\n context: false,\n cy: false,\n Cypress: false,\n describe: false,\n it: false,\n JQuery: false,\n JSX: false,\n NodeJS: false,\n ...globalsEslint.browser,\n ...globalsEslint.node,\n ...globalsEslint.builtin,\n ...globalsEslint.chai,\n ...globalsEslint.es2026\n};","import type {TSESTree} from '@typescript-eslint/utils';\n\n/**\n * Unwraps nested wrapper expressions to reach the underlying expression node. It handles common TypeScript and\n * chain wrappers that can obscure the real expression. The function returns the first non-wrapper expression encountered.\n *\n * @param expression The expression that may be wrapped by TypeScript or chain nodes.\n * @returns The unwrapped expression node.\n *\n * @example\n * ```tsx\n * const base = unwrapExpression(expr);\n * ```\n */\nexport const unwrapExpression = (expression: TSESTree.Expression): TSESTree.Expression => {\n let current = expression;\n\n while (\n current.type === 'ChainExpression'\n || current.type === 'TSAsExpression'\n || current.type === 'TSNonNullExpression'\n || current.type === 'TSInstantiationExpression'\n ) {\n current = current.expression as TSESTree.Expression;\n }\n\n return current;\n};","import {unwrapExpression} from './expression-utils';\n\nimport type {TSESTree} from '@typescript-eslint/utils';\n\n/**\n * Checks whether a provided name starts with an uppercase letter. It is used to detect component-like identifiers by\n * convention. The function returns a boolean that reflects the naming rule.\n *\n * @param name The identifier name to validate.\n * @returns True when the name begins with an uppercase character.\n *\n * @example\n * ```tsx\n * const ok = isUppercaseName('Header');\n * ```\n */\nexport const isUppercaseName = (name: string) => (/^[A-Z]/u).test(name);\n\nconst COMPONENT_WRAPPERS = new Set(['observer', 'memo', 'forwardRef']);\n\nconst isComponentWrapperCall = (expression: TSESTree.Expression): boolean => {\n const callee = unwrapExpression(expression);\n\n if (callee.type === 'Identifier') {\n return COMPONENT_WRAPPERS.has(callee.name);\n }\n\n if (\n callee.type === 'MemberExpression'\n && callee.object.type === 'Identifier'\n && callee.object.name === 'React'\n && callee.property.type === 'Identifier'\n ) {\n return COMPONENT_WRAPPERS.has(callee.property.name);\n }\n\n return false;\n};\n\n/**\n * Extracts a function expression from a provided expression node by unwrapping common wrappers and scanning call\n * arguments. It supports arrow functions and traditional function expressions, including those nested inside call\n * expressions. It returns the first matching function expression found or null when none is present.\n *\n * @param expression The expression node that may contain a function expression.\n * @returns The discovered function expression or null when none is found.\n *\n * @remarks\n * This helper is used to locate inline component factories in initializer expressions.\n *\n * @example\n * ```tsx\n * const fn = getFunctionFromExpression(factory(() => null));\n * ```\n */\nexport const getFunctionFromExpression = (\n expression: TSESTree.Expression\n): TSESTree.ArrowFunctionExpression | TSESTree.FunctionExpression | null => {\n const node = unwrapExpression(expression);\n\n if (node.type === 'ArrowFunctionExpression' || node.type === 'FunctionExpression') {\n return node;\n }\n\n if (node.type === 'CallExpression') {\n if (!isComponentWrapperCall(node.callee)) {\n return null;\n }\n\n for (const argument of node.arguments) {\n if (argument.type === 'CallExpression') {\n const nested = getFunctionFromExpression(argument);\n\n if (nested) {\n return nested;\n }\n }\n\n if (argument.type === 'ArrowFunctionExpression' || argument.type === 'FunctionExpression') {\n return argument;\n }\n }\n }\n\n return null;\n};","import {ASTUtils} from '@typescript-eslint/utils';\n\nimport {getFunctionFromExpression, isUppercaseName} from './component-utils';\nimport {unwrapExpression} from './expression-utils';\n\nimport type {TSESTree} from '@typescript-eslint/utils';\n\nexport type ComponentInfo = {\n componentTypeNode?: TSESTree.Node | null;\n name: string;\n propsTypeNode?: TSESTree.Node | null;\n statement: TSESTree.Node;\n};\n\nexport type TypeDeclarationInfo = {\n name: string;\n statement: TSESTree.Node;\n};\n\n/**\n * Determines whether a given AST node tree contains any JSX elements or fragments. It performs a depth-first traversal\n * using an explicit stack to avoid recursion and scans all child nodes except parent links. It returns true as soon as\n * a JSXElement or JSXFragment node is found and otherwise returns false after fully traversing the tree.\n *\n * @param node The AST node to scan for JSX content.\n * @returns True when the tree contains JSX elements or fragments, otherwise false.\n *\n * @remarks\n * This helper is used to detect component-like render bodies that include JSX.\n *\n * @example\n * ```tsx\n * const hasJsx = containsJsx(node);\n * ```\n */\nconst containsJsx = (node: TSESTree.Node | null | undefined): boolean => {\n if (!node) {\n return false;\n }\n\n const stack: TSESTree.Node[] = [node];\n\n while (stack.length) {\n const current = stack.pop()!;\n\n if (current.type === 'JSXElement' || current.type === 'JSXFragment') {\n return true;\n }\n\n for (const key of Object.keys(current) as (keyof TSESTree.Node)[]) {\n if (key === 'parent') {\n continue;\n }\n\n const value = current[key];\n\n // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition\n if (!value || typeof value !== 'object') {\n continue;\n }\n\n if (Array.isArray(value)) {\n for (const item of value) {\n if (item && typeof item === 'object' && 'type' in item) {\n stack.push(item as TSESTree.Node);\n }\n }\n } else if ('type' in value) {\n stack.push(value as unknown as TSESTree.Node);\n }\n }\n }\n\n return false;\n};\n\n/**\n * Determines whether the provided AST node represents a React component superclass. It checks for both direct\n * identifiers and React namespace member expressions. It returns true only when the name matches Component or\n * PureComponent and otherwise returns false.\n *\n * @param node The AST node to test for a component superclass reference.\n * @returns True when the node matches Component or PureComponent, otherwise false.\n *\n * @remarks\n * This helper is used to recognize React class component inheritance patterns.\n *\n * @example\n * ```tsx\n * const ok = isComponentSuperclass(node);\n * ```\n */\nconst isComponentSuperclass = (node: TSESTree.Node | null | undefined): boolean => {\n if (!node) {\n return false;\n }\n\n if (node.type === 'Identifier') {\n return node.name === 'Component' || node.name === 'PureComponent';\n }\n\n if (\n node.type === 'MemberExpression'\n && node.object.type === 'Identifier'\n && node.object.name === 'React'\n && node.property.type === 'Identifier'\n ) {\n return node.property.name === 'Component' || node.property.name === 'PureComponent';\n }\n\n return false;\n};\n\n/**\n * Determines whether a class declaration or expression represents a React class component. It validates the superclass\n * against React Component or PureComponent and then checks for a render method that returns JSX. It returns true only\n * when both conditions are satisfied.\n *\n * @param node The class declaration or expression node to inspect.\n * @returns True when the class extends a React component superclass and defines a JSX-producing render method.\n *\n * @remarks\n * This helper relies on a render method presence and JSX detection to identify class components.\n *\n * @example\n * ```tsx\n * const ok = isClassComponent(classNode);\n * ```\n */\nconst isClassComponent = (node: TSESTree.ClassDeclaration | TSESTree.ClassExpression): boolean => {\n if (!isComponentSuperclass(node.superClass)) {\n return false;\n }\n\n const renderMethod = node.body.body.find(\n member => member.type === 'MethodDefinition'\n && member.key.type === 'Identifier'\n && member.key.name === 'render'\n );\n\n // eslint-disable-next-line @typescript-eslint/prefer-optional-chain\n if (!renderMethod || renderMethod.type !== 'MethodDefinition') {\n return false;\n }\n\n return containsJsx(renderMethod.value.body);\n};\n\n/**\n * Retrieves the props type node from the superclass type parameters of a class.\n *\n * @param node The class declaration or expression to inspect.\n * @returns The first type parameter node from the superclass, or `null` if none exists.\n */\nconst getSuperclassPropsType = (\n node: TSESTree.ClassDeclaration | TSESTree.ClassExpression\n): TSESTree.Node | null => {\n const withSuperParams = node as unknown as {\n superTypeArguments?: {params?: TSESTree.Node[]};\n superTypeParameters?: {params?: TSESTree.Node[]};\n };\n\n const superParams = withSuperParams.superTypeArguments ?? withSuperParams.superTypeParameters;\n\n return superParams?.params?.[0] ?? null;\n};\n\nconst getTypeArguments = (node: TSESTree.CallExpression): TSESTree.Node[] | null => {\n const withTypeArgs = node as unknown as {\n typeArguments?: {params?: TSESTree.Node[]};\n typeParameters?: {params?: TSESTree.Node[]};\n };\n\n const typeArgs = withTypeArgs.typeArguments ?? withTypeArgs.typeParameters;\n\n return typeArgs?.params ?? null;\n};\n\nconst isForwardRefCallee = (callee: TSESTree.Expression): boolean => {\n if (callee.type === 'Identifier') {\n return callee.name === 'forwardRef';\n }\n\n return callee.type === 'MemberExpression'\n && callee.object.type === 'Identifier'\n && callee.object.name === 'React'\n && callee.property.type === 'Identifier'\n && callee.property.name === 'forwardRef';\n};\n\nconst getForwardRefPropsType = (expression: TSESTree.Expression): TSESTree.Node | null => {\n const node = unwrapExpression(expression);\n\n if (node.type !== 'CallExpression') {\n return null;\n }\n\n if (isForwardRefCallee(node.callee)) {\n const typeArgs = getTypeArguments(node);\n\n if (!typeArgs || typeArgs.length === 0) {\n return null;\n }\n\n if (typeArgs.length > 1) {\n return typeArgs[1] ?? null;\n }\n\n return typeArgs[0] ?? null;\n }\n\n for (const argument of node.arguments) {\n if (argument.type === 'CallExpression') {\n const nested = getForwardRefPropsType(argument);\n\n if (nested) {\n return nested;\n }\n }\n }\n\n return null;\n};\n\n/**\n * Determines whether a statement declares a component-like function and returns structured details when it does.\n * It checks for uppercase-named function declarations and variable declarations initialized with arrow functions or\n * function expressions. It returns null when the statement does not match the expected component patterns.\n *\n * @param node The statement node to analyze for component declarations.\n * @returns The component information when a match is found, or null when no component is detected.\n *\n * @remarks\n * This helper relies on naming conventions and initializer inspection to infer component declarations.\n *\n * @example\n * ```tsx\n * const info = getComponentInfoFromStatement(statement);\n * ```\n */\nexport const getComponentInfoFromStatement = (node: TSESTree.Statement): ComponentInfo | null => {\n if (node.type === 'FunctionDeclaration' && isUppercaseName(node.id.name)) {\n if (!containsJsx(node.body)) {\n return null;\n }\n\n return {\n componentTypeNode: node.returnType?.typeAnnotation ?? null,\n name: node.id.name,\n propsTypeNode: node.params[0] && 'typeAnnotation' in node.params[0]\n ? node.params[0].typeAnnotation\n : null,\n statement: node\n };\n }\n\n // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition\n if (node.type === 'ClassDeclaration' && node.id && isUppercaseName(node.id.name)) {\n if (!isClassComponent(node)) {\n return null;\n }\n\n return {\n componentTypeNode: null,\n name: node.id.name,\n propsTypeNode: getSuperclassPropsType(node),\n statement: node\n };\n }\n\n if (node.type !== 'VariableDeclaration') {\n return null;\n }\n\n for (const declarator of node.declarations) {\n if (!ASTUtils.isIdentifier(declarator.id)) {\n continue;\n }\n\n const {name} = declarator.id;\n\n if (!isUppercaseName(name) || !declarator.init) {\n continue;\n }\n\n const init = unwrapExpression(declarator.init);\n\n if (init.type === 'ClassExpression') {\n if (!isClassComponent(init)) {\n continue;\n }\n\n return {\n componentTypeNode: null,\n name,\n propsTypeNode: getSuperclassPropsType(init),\n statement: node\n };\n }\n\n const functionNode = getFunctionFromExpression(init);\n\n if (functionNode && containsJsx(functionNode.body)) {\n const initPropsType = functionNode.params[0] && 'typeAnnotation' in functionNode.params[0]\n ? functionNode.params[0].typeAnnotation\n : null;\n const forwardRefPropsType = getForwardRefPropsType(init);\n\n return {\n componentTypeNode: declarator.id.typeAnnotation?.typeAnnotation ?? null,\n name,\n propsTypeNode: initPropsType ?? forwardRefPropsType,\n statement: node\n };\n }\n }\n\n return null;\n};\n\n/**\n * Determines whether a statement assigns a display name to a component identifier. It narrows the statement to an\n * expression statement that performs an assignment and validates the left-hand side member access. It returns a boolean\n * indicating whether the assignment targets the specified component's displayName property.\n *\n * @param node The statement node to inspect.\n * @param componentName The expected component identifier name.\n * @returns True when the statement assigns to the component's displayName property.\n *\n * @remarks\n * This helper is used to recognize explicit displayName assignments.\n *\n * @example\n * ```tsx\n * const ok = isDisplayNameAssignment(statement, 'Header');\n * ```\n */\nexport const isDisplayNameAssignment = (node: TSESTree.Statement, componentName: string) => {\n if (node.type !== 'ExpressionStatement') {\n return false;\n }\n\n const {expression} = node;\n\n if (expression.type !== 'AssignmentExpression') {\n return false;\n }\n\n const {left} = expression;\n\n if (left.type !== 'MemberExpression' || left.property.type !== 'Identifier') {\n return false;\n }\n\n return ASTUtils.isIdentifier(left.object)\n && left.object.name === componentName\n && left.property.name === 'displayName';\n};\n\n/**\n * Determines whether a statement is an export that re-exports a component identifier with the same name.\n * It inspects named export specifiers and verifies that both the local and exported names match the provided component\n * name. It returns false for non-named exports or when no matching specifier is found.\n *\n * @param node The statement node to inspect.\n * @param componentName The expected component identifier name.\n * @returns True when the statement exports the component identifier by name.\n *\n * @remarks\n * This helper is used to detect explicit named exports of component identifiers.\n *\n * @example\n * ```tsx\n * const ok = isComponentExport(statement, 'Header');\n * ```\n */\nexport const isComponentExport = (node: TSESTree.Statement, componentName: string) => {\n if (node.type !== 'ExportNamedDeclaration' || !node.specifiers.length) {\n return false;\n }\n\n return node.specifiers.some(specifier => (\n specifier.local.type === 'Identifier'\n && specifier.local.name === componentName\n && specifier.exported.type === 'Identifier'\n && specifier.exported.name === componentName\n ));\n};\n\n/**\n * Determines whether a statement is a default export that targets a component identifier.\n * It supports `export default Identifier` and `export default class/function` declarations\n * with matching names.\n *\n * @param node The statement node to inspect.\n * @param componentName The expected component identifier name.\n * @returns True when the statement default-exports the component.\n *\n * @example\n * ```tsx\n * const ok = isDefaultComponentExport(statement, 'App');\n * ```\n */\nexport const isDefaultComponentExport = (node: TSESTree.Statement, componentName: string) => {\n if (node.type !== 'ExportDefaultDeclaration') {\n return false;\n }\n\n const {declaration} = node;\n\n if (declaration.type === 'Identifier') {\n return declaration.name === componentName;\n }\n\n if (declaration.type === 'ClassDeclaration' || declaration.type === 'FunctionDeclaration') {\n // eslint-disable-next-line @typescript-eslint/prefer-optional-chain\n return Boolean(declaration.id && declaration.id.name === componentName);\n }\n\n return false;\n};\n\n/**\n * Determines whether a statement declares a styled component variable using the styled tag factory. It inspects variable\n * declarations and checks tagged template expressions for identifiers, member expressions, or call expressions that\n * resolve to `styled`. It returns a boolean that indicates whether any declarator matches the styled component pattern.\n *\n * @param node The statement node to inspect for a styled component declaration.\n * @returns True when the statement contains a styled tagged template declaration.\n *\n * @remarks\n * This helper recognizes multiple `styled` invocation forms used in styled-components.\n *\n * @example\n * ```tsx\n * const ok = isStyledDeclaration(statement);\n * ```\n */\nexport const isStyledDeclaration = (node: TSESTree.Statement) => {\n if (node.type !== 'VariableDeclaration') {\n return false;\n }\n\n /**\n * Determines whether an expression represents a styled-components tagged template pattern. It unwraps the expression\n * to handle nested constructs and then checks identifiers, member expressions, and call expressions. It walks up the\n * tag chain until it can confirm the tag originates from `styled`, otherwise it reports false. This helper is scoped\n * to styled tagged template detection within variable declarations.\n *\n * @param expression The expression node to inspect for a styled tag origin.\n * @returns True when the expression resolves to a styled tag, otherwise false.\n *\n * @remarks\n * This helper tolerates chained member accesses and factory calls by recursively inspecting the tag origin.\n *\n * @example\n * ```tsx\n * const ok = isStyledTagExpression(tagExpression);\n * ```\n */\n const isStyledTagExpression = (expression: TSESTree.Expression): boolean => {\n const current = unwrapExpression(expression);\n\n if (ASTUtils.isIdentifier(current)) {\n return current.name === 'styled';\n }\n\n if (current.type === 'MemberExpression') {\n return current.object.type !== 'Super'\n && isStyledTagExpression(current.object as TSESTree.Expression);\n }\n\n if (current.type === 'CallExpression') {\n if (current.callee.type === 'Super') {\n return false;\n }\n\n return isStyledTagExpression(current.callee as TSESTree.Expression);\n }\n\n return false;\n };\n\n return node.declarations.some(declarator => {\n if (declarator.init?.type !== 'TaggedTemplateExpression') {\n return false;\n }\n\n return isStyledTagExpression(declarator.init.tag);\n });\n};\n\nconst STYLED_FACTORY_NAMES = new Set(['motion', 'styled']);\n\n/**\n * Determines whether a callee expression represents a styled component factory. It checks identifiers against a known\n * set of factory names and also recognizes motion member expressions. It returns true only when the callee matches one\n * of the supported styled factory patterns.\n *\n * @param callee The callee expression to inspect.\n * @returns True when the callee matches a supported styled factory.\n *\n * @remarks\n * This helper supports both direct factory identifiers and motion namespace member expressions.\n *\n * @example\n * ```tsx\n * const ok = isStyledFactory(unwrapExpression(call.callee));\n * ```\n */\nconst isStyledFactory = (callee: TSESTree.Expression): boolean => {\n if (ASTUtils.isIdentifier(callee)) {\n return STYLED_FACTORY_NAMES.has(callee.name);\n }\n\n if (\n callee.type === 'MemberExpression'\n && callee.object.type === 'Identifier'\n && callee.object.name === 'motion'\n ) {\n return true;\n }\n\n return false;\n};\n\n/**\n * Determines whether a statement declares a component factory call (motion(H1)).\n * These are treated similarly to styled components for ordering purposes.\n *\n * @param node The statement node to inspect.\n * @returns True when the statement contains a supported factory call declaration.\n *\n * @example\n * ```tsx\n * const ok = isStyledFactoryDeclaration(statement);\n * ```\n */\nexport const isStyledFactoryDeclaration = (node: TSESTree.Statement) => {\n if (node.type !== 'VariableDeclaration') {\n return false;\n }\n\n return node.declarations.some(declarator => {\n if (!declarator.init) {\n return false;\n }\n\n const init = unwrapExpression(declarator.init);\n\n if (init.type !== 'CallExpression') {\n return false;\n }\n\n return isStyledFactory(unwrapExpression(init.callee));\n });\n};\n\n/**\n * Extracts type declaration details from a statement when it represents a TypeScript interface or type alias.\n * It supports both direct declarations and named exports that wrap those declarations. It returns structured metadata\n * so callers can quickly access the declared name and statement node.\n *\n * @param node The statement node to inspect for a type declaration.\n * @returns The type declaration info when found, or null when the statement does not declare a type.\n *\n * @remarks\n * This helper simplifies handling exported and non-exported type declarations in AST traversal.\n *\n * @example\n * ```tsx\n * const info = getTypeDeclarationInfo(statement);\n * ```\n */\nexport const getTypeDeclarationInfo = (node: TSESTree.Statement): TypeDeclarationInfo | null => {\n if (node.type === 'TSInterfaceDeclaration' || node.type === 'TSTypeAliasDeclaration') {\n return {\n name: node.id.name,\n statement: node\n };\n }\n\n if (node.type === 'ExportNamedDeclaration' && node.declaration) {\n const {declaration} = node;\n\n if (declaration.type === 'TSInterfaceDeclaration' || declaration.type === 'TSTypeAliasDeclaration') {\n return {\n name: declaration.id.name,\n statement: node\n };\n }\n }\n\n return null;\n};\n\n/**\n * Collects type reference identifiers from a TypeScript AST node and records them in a provided set. It walks the node\n * recursively, skipping parent links to avoid cycles, and handles both singular child nodes and arrays of nodes. It\n * updates the provided set in place and does not return a value.\n *\n * @param typeNode The AST node to scan for type references.\n * @param names The set that receives discovered type reference names.\n *\n * @remarks\n * This helper is intended for internal traversal of TypeScript type nodes.\n *\n * @example\n * ```tsx\n * const names = new Set<string>();\n * collectTypeReferences(typeNode, names);\n * ```\n */\nexport const collectTypeReferences = (typeNode: TSESTree.Node, names: Set<string>) => {\n if (typeNode.type === 'TSTypeReference') {\n if (typeNode.typeName.type === 'Identifier') {\n names.add(typeNode.typeName.name);\n }\n }\n\n for (const key of Object.keys(typeNode) as (keyof typeof typeNode)[]) {\n if (key === 'parent') {\n continue;\n }\n const value = typeNode[key];\n\n if (typeof value !== 'object') {\n continue;\n }\n\n if (Array.isArray(value)) {\n for (const item of value) {\n if (item && typeof item === 'object') {\n collectTypeReferences(item as TSESTree.Node, names);\n }\n }\n } else {\n collectTypeReferences(value as unknown as TSESTree.Node, names);\n }\n }\n};","import {ESLintUtils} from '@typescript-eslint/utils';\n\nimport {\n collectTypeReferences,\n getComponentInfoFromStatement,\n getTypeDeclarationInfo,\n isComponentExport,\n isDefaultComponentExport,\n isDisplayNameAssignment,\n isStyledDeclaration,\n isStyledFactoryDeclaration\n} from './utils/component-file-structure-utils';\n\nimport type {ComponentInfo} from './utils/component-file-structure-utils';\nimport type {TSESLint, TSESTree} from '@typescript-eslint/utils';\n\nconst createRule = ESLintUtils.RuleCreator(\n name => `https://github.com/nfqde/eslint-config-nfq/blob/master/docs/rules/${name}.md`\n);\n\ntype MessageIds = 'invalidOrder' | 'missingDisplayName' | 'missingNamedExport';\n\nconst ORDER_LABELS = [\n 'Imports',\n 'Optional declarations',\n 'Props types',\n 'Component',\n 'Component helpers and displayName',\n 'Exports',\n 'Styled components and local helper types'\n];\nconst ORDER_MESSAGE = ORDER_LABELS.join(' -> ');\n// eslint-disable-next-line jsdoc/require-jsdoc\nconst getSectionLabel = (section: number) => ORDER_LABELS[section - 1] ?? 'Unknown';\nconst PAGE_TYPE_NAMES = new Set([\n 'NextPage',\n 'NextPageWithLayout',\n 'NextSSRPage',\n 'NextSSRPageWithLayout',\n 'NextSSGPageWithLayout'\n]);\n\nexport const componentFileStructure = createRule<[], MessageIds>({\n defaultOptions: [],\n meta: {\n docs: {description: 'Enforce file structure order for React component files.'},\n messages: {\n // eslint-disable-next-line @stylistic/max-len\n invalidOrder: 'This file structure block is out of order. {{currentName}} is a {{current}} and should be before {{previousName}}. Expected order: {{order}}.',\n missingDisplayName: 'Component {{name}} must set displayName.',\n missingNamedExport: 'Component {{name}} must be exported by name.'\n },\n schema: [],\n type: 'suggestion'\n },\n name: 'component-file-structure',\n /**\n * Creates the rule listener for enforcing component file structure ordering. It analyzes the program body to\n * identify the primary component, its props types, and structural sections. It then reports ordering issues and\n * missing requirements like displayName or named exports.\n *\n * @param context The ESLint rule context used to access source code and report diagnostics.\n * @returns A rule listener that validates component file structure and reports issues.\n *\n * @example\n * ```tsx\n * // eslint-disable-next-line @nfq/component-file-structure\n * const listener = componentFileStructure.create(context);\n * ```\n */\n // eslint-disable-next-line max-lines-per-function\n create(context) {\n const {sourceCode} = context;\n const programBody = sourceCode.ast.body;\n const componentCandidates = programBody\n .filter((statement): statement is TSESTree.Statement => statement.type !== 'TSModuleDeclaration')\n .map(statement => getComponentInfoFromStatement(statement))\n .filter((info): info is ComponentInfo => Boolean(info));\n\n if (componentCandidates.length === 0) {\n return {};\n }\n\n const componentInfo = componentCandidates.sort(\n (left, right) => left.statement.range[0] - right.statement.range[0]\n )[0];\n const componentName = componentInfo.name;\n const typeDeclarations = new Map<string, TSESTree.Node>();\n\n for (const statement of programBody) {\n const info = getTypeDeclarationInfo(statement as TSESTree.Statement);\n\n if (info) {\n typeDeclarations.set(info.name, info.statement);\n }\n }\n\n const propsTypeNames = new Set<string>();\n const propsTypeRefs = new Set<string>();\n const propsTypeNode = componentInfo.propsTypeNode ?? null;\n /**\n * Determines whether the component uses a page-specific type alias. It inspects the component type node\n * and collects all referenced type names. It then checks if any of those names match known page types to\n * decide if the component is a page component.\n *\n * @returns True when the component type includes a known page type; otherwise false.\n *\n * @example\n * ```tsx\n * const isPage = isPageType();\n * ```\n */\n const isPageType = () => {\n const typeNode = componentInfo.componentTypeNode ?? null;\n\n if (!typeNode) {\n return false;\n }\n\n const typeRefs = new Set<string>();\n\n collectTypeReferences(typeNode, typeRefs);\n\n return Array.from(typeRefs).some(name => PAGE_TYPE_NAMES.has(name));\n };\n\n /**\n * Checks whether a statement assigns a page layout helper to the component. It ensures the statement is\n * an assignment expression targeting a member of the component identifier. It then verifies the member name\n * matches supported layout assignment properties.\n *\n * @param statement The statement to inspect for a layout assignment.\n * @returns True when the statement assigns a layout helper on the component; otherwise false.\n *\n * @example\n * ```tsx\n * const hasLayout = isPageLayoutAssignment(statement);\n * ```\n */\n const isPageLayoutAssignment = (statement: TSESTree.Statement) => {\n if (statement.type !== 'ExpressionStatement') {\n return false;\n }\n\n const {expression} = statement;\n\n if (expression.type !== 'AssignmentExpression') {\n return false;\n }\n\n const {left} = expression;\n\n if (left.type !== 'MemberExpression' || left.object.type !== 'Identifier') {\n return false;\n }\n\n if (left.object.name !== componentName || left.property.type !== 'Identifier') {\n return false;\n }\n\n return left.property.name === 'getLayout' || left.property.name === 'getLayoutKey';\n };\n\n const hasDefaultExport = programBody\n .some(statement => isDefaultComponentExport(statement as TSESTree.Statement, componentName));\n const hasLayoutAssignment = programBody\n .some(statement => isPageLayoutAssignment(statement as TSESTree.Statement));\n const isPageComponent = hasDefaultExport && (hasLayoutAssignment || isPageType());\n\n /**\n * Determines whether a class element represents a static displayName member. It checks that the element is a supported\n * property definition shape and that it is declared as static. It then verifies the identifier name matches the expected\n * displayName property, which signals a static display name assignment on a class.\n *\n * @returns True when the element is a static displayName property; otherwise false.\n *\n * @example\n * ```tsx\n * const isDisplayName = hasDisplayNameMember(member);\n * ```\n */\n const hasStaticDisplayName = () => {\n /**\n * Determines whether a class element represents a static displayName member. It checks that the element is a supported\n * property definition shape and that it is declared as static. It then verifies the identifier name matches the expected\n * displayName property, which signals a static display name assignment on a class.\n *\n * @param member The class element to inspect for a static displayName property.\n * @returns True when the element is a static displayName property; otherwise false.\n *\n * @example\n * ```tsx\n * const isDisplayName = hasDisplayNameMember(member);\n * ```\n */\n const hasDisplayNameMember = (member: TSESTree.ClassElement) => {\n // @ts-expect-error\n if (member.type !== 'PropertyDefinition' && member.type !== 'ClassProperty') {\n return false;\n }\n\n if (!member.static || member.key.type !== 'Identifier') {\n return false;\n }\n\n return member.key.name === 'displayName';\n };\n\n if (componentInfo.statement.type === 'ClassDeclaration') {\n return componentInfo.statement.id?.name === componentName\n && componentInfo.statement.body.body.some(hasDisplayNameMember);\n }\n\n if (componentInfo.statement.type === 'VariableDeclaration') {\n for (const declarator of componentInfo.statement.declarations) {\n if (declarator.id.type !== 'Identifier' || declarator.id.name !== componentName) {\n continue;\n }\n\n const {init} = declarator;\n\n if (init?.type === 'ClassExpression') {\n return init.body.body.some(hasDisplayNameMember);\n }\n }\n }\n\n return false;\n };\n\n if (propsTypeNode) {\n collectTypeReferences(propsTypeNode, propsTypeRefs);\n\n for (const name of propsTypeRefs) {\n if (typeDeclarations.has(name)) {\n propsTypeNames.add(name);\n }\n }\n }\n\n /**\n * Determines whether a statement declares a type that is used as the component props. It inspects the statement\n * for a type declaration and compares the declared name against the collected props type names. It returns a\n * boolean so callers can classify statements into the props type section.\n *\n * @param statement The statement to inspect for a props type declaration.\n * @returns True when the statement declares a props type; otherwise false.\n *\n * @example\n * ```tsx\n * const isProps = isPropsTypeDeclaration(statement);\n * ```\n */\n const isPropsTypeDeclaration = (statement: TSESTree.Statement) => {\n const info = getTypeDeclarationInfo(statement);\n\n return Boolean(info && propsTypeNames.has(info.name));\n };\n\n /**\n * Determines whether a statement declares a type that is not used as the component props. It inspects the\n * statement for a type declaration and ensures the declared name is not among the collected props type names.\n * It returns a boolean so callers can classify statements into non-props type sections.\n *\n * @param statement The statement to inspect for a non-props type declaration.\n * @returns True when the statement declares a non-props type; otherwise false.\n *\n * @example\n * ```tsx\n * const isNonProps = isNonPropsTypeDeclaration(statement);\n * ```\n */\n const isNonPropsTypeDeclaration = (statement: TSESTree.Statement) => {\n const info = getTypeDeclarationInfo(statement);\n\n return Boolean(info && !propsTypeNames.has(info.name));\n };\n\n /**\n * Determines whether a statement is an optional variable-like declaration in the component file structure. It\n * filters out the main component statement and styled declarations to avoid misclassification. It considers\n * variable declarations, non-component function declarations, and enum declarations as optional declarations.\n *\n * @param statement The statement to evaluate for optional declaration status.\n * @returns True when the statement should be treated as an optional declaration; otherwise false.\n *\n * @example\n * ```tsx\n * const isOptional = isOptionalVarDeclaration(statement);\n * ```\n */\n const isOptionalVarDeclaration = (statement: TSESTree.Statement) => {\n if (statement.type === 'VariableDeclaration') {\n if (\n statement === componentInfo.statement\n || isStyledDeclaration(statement)\n || isStyledFactoryDeclaration(statement)\n ) {\n return false;\n }\n\n return true;\n }\n\n if (statement.type === 'FunctionDeclaration') {\n return statement !== componentInfo.statement;\n }\n\n return statement.type === 'TSEnumDeclaration';\n };\n\n /**\n * Determines the structural section number for a given statement in a component file. It checks the statement\n * against known component structure elements like imports, the main component, displayName assignment, exports,\n * styled declarations, optional declarations, and props types. It returns a numeric section marker to help\n * enforce ordering rules or null when the statement does not belong to a tracked section.\n *\n * @param statement The statement to classify within the component file structure.\n * @returns The numeric section identifier for the statement, or null when it does not match a section.\n *\n * @example\n * ```tsx\n * const section = sectionForStatement(statement);\n * ```\n */\n const sectionForStatement = (statement: TSESTree.Statement) => {\n if (statement.type === 'ImportDeclaration') {\n return 1;\n }\n\n if (statement === componentInfo.statement) {\n // eslint-disable-next-line @nfq/no-magic-numbers\n return 4;\n }\n\n if (isDisplayNameAssignment(statement, componentName)) {\n // eslint-disable-next-line @nfq/no-magic-numbers\n return 5;\n }\n\n if (\n isComponentExport(statement, componentName)\n || isDefaultComponentExport(statement, componentName)\n ) {\n // eslint-disable-next-line @nfq/no-magic-numbers\n return 6;\n }\n\n if (\n isNonPropsTypeDeclaration(statement)\n && statement.range[0] < componentInfo.statement.range[0]\n ) {\n // eslint-disable-next-line @nfq/no-magic-numbers\n return 2;\n }\n\n if (\n isStyledDeclaration(statement)\n || isStyledFactoryDeclaration(statement)\n || isNonPropsTypeDeclaration(statement)\n ) {\n // eslint-disable-next-line @nfq/no-magic-numbers\n return 7;\n }\n\n if (isOptionalVarDeclaration(statement)) {\n if (statement.range[0] > componentInfo.statement.range[0]) {\n // eslint-disable-next-line @nfq/no-magic-numbers\n return 5;\n }\n\n // eslint-disable-next-line @nfq/no-magic-numbers\n return 2;\n }\n\n if (isPropsTypeDeclaration(statement)) {\n // eslint-disable-next-line @nfq/no-magic-numbers\n return 3;\n }\n\n return null;\n };\n\n /**\n * Determines a human-readable label for a statement within the component file structure. It inspects the statement\n * type and section to produce a meaningful name for reporting order violations. It also handles special cases like\n * displayName assignments and exports so diagnostics are clear and actionable.\n *\n * @param statement The statement to derive a label for.\n * @param section The section number associated with the statement.\n * @returns A descriptive name for the statement within its section.\n *\n * @example\n * ```tsx\n * const name = getStatementName(statement, 4);\n * ```\n */\n const getStatementName = (statement: TSESTree.Statement, section: number) => {\n // eslint-disable-next-line @nfq/no-magic-numbers\n if (section === 4) {\n return componentName;\n }\n\n // eslint-disable-next-line @nfq/no-magic-numbers\n if (section === 5 && isDisplayNameAssignment(statement, componentName)) {\n return `${componentName}.displayName`;\n }\n\n if (statement.type === 'VariableDeclaration') {\n const first = statement.declarations[0];\n\n // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition\n if (first?.id.type === 'Identifier') {\n return first.id.name;\n }\n }\n\n if (statement.type === 'FunctionDeclaration' || statement.type === 'ClassDeclaration') {\n // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition\n return statement.id?.name ?? getSectionLabel(section);\n }\n\n if (statement.type === 'ExportDefaultDeclaration') {\n const {declaration} = statement;\n\n if (declaration.type === 'Identifier') {\n return `export default ${declaration.name}`;\n }\n\n if (declaration.type === 'ClassDeclaration' || declaration.type === 'FunctionDeclaration') {\n if (declaration.id?.name) {\n return `export default ${declaration.id.name}`;\n }\n }\n\n return 'export default';\n }\n\n if (statement.type === 'ExportNamedDeclaration') {\n const names = statement.specifiers\n .filter(specifier => specifier.local.type === 'Identifier')\n // @ts-expect-error\n .map(specifier => specifier.local.name as string);\n\n if (names.length === 1) {\n return `export {${names[0]}}`;\n }\n\n if (names.length > 1) {\n return 'export {...}';\n }\n }\n\n return getSectionLabel(section);\n };\n\n return {\n /**\n * Iterates over the program body statements to validate their order based on the defined component file structure. It\n * tracks the last seen section and reports any statement that appears in an earlier section than the last one. It also checks\n * for the presence of a displayName assignment and a named export for the component, reporting if either is missing.\n * This ensures that the component file adheres to the expected structure and includes necessary metadata for better maintainability and clarity.\n *\n * @example\n * ```tsx\n * Program();\n * ```\n */\n Program() {\n let lastSection = 0;\n let lastSectionName = '';\n let hasDisplayName = hasStaticDisplayName();\n let hasNamedExport = false;\n\n for (const statement of programBody) {\n const section = sectionForStatement(statement as TSESTree.Statement);\n\n // eslint-disable-next-line @nfq/no-magic-numbers\n if (section === 5) {\n hasDisplayName = true;\n }\n\n // eslint-disable-next-line @nfq/no-magic-numbers\n if (section === 6) {\n hasNamedExport = true;\n }\n\n if (!section) {\n continue;\n }\n\n if (section < lastSection) {\n context.report({\n data: {\n current: getSectionLabel(section),\n currentName: getStatementName(statement as TSESTree.Statement, section),\n order: ORDER_MESSAGE,\n previous: getSectionLabel(lastSection),\n previousName: lastSectionName || getSectionLabel(lastSection)\n },\n messageId: 'invalidOrder',\n node: statement\n });\n } else {\n lastSection = section;\n lastSectionName = getStatementName(statement as TSESTree.Statement, section);\n }\n }\n\n if (!hasDisplayName && !isPageComponent) {\n context.report({\n data: {name: componentName},\n messageId: 'missingDisplayName',\n node: componentInfo.statement\n });\n }\n\n if (!hasNamedExport && !isPageComponent) {\n context.report({\n data: {name: componentName},\n messageId: 'missingNamedExport',\n node: componentInfo.statement\n });\n }\n }\n } as TSESLint.RuleListener;\n }\n});","import {ASTUtils} from '@typescript-eslint/utils';\n\nimport type {TSESTree} from '@typescript-eslint/utils';\n\n/**\n * Determines whether the provided callee expression represents a React-style hook call.\n * A callee is considered a hook if it is an identifier or a member expression whose\n * property name starts with `\"use\"`.\n *\n * @param callee The callee expression to inspect.\n * @returns `true` if the callee matches hook naming conventions; otherwise, `false`.\n */\nexport const isHookCallee = (callee: TSESTree.Expression): boolean => {\n if (ASTUtils.isIdentifier(callee)) {\n return callee.name.startsWith('use');\n }\n\n if (callee.type === 'MemberExpression' && ASTUtils.isIdentifier(callee.property)) {\n return callee.property.name.startsWith('use');\n }\n\n return false;\n};","import {ASTUtils} from '@typescript-eslint/utils';\n\nimport {getFunctionFromExpression, isUppercaseName} from './component-utils';\nimport {isHookCallee} from './hook-utils';\n\nimport type {TSESTree} from '@typescript-eslint/utils';\n\nexport type ComponentInfo = {\n functionNode: TSESTree.ArrowFunctionExpression | TSESTree.FunctionDeclaration | TSESTree.FunctionExpression;\n name: string;\n};\n\n/**\n * Collects component function information from the program body. It scans top-level statements to find uppercase-named\n * component declarations and assignments. It returns metadata for each component that matches these criteria.\n *\n * @param body The program body statements to analyze.\n * @returns A list of discovered component info objects.\n *\n * @example\n * ```tsx\n * const components = getComponentInfos(program.body);\n * ```\n */\nexport const getComponentInfos = (body: TSESTree.Program['body']): ComponentInfo[] => {\n const components: ComponentInfo[] = [];\n\n for (const statement of body) {\n if (statement.type === 'FunctionDeclaration' && isUppercaseName(statement.id.name)) {\n components.push({\n functionNode: statement,\n name: statement.id.name\n });\n\n continue;\n }\n\n if (statement.type !== 'VariableDeclaration') {\n continue;\n }\n\n for (const declarator of statement.declarations) {\n if (!ASTUtils.isIdentifier(declarator.id) || !declarator.init) {\n continue;\n }\n\n if (!isUppercaseName(declarator.id.name)) {\n continue;\n }\n\n const functionNode = getFunctionFromExpression(declarator.init);\n\n if (functionNode) {\n components.push({\n functionNode,\n name: declarator.id.name\n });\n }\n }\n }\n\n return components;\n};\n\n/**\n * Determines whether a statement contains a React hook call expression. It inspects expression statements and\n * single-variable declarations to detect calls whose callee matches hook naming rules. It returns the hook call\n * node when found and otherwise returns null.\n *\n * @param statement The statement to analyze for a hook call.\n * @returns The hook call node when present, or null when no hook call is found.\n *\n * @example\n * ```tsx\n * const hookCall = getHookCallFromStatement(statement);\n * ```\n */\nexport const getHookCallFromStatement = (statement: TSESTree.Statement): TSESTree.Node | null => {\n if (statement.type === 'ExpressionStatement') {\n if (statement.expression.type === 'CallExpression' && isHookCallee(statement.expression.callee)) {\n return statement.expression;\n }\n\n return null;\n }\n\n if (statement.type === 'VariableDeclaration') {\n if (statement.declarations.length !== 1) {\n return null;\n }\n\n const declarator = statement.declarations[0];\n\n if (declarator.init?.type !== 'CallExpression') {\n return null;\n }\n\n return isHookCallee(declarator.init.callee) ? declarator.init : null;\n }\n\n return null;\n};\n\n/**\n * Determines whether the provided statement represents a guard clause in a control flow.\n * It only considers `if` statements without an `else` branch and treats immediate returns as guard clauses.\n * It also supports a single-statement block that returns as a guard clause.\n *\n * @param statement The statement node to evaluate for guard clause structure.\n * @returns A boolean indicating whether the statement is a guard clause.\n *\n * @example\n * ```tsx\n * const isGuard = isGuardClause(statement);\n * ```\n */\nexport const isGuardClause = (statement: TSESTree.Statement) => {\n if (statement.type !== 'IfStatement' || statement.alternate) {\n return false;\n }\n\n if (statement.consequent.type === 'ReturnStatement') {\n return true;\n }\n\n if (statement.consequent.type === 'BlockStatement') {\n return statement.consequent.body.length === 1 && statement.consequent.body[0].type === 'ReturnStatement';\n }\n\n return false;\n};\n\n/**\n * Determines whether a statement or its immediate branches include a return statement.\n * It checks direct return statements and inspects simple if statements for returns in their consequent.\n * It does not traverse deeper nested structures beyond the immediate consequent block. This keeps the check focused\n * on top-level guard-like returns.\n *\n * @param statement The statement node to inspect for a return statement.\n * @returns True when a return statement is found in the inspected statement, otherwise false.\n *\n * @example\n * ```tsx\n * const hasReturn = hasReturnStatement(statement);\n * ```\n */\nexport const hasReturnStatement = (statement: TSESTree.Statement): boolean => {\n if (statement.type === 'ReturnStatement') {\n return true;\n }\n\n if (statement.type === 'IfStatement') {\n if (statement.consequent.type === 'ReturnStatement') {\n return true;\n }\n\n if (statement.consequent.type === 'BlockStatement') {\n return statement.consequent.body.some(item => item.type === 'ReturnStatement');\n }\n\n return false;\n }\n\n return false;\n};","import {ESLintUtils} from '@typescript-eslint/utils';\n\nimport {\n getComponentInfos,\n getHookCallFromStatement,\n hasReturnStatement,\n isGuardClause\n} from './utils/component-single-hook-utils';\n\nimport type {TSESLint} from '@typescript-eslint/utils';\n\nconst createRule = ESLintUtils.RuleCreator(\n name => `https://github.com/nfqde/eslint-config-nfq/blob/master/docs/rules/${name}.md`\n);\n\ntype MessageIds = 'invalidStatement' | 'tooManyHooks';\n\nexport const componentSingleHook = createRule<[], MessageIds>({\n defaultOptions: [],\n meta: {\n docs: {description: 'Enforce a single hook call and minimal component bodies.'},\n messages: {\n invalidStatement: 'Only a single hook call, guard clauses, and return statements are allowed.',\n tooManyHooks: 'Only a single hook call is allowed in the component body.'\n },\n schema: [],\n type: 'suggestion'\n },\n name: 'component-single-hook',\n /**\n * Creates the rule listener for validating component bodies that should contain only one hook call.\n * It inspects component bodies, counts hook calls, and reports invalid statements or excessive hooks.\n * It also skips components without return statements and non-block bodies to avoid false positives.\n *\n * @param context The ESLint rule context providing source code and reporting utilities.\n * @returns A rule listener that validates component statement structure.\n *\n * @example\n * ```tsx\n * create(context);\n * ```\n */\n create(context) {\n const {sourceCode} = context;\n const componentInfos = getComponentInfos(sourceCode.ast.body);\n\n if (componentInfos.length === 0) {\n return {};\n }\n\n return {\n /**\n * Iterates over discovered component infos and validates each component body. It skips components without\n * block bodies or without return statements to reduce false positives. It enforces a single hook call\n * while allowing guard clauses and return statements.\n *\n * @example\n * ```tsx\n * Program();\n * ```\n */\n Program() {\n for (const component of componentInfos) {\n const {functionNode} = component;\n\n if (functionNode.body.type !== 'BlockStatement') {\n continue;\n }\n\n const statements = functionNode.body.body;\n const hasReturn = statements.some(hasReturnStatement);\n\n if (!hasReturn) {\n continue;\n }\n\n let hookCount = 0;\n\n for (const statement of statements) {\n if (statement.type === 'ReturnStatement') {\n continue;\n }\n\n if (isGuardClause(statement)) {\n continue;\n }\n\n const hookCall = getHookCallFromStatement(statement);\n\n if (hookCall) {\n hookCount += 1;\n\n if (hookCount > 1) {\n context.report({\n messageId: 'tooManyHooks',\n node: statement\n });\n }\n\n continue;\n }\n\n context.report({\n messageId: 'invalidStatement',\n node: statement\n });\n }\n }\n }\n } as TSESLint.RuleListener;\n }\n});","import {ASTUtils} from '@typescript-eslint/utils';\n\nimport {unwrapExpression} from './expression-utils';\nimport {isHookCallee} from './hook-utils';\n\nimport type {TSESTree} from '@typescript-eslint/utils';\n\nexport type HookArgCheck<MessageId extends string> = {\n allowedHookCalls: Set<TSESTree.CallExpression>;\n errors: {messageId: MessageId; node: TSESTree.Node}[];\n};\n\n/**\n * Determines whether a call expression represents a hook call by inspecting its callee.\n * It unwraps the callee expression before checking to ensure nested expressions are handled.\n * This is used to simplify hook detection logic throughout the rule utilities.\n *\n * @param node The call expression to evaluate.\n * @returns Whether the call expression resolves to a hook callee.\n *\n * @example\n * ```tsx\n * const isHook = isHookCall(callExpression);\n * ```\n */\nexport const isHookCall = (node: TSESTree.CallExpression): boolean => isHookCallee(unwrapExpression(node.callee));\n\n/**\n * Checks whether a call expression matches a Cypress command on the `cy` object.\n * It unwraps the callee to handle nested expressions and verifies both the object and property names.\n * This helps enforce command-specific validations in the rule set.\n *\n * @param node The call expression to inspect.\n * @param command The Cypress command name to match.\n * @returns Whether the call expression is a `cy.<command>` call.\n *\n * @example\n * ```tsx\n * const isMount = isCyCommandCall(callExpression, 'mount');\n * ```\n */\nexport const isCyCommandCall = (node: TSESTree.CallExpression, command: string): boolean => {\n const callee = unwrapExpression(node.callee);\n\n if (callee.type !== 'MemberExpression') {\n return false;\n }\n\n const object = unwrapExpression(callee.object);\n\n return ASTUtils.isIdentifier(object)\n && object.name === 'cy'\n && ASTUtils.isIdentifier(callee.property)\n && callee.property.name === command;\n};\n\n/**\n * Determines whether a call expression represents a Cypress mount hook invocation.\n * It checks both the singular and plural command names to cover supported API variants.\n * This helper centralizes the logic so other utilities can rely on a consistent predicate.\n *\n * @param node The call expression to inspect.\n * @returns Whether the call expression is a mount hook command call.\n *\n * @example\n * ```tsx\n * const isMountHook = isMountHookCall(callExpression);\n * ```\n */\nexport const isMountHookCall = (node: TSESTree.CallExpression): boolean => (\n isCyCommandCall(node, 'mountHook') || isCyCommandCall(node, 'mountHooks')\n);\n\n/**\n * Verifies that a call expression represents a `then` chain call on a specific target expression.\n * It unwraps the callee to correctly handle nested or parenthesized expressions.\n * This ensures the comparison against the target is precise and consistent.\n *\n * @param node The call expression to inspect.\n * @param target The target expression that must be the member object.\n * @returns Whether the call expression is a `then` call on the target.\n *\n * @example\n * ```tsx\n * const isThen = isThenCall(callExpression, mountCall);\n * ```\n */\nexport const isThenCall = (node: TSESTree.CallExpression, target: TSESTree.Expression): boolean => {\n const callee = unwrapExpression(node.callee);\n\n return callee.type === 'MemberExpression'\n && callee.object === target\n && ASTUtils.isIdentifier(callee.property)\n && callee.property.name === 'then';\n};\n\n/**\n * Collects the chained `then` call expressions that follow a Cypress mount call.\n * It walks upward through the parent member expressions to find `then` calls and records each call in order.\n * This helper stops as soon as the chain no longer matches the expected `then` pattern to ensure the result is precise.\n *\n * @param mountCall The initial mount call expression to inspect for chained `then` calls.\n * @returns An array of `then` call expressions chained from the provided mount call.\n *\n * @example\n * ```tsx\n * const thens = getThenChain(mountCall);\n * ```\n */\nexport const getThenChain = (mountCall: TSESTree.CallExpression): TSESTree.CallExpression[] => {\n const thens: TSESTree.CallExpression[] = [];\n let current: TSESTree.CallExpression | null = mountCall;\n\n while (current.parent.type === 'MemberExpression') {\n const member: TSESTree.MemberExpressionComputedName | TSESTree.MemberExpressionNonComputedName = current.parent;\n const {parent}: TSESTree.Node = member;\n\n if (parent.type !== 'CallExpression') {\n break;\n }\n\n if (isThenCall(parent, current)) {\n thens.push(parent);\n current = parent;\n continue;\n }\n\n break;\n }\n\n return thens;\n};\n\n/**\n * Extracts a hook call expression from an arrow function body when possible.\n * It supports concise bodies and single return statements within block bodies.\n * This helper ensures only valid hook calls are returned while everything else resolves to null.\n *\n * @param node The arrow function expression to inspect.\n * @returns The hook call expression when found, otherwise null.\n *\n * @remarks\n * This utility only accepts arrow functions and enforces a narrow shape for safe extraction.\n *\n * @example\n * ```tsx\n * const hookCall = getHookCallFromArrow(arrowFunction);\n * ```\n */\nexport const getHookCallFromArrow = (node: TSESTree.ArrowFunctionExpression) => {\n if (node.expression && node.body.type === 'CallExpression') {\n return isHookCall(node.body) ? node.body : null;\n }\n\n if (node.body.type !== 'BlockStatement') {\n return null;\n }\n\n if (node.body.body.length !== 1) {\n return null;\n }\n\n const [statement] = node.body.body;\n\n if (statement.type !== 'ReturnStatement' || !statement.argument) {\n return null;\n }\n\n return statement.argument.type === 'CallExpression' && isHookCall(statement.argument)\n ? statement.argument\n : null;\n};\n\n/**\n * Validates Cypress mount hook arguments and reports any rule violations that are detected.\n * It inspects the call signature to ensure the correct argument count and acceptable argument shapes.\n * It also collects valid hook call expressions so downstream checks can reuse the results safely.\n *\n * @param node The call expression whose arguments are validated for mount hook usage.\n * @param messageIds The message identifiers used for reporting invalid or missing arguments.\n * @param messageIds.invalidHookArgument The message ID for reporting invalid hook arguments.\n * @param messageIds.missingHooksArgs The message ID for reporting missing arguments when using the plural mount hooks command.\n * @returns The collected allowed hook calls along with any validation errors.\n *\n * @example\n * ```tsx\n * const result = checkHookArguments(callExpression, {\n * invalidHookArgument: 'invalidHookArgument',\n * missingHooksArgs: 'missingHooksArgs'\n * });\n * ```\n */\nexport const checkHookArguments = <MessageId extends string>(\n node: TSESTree.CallExpression,\n messageIds: {invalidHookArgument: MessageId; missingHooksArgs: MessageId}\n): HookArgCheck<MessageId> => {\n const allowedHookCalls = new Set<TSESTree.CallExpression>();\n const errors: {messageId: MessageId; node: TSESTree.Node}[] = [];\n const isHooks = isCyCommandCall(node, 'mountHooks');\n\n // eslint-disable-next-line @nfq/no-magic-numbers\n if (isHooks && node.arguments.length < 2) {\n errors.push({\n messageId: messageIds.missingHooksArgs,\n node\n });\n }\n\n if (!isHooks && node.arguments.length !== 1) {\n errors.push({\n messageId: messageIds.invalidHookArgument,\n node\n });\n\n return {\n allowedHookCalls,\n errors\n };\n }\n\n for (const arg of node.arguments) {\n if (arg.type === 'SpreadElement') {\n errors.push({\n messageId: messageIds.invalidHookArgument,\n node: arg\n });\n continue;\n }\n\n if (arg.type === 'Identifier') {\n if (!arg.name.startsWith('use')) {\n errors.push({\n messageId: messageIds.invalidHookArgument,\n node: arg\n });\n }\n\n continue;\n }\n\n if (arg.type === 'ArrowFunctionExpression') {\n const hookCall = getHookCallFromArrow(arg);\n\n if (hookCall) {\n allowedHookCalls.add(hookCall);\n continue;\n }\n }\n\n errors.push({\n messageId: messageIds.invalidHookArgument,\n node: arg\n });\n }\n\n return {\n allowedHookCalls,\n errors\n };\n};\n\n/**\n * Determines whether a node represents a Cypress `cy.wrap(values).as('values')` call pattern.\n * It inspects the call expression structure and validates the chained member access and arguments.\n * This helper keeps the rule logic consistent by providing a single predicate for the expected wrap-and-alias sequence.\n *\n * @param node The AST node to inspect for a wrap values call pattern.\n * @returns True when the node matches the expected `cy.wrap(values).as('values')` call chain.\n *\n * @example\n * ```tsx\n * if (hasWrapValues(callExpression)) {\n * // handle wrap values call\n * }\n * ```\n */\nexport const hasWrapValues = (node: TSESTree.Node): boolean => {\n if (node.type !== 'CallExpression') {\n return false;\n }\n\n const callee = unwrapExpression(node.callee);\n\n if (callee.type !== 'MemberExpression') {\n return false;\n }\n\n if (!ASTUtils.isIdentifier(callee.property) || callee.property.name !== 'as') {\n return false;\n }\n\n if (node.arguments.length !== 1) {\n return false;\n }\n\n const arg = node.arguments[0];\n\n if (arg.type !== 'Literal' || arg.value !== 'values') {\n return false;\n }\n\n if (callee.object.type !== 'CallExpression') {\n return false;\n }\n\n const wrapCall = callee.object;\n\n return isCyCommandCall(wrapCall, 'wrap')\n && wrapCall.arguments.length === 1\n && wrapCall.arguments[0].type === 'Identifier'\n && wrapCall.arguments[0].name === 'values';\n};\n\n/**\n * Determines whether a given AST node contains a JSX element named `MockComponent`.\n * It inspects JSX elements and fragments recursively to locate the target component in nested structures.\n * It returns a boolean so callers can quickly decide if a mount or render includes the mock component.\n *\n * @param node The AST node to inspect for the `MockComponent` JSX element.\n * @returns True when a `MockComponent` JSX element is found, otherwise false.\n *\n * @remarks\n * This utility only traverses JSXElement and JSXFragment nodes and ignores other node types.\n *\n * @example\n * ```tsx\n * const hasMock = containsMockComponent(jsxNode);\n * ```\n */\nexport const containsMockComponent = (node: TSESTree.Node | null | undefined): boolean => {\n if (!node) {\n return false;\n }\n\n if (node.type === 'JSXElement') {\n const {name} = node.openingElement;\n\n if (name.type === 'JSXIdentifier' && name.name === 'MockComponent') {\n return true;\n }\n\n return node.children.some(child => containsMockComponent(child as TSESTree.Node));\n }\n\n if (node.type === 'JSXFragment') {\n return node.children.some(child => containsMockComponent(child as TSESTree.Node));\n }\n\n return false;\n};\n\n/**\n * Determines whether a call expression represents a Cypress `cy.mount` call that includes a mock component.\n * It validates that the node is a call expression and that the call targets the `mount` command on `cy`.\n * It then inspects the first argument to confirm the presence of a `MockComponent` JSX element.\n *\n * @param node The AST node to inspect for a mount call containing a mock component.\n * @returns True when the node is a `cy.mount` call with a mock component argument; otherwise false.\n *\n * @example\n * ```tsx\n * const hasMockMount = hasMountWithMock(callExpression);\n * ```\n */\nexport const hasMountWithMock = (node: TSESTree.Node): boolean => {\n if (node.type !== 'CallExpression') {\n return false;\n }\n\n if (!isCyCommandCall(node, 'mount')) {\n return false;\n }\n\n if (node.arguments.length === 0) {\n return false;\n }\n\n return containsMockComponent(node.arguments[0] as TSESTree.Node);\n};\n\n/**\n * Determines whether the provided AST node represents an assertion-style call.\n * It checks for direct `expect(...)` calls as well as chained calls that use `assert` or `should` identifiers.\n * This helper centralizes assertion detection so other utilities can rely on a consistent predicate.\n *\n * @param node The AST node to inspect for an assertion call signature.\n * @returns True when the node matches known assertion call shapes; otherwise false.\n *\n * @remarks\n * This function only inspects call expressions and their immediate callee shapes.\n *\n * @example\n * ```tsx\n * if (hasAssertionCall(node)) {\n * // handle assertion\n * }\n * ```\n */\nexport const hasAssertionCall = (node: TSESTree.Node): boolean => {\n if (node.type !== 'CallExpression') {\n return false;\n }\n\n const callee = unwrapExpression(node.callee);\n\n if (ASTUtils.isIdentifier(callee) && callee.name === 'expect') {\n return true;\n }\n\n if (callee.type === 'MemberExpression') {\n if (ASTUtils.isIdentifier(callee.object) && callee.object.name === 'assert') {\n return true;\n }\n\n if (ASTUtils.isIdentifier(callee.property) && callee.property.name === 'should') {\n return true;\n }\n }\n\n return false;\n};\n\n/**\n * Determines whether a statement is a valid first `then` chain entry for mount-related checks.\n * It only allows expression statements that call either the wrap-values helper or the mount-with-mock helper.\n * This keeps downstream validation focused on the allowed call patterns and avoids unrelated statements.\n *\n * @param statement The statement node to validate against the allowed `then`-body patterns.\n * @returns True when the statement is a call expression to `hasWrapValues` or `hasMountWithMock`.\n *\n * @remarks\n * This helper enforces a strict shape so the rule can reason about the order of mount and wrap calls.\n *\n * @example\n * ```tsx\n * if (isAllowedFirstThenStatement(statement)) {\n * // process allowed statement\n * }\n * ```\n */\nexport const isAllowedFirstThenStatement = (statement: TSESTree.Statement): boolean => {\n if (statement.type !== 'ExpressionStatement') {\n return false;\n }\n\n const {expression} = statement;\n\n if (expression.type !== 'CallExpression') {\n return false;\n }\n\n return hasWrapValues(expression) || hasMountWithMock(expression);\n};\n\n/**\n * Performs a depth-first traversal of an AST node and all of its descendants.\n * The traversal is iterative and uses a stack to avoid recursion limits while still visiting every reachable child\n * node. The visitor callback is invoked for each node encountered, and the traversal skips parent references to prevent\n * cycles.\n *\n * @param node The root AST node to start walking from.\n * @param visitor The callback invoked for each visited AST node.\n *\n * @remarks\n * This helper treats any object with a `type` property as a node and walks arrays of nodes as well.\n * It intentionally skips the `parent` property to avoid infinite loops. The traversal order is depth-first but\n * not guaranteed to be stable for sibling ordering.\n *\n * @example\n * ```tsx\n * walk(rootNode, child => {\n * if (child.type === 'CallExpression') {\n * // handle call expressions\n * }\n * });\n * ```\n */\nexport const walk = (node: TSESTree.Node, visitor: (child: TSESTree.Node) => void) => {\n const stack: TSESTree.Node[] = [node];\n\n while (stack.length) {\n const current = stack.pop()!;\n\n visitor(current);\n\n for (const key of Object.keys(current) as (keyof TSESTree.Node)[]) {\n if (key === 'parent') {\n continue;\n }\n\n const value = current[key];\n\n // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition\n if (!value || typeof value !== 'object') {\n continue;\n }\n\n if (Array.isArray(value)) {\n for (const item of value) {\n if (item && typeof item === 'object' && 'type' in item) {\n stack.push(item as TSESTree.Node);\n }\n }\n } else if ('type' in value) {\n stack.push(value as unknown as TSESTree.Node);\n }\n }\n }\n};\n\n/**\n * Determines whether a call expression represents a test `it` invocation. This includes direct `it(...)` calls as\n * well as `it.only(...)` and `it.skip(...)` variants. It unwraps the callee to handle nested expressions and returns\n * a boolean predicate for downstream rule logic.\n *\n * @param node The call expression to inspect.\n * @returns True when the call expression targets `it`, `it.only`, or `it.skip`; otherwise false.\n *\n * @remarks\n * This helper only inspects the immediate callee shape and does not validate arguments.\n *\n * @example\n * ```tsx\n * const isTestCall = isItCall(callExpression);\n * ```\n */\nexport const isItCall = (node: TSESTree.CallExpression): boolean => {\n const callee = unwrapExpression(node.callee);\n\n if (ASTUtils.isIdentifier(callee)) {\n return callee.name === 'it';\n }\n\n if (callee.type !== 'MemberExpression' || !ASTUtils.isIdentifier(callee.object)) {\n return false;\n }\n\n return callee.object.name === 'it'\n && ASTUtils.isIdentifier(callee.property)\n && (callee.property.name === 'only' || callee.property.name === 'skip');\n};\n\n/**\n * Determines whether a callback node matches the expected `then` signature for mount hook utilities. It validates that\n * the node is a function expression with an object pattern parameter and that it exposes both `MockComponent` and\n * `values` bindings. It returns the original callback node when the signature is valid, otherwise it returns null.\n *\n * @param callback The AST node to validate as a `then` callback.\n * @returns The callback node when valid; otherwise null.\n *\n * @example\n * ```tsx\n * const validCallback = isThenCallbackValid(node);\n * ```\n */\n// eslint-disable-next-line promise/prefer-await-to-callbacks\nexport const isThenCallbackValid = (callback: TSESTree.Node | null | undefined) => {\n if (!callback) {\n return null;\n }\n\n if (callback.type !== 'ArrowFunctionExpression' && callback.type !== 'FunctionExpression') {\n return null;\n }\n\n const param = callback.params[0];\n\n if (param.type !== 'ObjectPattern') {\n return null;\n }\n\n const names = new Set(param.properties\n .filter(property => property.type === 'Property' && property.key.type === 'Identifier')\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n .map(property => (property as any).key.name as string));\n\n if (!names.has('MockComponent') || !names.has('values')) {\n return null;\n }\n\n return callback;\n};\n\n/**\n * Determines whether a call expression represents a Cypress `cy.get('@values')` call.\n * It unwraps the callee and validates that it is a member expression targeting the `get` property.\n * It also verifies that the call is made on `cy` and that the first argument is the literal `@values`.\n *\n * @param node The call expression to inspect for the `cy.get('@values')` pattern.\n * @returns True when the call expression matches the expected `cy.get('@values')` signature; otherwise false.\n *\n * @remarks\n * This helper only checks the first argument and does not validate additional arguments.\n *\n * @example\n * ```tsx\n * const isValuesGet = isValuesGetCall(callExpression);\n * ```\n */\nconst isValuesGetCall = (node: TSESTree.CallExpression): boolean => {\n const callee = unwrapExpression(node.callee);\n\n if (callee.type !== 'MemberExpression') {\n return false;\n }\n\n if (!ASTUtils.isIdentifier(callee.property) || callee.property.name !== 'get') {\n return false;\n }\n\n const object = unwrapExpression(callee.object);\n\n if (!ASTUtils.isIdentifier(object) || object.name !== 'cy') {\n return false;\n }\n\n const arg = node.arguments[0];\n\n return Boolean(arg.type === 'Literal' && arg.value === '@values');\n};\n\n/**\n * Determines whether a call expression represents a chained `cy.get('@values').its(...)` call. It unwraps the callee\n * and validates that the property is `its` before walking back through the call chain. It recurses through nested `its`\n * calls so chained access is handled consistently.\n *\n * @param node The call expression to inspect for a `values` `its` call chain.\n * @returns True when the call expression is an `its` call chained from a `cy.get('@values')` or another valid `its` call.\n *\n * @remarks\n * This helper only accepts call expressions and only evaluates member expression callees.\n *\n * @example\n * ```tsx\n * const isValuesIts = isValuesItsCall(callExpression);\n * ```\n */\nconst isValuesItsCall = (node: TSESTree.CallExpression): boolean => {\n const callee = unwrapExpression(node.callee);\n\n if (callee.type !== 'MemberExpression') {\n return false;\n }\n\n if (!ASTUtils.isIdentifier(callee.property) || callee.property.name !== 'its') {\n return false;\n }\n\n const object = unwrapExpression(callee.object);\n\n if (object.type !== 'CallExpression') {\n return false;\n }\n\n return isValuesGetCall(object) || isValuesItsCall(object);\n};\n\n/**\n * Determines whether a call expression chain includes an `its('current')` access tied to values retrieval. It walks\n * through member expression calls recursively to verify that `its('current')` appears on a valid `cy.get('@values')`\n * or chained `its` call. It returns false when the call shape does not match the expected Cypress chain pattern.\n *\n * @param node The call expression to inspect for a values current access chain.\n * @returns True when the chain contains `its('current')` from a valid values get or its call; otherwise false.\n *\n * @remarks\n * This helper only accepts call expressions and only evaluates member expression callees.\n *\n * @example\n * ```tsx\n * const hasCurrent = hasValuesCurrentInChain(callExpression);\n * ```\n */\nconst hasValuesCurrentInChain = (node: TSESTree.CallExpression): boolean => {\n const callee = unwrapExpression(node.callee);\n\n if (callee.type !== 'MemberExpression') {\n return false;\n }\n\n if (!ASTUtils.isIdentifier(callee.property) || callee.property.name !== 'its') {\n return false;\n }\n\n const arg = node.arguments[0];\n const isCurrent = Boolean(arg.type === 'Literal' && arg.value === 'current');\n const object = unwrapExpression(callee.object);\n\n if (object.type !== 'CallExpression') {\n return false;\n }\n\n if (isCurrent && (isValuesGetCall(object) || isValuesItsCall(object))) {\n return true;\n }\n\n return hasValuesCurrentInChain(object);\n};\n\n/**\n * Determines whether a call expression represents a Cypress `invoke` call chained from a values\n * `its('current')` lookup. It unwraps the callee and validates that the property name is `invoke` before checking the\n * call chain. It returns a boolean so callers can quickly detect the expected Cypress pattern without additional traversal.\n *\n * @param node The call expression to inspect for a values `invoke` chain.\n * @returns True when the call expression is an `invoke` call chained from a valid values current access; otherwise false.\n *\n * @remarks\n * This helper only inspects member expression callees and relies on `hasValuesCurrentInChain` for recursive chain validation.\n *\n * @example\n * ```tsx\n * const isInvoke = isValuesInvokeCall(callExpression);\n * ```\n */\nexport const isValuesInvokeCall = (node: TSESTree.CallExpression): boolean => {\n const callee = unwrapExpression(node.callee);\n\n if (callee.type !== 'MemberExpression') {\n return false;\n }\n\n if (!ASTUtils.isIdentifier(callee.property) || callee.property.name !== 'invoke') {\n return false;\n }\n\n const object = unwrapExpression(callee.object);\n\n return Boolean(object.type === 'CallExpression' && hasValuesCurrentInChain(object));\n};\n\n/**\n * Determines whether a callback body contains a values `invoke` call in its AST subtree. It walks the block statement\n * iteratively to avoid callback-based traversal while still visiting every descendant node. It returns true as soon as\n * a matching `cy.get('@values').its('current').invoke(...)` chain is detected.\n *\n * @param callback The function expression to inspect for a values invoke call chain.\n * @returns True when a values invoke call is found in the callback body; otherwise false.\n *\n * @example\n * ```tsx\n * const hasInvoke = hasValuesInvokeInCallback(callbackNode);\n * ```\n */\nexport const hasValuesInvokeInCallback = (\n // eslint-disable-next-line promise/prefer-await-to-callbacks\n callback: TSESTree.ArrowFunctionExpression | TSESTree.FunctionExpression\n): boolean => {\n if (callback.body.type !== 'BlockStatement') {\n return false;\n }\n\n let found = false;\n\n walk(callback.body, node => {\n if (found) {\n return;\n }\n\n if (node.type === 'CallExpression' && isValuesInvokeCall(node)) {\n found = true;\n }\n });\n\n return found;\n};\n\n/**\n * Analyzes the first `then` callback body for mount/wrap usage, assertions,\n * invalid statements, and invalid ordering between wrap and mount calls.\n *\n * @param callback The `then` callback function expression to inspect.\n * @returns An object describing whether the callback contains assertions, invalid statements, invalid ordering, and the presence of mount/wrap usage.\n */\n// eslint-disable-next-line promise/prefer-await-to-callbacks\nexport const checkFirstThenBody = (callback: TSESTree.ArrowFunctionExpression | TSESTree.FunctionExpression) => {\n const needs = {\n hasAssertion: false,\n hasInvalidOrder: false,\n hasInvalidStatement: false,\n hasMount: false,\n hasWrap: false\n };\n\n if (callback.body.type !== 'BlockStatement') {\n return needs;\n }\n\n const statements = callback.body.body;\n let wrapIndex = -1;\n let mountIndex = -1;\n\n for (let index = 0; index < statements.length; index += 1) {\n const statement = statements[index];\n\n if (!isAllowedFirstThenStatement(statement)) {\n needs.hasInvalidStatement = true;\n continue;\n }\n\n const expression = statement.type === 'ExpressionStatement' ? statement.expression : null;\n\n if (expression && hasWrapValues(expression)) {\n wrapIndex = index;\n }\n\n if (expression && hasMountWithMock(expression)) {\n mountIndex = index;\n }\n }\n\n if (wrapIndex !== -1 && mountIndex !== -1 && wrapIndex > mountIndex) {\n needs.hasInvalidOrder = true;\n }\n\n walk(callback.body, node => {\n if (hasMountWithMock(node)) {\n needs.hasMount = true;\n }\n\n if (hasWrapValues(node)) {\n needs.hasWrap = true;\n }\n\n if (hasAssertionCall(node)) {\n needs.hasAssertion = true;\n }\n });\n\n return needs;\n};","import {ESLintUtils} from '@typescript-eslint/utils';\n\nimport {\n checkFirstThenBody,\n checkHookArguments,\n getThenChain,\n hasValuesInvokeInCallback,\n isHookCall,\n isItCall,\n isMountHookCall,\n isThenCallbackValid,\n walk\n} from './utils/cypress-mount-hook-utils';\n\nimport type {TSESLint, TSESTree} from '@typescript-eslint/utils';\n\nconst createRule = ESLintUtils.RuleCreator(\n name => `https://github.com/nfqde/eslint-config-nfq/blob/master/docs/rules/${name}.md`\n);\n\ntype MessageIds = 'assertionInFirstThen' | 'invalidFirstThenStatement' | 'invalidHookArgument' | 'invalidThenOrder'\n | 'missingFirstThen' | 'missingHooksArgs' | 'missingMount' | 'missingSecondThen' | 'missingThenAfterInvoke'\n | 'missingThenDestructure' | 'missingThenWrap' | 'unwrappedHook';\n\nexport const cypressMountHook = createRule<[], MessageIds>({\n defaultOptions: [],\n meta: {\n docs: {description: 'Enforce mountHook/mountHooks usage and chaining patterns.'},\n messages: {\n assertionInFirstThen: 'Do not assert in the first then; mount and alias values there instead.',\n // eslint-disable-next-line @stylistic/max-len\n invalidFirstThenStatement: 'Only cy.wrap(values).as(\"values\") and cy.mount(<MockComponent />) are allowed in the first then.',\n invalidHookArgument: 'mountHook(s) must receive a hook function or an arrow that only calls a hook.',\n invalidThenOrder: 'Call cy.wrap(values).as(\"values\") before cy.mount(<MockComponent />).',\n // eslint-disable-next-line @stylistic/max-len\n missingFirstThen: 'mountHook(s) must be chained with a first then that destructures {MockComponent, values}.',\n missingHooksArgs: 'mountHooks must receive at least two hook arguments.',\n missingMount: 'First then must call cy.mount with <MockComponent />.',\n missingSecondThen: 'mountHook(s) must be chained with a second then for assertions.',\n missingThenAfterInvoke: 'Add another then after invoke to assert updated values.',\n missingThenDestructure: 'First then must destructure {MockComponent, values}.',\n missingThenWrap: 'First then must call cy.wrap(values).as(\"values\").',\n unwrappedHook: 'Hook invocations must be wrapped by mountHook(s).'\n },\n schema: [],\n type: 'suggestion'\n },\n name: 'cypress-mount-hook',\n /**\n * Creates the ESLint rule listener configuration for this rule. It inspects `it` blocks to find hook and mount\n * usage and reports violations of the rule’s chaining and argument requirements. It returns a listener map that\n * ESLint will invoke during traversal to perform these checks.\n *\n * @param context The ESLint rule context used for reporting and source inspection.\n * @returns The rule listener object that handles AST traversal.\n *\n * @example\n * ```tsx\n * const listeners = rule.create(context);\n * ```\n */\n create(context) {\n return {\n /**\n * Handles `CallExpression` nodes by validating `it` blocks for correct hook wrapping, mount usage, and then\n * chaining patterns. It walks the callback body to collect hook and mount calls, checks argument validity,\n * and reports rule violations with precise message identifiers. It also enforces the expected ordering and\n * presence of `then` callbacks to keep the mount flow consistent and safe.\n *\n * @param node The call expression node currently being visited by the ESLint traversal.\n *\n * @example\n * ```tsx\n * it('mounts hooks', () => {\n * mountHook(useMyHook).then(({MockComponent, values}) => {\n * cy.wrap(values).as('values');\n * cy.mount(<MockComponent />);\n * }).then(() => {\n * cy.get('@values').should('exist');\n * });\n * });\n * ```\n */\n // eslint-disable-next-line complexity\n CallExpression(node) {\n if (!isItCall(node)) {\n return;\n }\n\n const callback = node.arguments[1];\n\n if (callback.type !== 'ArrowFunctionExpression' && callback.type !== 'FunctionExpression') {\n return;\n }\n\n const {body} = callback;\n\n if (body.type !== 'BlockStatement') {\n return;\n }\n\n const hookCalls: TSESTree.CallExpression[] = [];\n const mountCalls: TSESTree.CallExpression[] = [];\n const allowedHookCalls = new Set<TSESTree.CallExpression>();\n\n walk(body, child => {\n if (child.type === 'CallExpression' && isHookCall(child)) {\n hookCalls.push(child);\n }\n\n if (child.type === 'CallExpression' && isMountHookCall(child)) {\n mountCalls.push(child);\n }\n });\n\n for (const mountCall of mountCalls) {\n const result = checkHookArguments(mountCall, {\n invalidHookArgument: 'invalidHookArgument',\n missingHooksArgs: 'missingHooksArgs'\n });\n const hasHookArgErrors = result.errors.length > 0;\n\n for (const error of result.errors) {\n context.report({\n messageId: error.messageId,\n node: error.node\n });\n }\n\n for (const hookCall of result.allowedHookCalls) {\n allowedHookCalls.add(hookCall);\n }\n\n const thens = getThenChain(mountCall);\n const firstThen = thens[0];\n\n // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition\n if (!firstThen) {\n context.report({\n messageId: 'missingFirstThen',\n node: mountCall\n });\n continue;\n }\n\n const validCallback = isThenCallbackValid(firstThen.arguments[0] as TSESTree.Node | undefined);\n\n if (!validCallback) {\n context.report({\n messageId: 'missingThenDestructure',\n node: firstThen\n });\n continue;\n }\n\n const {\n hasAssertion,\n hasInvalidOrder,\n hasInvalidStatement,\n hasMount,\n hasWrap\n } = checkFirstThenBody(validCallback);\n\n if (!hasWrap) {\n context.report({\n messageId: 'missingThenWrap',\n node: validCallback\n });\n }\n\n if (!hasMount) {\n context.report({\n messageId: 'missingMount',\n node: validCallback\n });\n }\n\n if (hasAssertion) {\n context.report({\n messageId: 'assertionInFirstThen',\n node: validCallback\n });\n }\n\n if (hasInvalidStatement) {\n context.report({\n messageId: 'invalidFirstThenStatement',\n node: validCallback\n });\n }\n\n if (hasInvalidOrder) {\n context.report({\n messageId: 'invalidThenOrder',\n node: validCallback\n });\n }\n\n const firstThenValid = hasWrap\n && hasMount\n && !hasAssertion\n && !hasInvalidStatement\n && !hasInvalidOrder;\n\n if (hasHookArgErrors || !firstThenValid) {\n continue;\n }\n\n const secondThen = thens[1];\n\n // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition\n if (!secondThen) {\n context.report({\n messageId: 'missingSecondThen',\n node: mountCall\n });\n continue;\n }\n\n const secondCallback = secondThen.arguments[0];\n\n if (\n secondCallback.type === 'ArrowFunctionExpression'\n || secondCallback.type === 'FunctionExpression'\n ) {\n if (hasValuesInvokeInCallback(secondCallback) && !thens[2]) {\n context.report({\n messageId: 'missingThenAfterInvoke',\n node: secondThen\n });\n }\n }\n }\n\n for (const hookCall of hookCalls) {\n if (!allowedHookCalls.has(hookCall)) {\n context.report({\n messageId: 'unwrappedHook',\n node: hookCall\n });\n }\n }\n }\n } satisfies TSESLint.RuleListener;\n }\n});","import path from 'path';\n\nimport {ASTUtils} from '@typescript-eslint/utils';\n\nimport type {TSESTree} from '@typescript-eslint/utils';\n\nexport type LayerType = 'api' | 'client-application-configs' | 'client-application-services'\n | 'client-application-usecases' | 'client-application-utils' | 'client-application' | 'client-domain'\n | 'client-shared' | 'client-ui' | 'server-configs' | 'server-controllers' | 'server-domain' | 'server-errors'\n | 'server-middleware' | 'server-services' | 'server-utils' | 'unknown';\n\n/**\n * Converts Windows-style backslashes to POSIX forward slashes in a path string. It ensures the returned path is\n * consistent for later normalization routines. It does not attempt to resolve or validate the path contents.\n *\n * @param value The path string that may contain backslashes.\n * @returns The path string with backslashes replaced by forward slashes.\n *\n * @remarks This is a simple string transformation helper.\n *\n * @example\n * ```tsx\n * const posixPath = toPosix('C:\\\\temp\\\\file.txt');\n * ```\n */\nexport const toPosix = (value: string) => value.replace(/\\\\/gu, '/');\n\n/**\n * Removes a Windows drive letter prefix from a path string. It is useful when normalizing paths across platforms.\n * It leaves non-drive paths unchanged.\n *\n * @param value The path string that may include a drive letter.\n * @returns The path string without a drive letter prefix.\n *\n * @remarks This keeps the remaining path intact.\n *\n * @example\n * ```tsx\n * const pathWithoutDrive = stripDrive('C:/temp/file.txt');\n * ```\n */\nexport const stripDrive = (value: string) => value.replace(/^[A-Za-z]:/u, '');\n\n/**\n * Normalizes a path to POSIX format and strips drive letters for consistency.\n * It also handles virtual path segments produced by certain tooling. It returns a stable, comparable path\n * string for layer detection.\n *\n * @param value The path string to normalize.\n * @returns The normalized path without drive letters and virtual prefixes.\n *\n * @remarks This function is intended for cross-platform path comparisons.\n *\n * @example\n * ```tsx\n * const normalized = normalizePath('C:\\\\proj\\\\__virtual__\\\\src\\\\index.ts');\n * ```\n */\nexport const normalizePath = (value: string) => {\n const normalized = path.posix.normalize(toPosix(value));\n const withoutDrive = stripDrive(normalized);\n\n if (withoutDrive.startsWith('/__virtual__/')) {\n return withoutDrive.replace('/__virtual__/', '/');\n }\n\n return withoutDrive;\n};\n\n/**\n * Ensures a path string ends with a trailing slash. It is used to simplify prefix comparisons.\n * It does not modify already-suffixed paths.\n *\n * @param value The path string that may need a trailing slash.\n * @returns The path string guaranteed to end with a trailing slash.\n *\n * @remarks This is a pure helper without side effects.\n *\n * @example\n * ```tsx\n * const withSlash = ensureTrailingSlash('/src/client');\n * ```\n */\nexport const ensureTrailingSlash = (value: string) => (\n value.endsWith('/') ? value : `${value}/`\n);\n\n/**\n * Builds a map of alias strings to normalized target paths. It skips invalid entries and ensures stored paths end\n * with a trailing slash. It returns a Map that can be used for import resolution.\n *\n * @param aliases The alias tuples to include in the map.\n * @returns A map of alias keys to normalized, trailing-slashed paths.\n *\n * @remarks Invalid alias pairs are ignored.\n *\n * @example\n * ```tsx\n * const aliasMap = buildAliasMap([['@app', './src']]);\n * ```\n */\nexport const buildAliasMap = (aliases: ([string, string])[]): Map<string, string> => {\n const map = new Map<string, string>();\n\n for (const [alias, aliasPath] of aliases) {\n if (!alias || !aliasPath) {\n continue;\n }\n\n map.set(alias, ensureTrailingSlash(normalizePath(aliasPath)));\n }\n\n return map;\n};\n\n/**\n * Reads alias mappings from the ESLint settings object. It safely navigates optional resolver settings and returns a\n * normalized list of alias tuples. It always returns an array, even when settings are missing.\n *\n * @param settings The ESLint settings object that may include import resolver configuration.\n * @returns The alias tuple list extracted from the resolver settings or an empty array.\n *\n * @remarks This helper only inspects the alias resolver configuration.\n *\n * @example\n * ```tsx\n * const aliases = readAliasesFromSettings({ 'import/resolver': { alias: { map: [['@app', './src']] } } });\n * ```\n */\nexport const readAliasesFromSettings = (settings: Record<string, unknown> | undefined): ([string, string])[] => {\n const resolver = settings?.['import/resolver'] as {alias?: {map?: ([string, string])[]}} | undefined;\n\n return resolver?.alias?.map ?? [];\n};\n\n/**\n * Resolves an import source using a prebuilt alias map. It checks for exact alias matches as well as alias-prefixed\n * paths. It returns the resolved path string or null when no alias applies.\n *\n * @param source The import source string to resolve.\n * @param aliasMap The map of alias keys to normalized target paths.\n * @returns The resolved path string if an alias matches, or null when no match is found.\n *\n * @remarks The alias map is expected to store trailing-slashed paths.\n *\n * @example\n * ```tsx\n * const resolved = resolveAliasImport('@app/utils', new Map([['@app', '/src/']]));\n * ```\n */\nexport const resolveAliasImport = (source: string, aliasMap: Map<string, string>) => {\n for (const [alias, aliasPath] of aliasMap.entries()) {\n if (source === alias) {\n return aliasPath;\n }\n\n if (source.startsWith(`${alias}/`)) {\n return aliasPath + source.slice(alias.length + 1);\n }\n }\n\n return null;\n};\n\n/**\n * Resolves a relative import to an absolute, normalized path. It only handles sources that start with a dot and\n * returns null for non-relative sources. It normalizes the file and joined path for consistent comparisons.\n *\n * @param source The import source string to resolve.\n * @param filename The file path that contains the import statement.\n * @returns The normalized resolved path or null when the source is not relative.\n *\n * @remarks This helper uses POSIX joins to keep results stable across platforms.\n *\n * @example\n * ```tsx\n * const resolved = resolveRelativeImport('./utils', '/src/client/index.ts');\n * ```\n */\nexport const resolveRelativeImport = (source: string, filename: string) => {\n if (!source.startsWith('.')) {\n return null;\n }\n\n const normalizedFile = normalizePath(filename);\n const dir = normalizedFile.split('/').slice(0, -1).join('/');\n\n return normalizePath(path.posix.join(dir, source));\n};\n\n/**\n * Determines the logical layer for a resolved file path based on known hexagonal folder patterns. It normalizes the\n * input path and performs ordered checks to match specific client, server, or API directories. It returns a stable\n * layer identifier so callers can apply dependency direction rules consistently.\n *\n * @param resolvedPath The resolved file path to analyze.\n * @returns The detected layer identifier or `unknown` when no match is found.\n *\n * @remarks The checks are order-dependent, so more specific paths are evaluated first.\n *\n * @example\n * ```tsx\n * const layer = getLayer('/src/server/services/user.ts');\n * ```\n */\nexport const getLayer = (resolvedPath: string): LayerType => {\n const pathValue = ensureTrailingSlash(normalizePath(resolvedPath));\n const pathWithSlash = pathValue.startsWith('/') ? pathValue : `/${pathValue}`;\n\n /**\n * Determines whether a given value is contained in either the raw path or the\n * normalized path with a trailing slash.\n *\n * @param value The substring to search for in the path variants.\n * @returns `true` if the value exists in either path representation; otherwise `false`.\n */\n const contains = (value: string) => pathValue.includes(value) || pathWithSlash.includes(value);\n\n if (contains('/src/pages/api/')) {\n return 'api';\n }\n\n if (contains('/src/client/application/configs/')) {\n return 'client-application-configs';\n }\n\n if (contains('/src/client/application/useCases/')) {\n return 'client-application-usecases';\n }\n\n if (contains('/src/client/application/services/')) {\n return 'client-application-services';\n }\n\n if (contains('/src/client/application/utils/')) {\n return 'client-application-utils';\n }\n\n if (contains('/src/client/application/')) {\n return 'client-application';\n }\n\n if (contains('/src/client/domain/')) {\n return 'client-domain';\n }\n\n if (contains('/src/client/shared/')) {\n return 'client-shared';\n }\n\n if (contains('/src/client/ui/')) {\n return 'client-ui';\n }\n\n if (contains('/src/server/configs/')) {\n return 'server-configs';\n }\n\n if (contains('/src/server/controllers/')) {\n return 'server-controllers';\n }\n\n if (contains('/src/server/domain/')) {\n return 'server-domain';\n }\n\n if (contains('/src/server/errors/')) {\n return 'server-errors';\n }\n\n if (contains('/src/server/middleware/')) {\n return 'server-middleware';\n }\n\n if (contains('/src/server/services/')) {\n return 'server-services';\n }\n\n if (contains('/src/server/utils/')) {\n return 'server-utils';\n }\n\n return 'unknown';\n};\n\n/**\n * Determines whether a layer identifier represents any client-facing layer. It relies on the `client-` prefix\n * convention used across the layer taxonomy. It returns a boolean that can be used to branch dependency rules.\n *\n * @param layer The layer identifier to evaluate.\n * @returns True when the layer starts with the client prefix; otherwise false.\n *\n * @remarks This helper performs a simple prefix check.\n *\n * @example\n * ```tsx\n * const isClient = isClientLayer('client-ui');\n * ```\n */\nexport const isClientLayer = (layer: LayerType) => layer.startsWith('client-');\n\n/**\n * Determines whether a layer identifier represents any server-facing layer. It relies on the `server-` prefix\n * convention used across the layer taxonomy. It returns a boolean that can be used to branch dependency rules.\n *\n * @param layer The layer identifier to evaluate.\n * @returns True when the layer starts with the server prefix; otherwise false.\n *\n * @remarks This helper performs a simple prefix check.\n *\n * @example\n * ```tsx\n * const isServer = isServerLayer('server-services');\n * ```\n */\nexport const isServerLayer = (layer: LayerType) => layer.startsWith('server-');\n\n/**\n * Determines whether a layer identifier represents a domain layer on either client or server. It checks for the\n * exact domain layer names defined in the layer taxonomy. It returns a boolean that can be used to enforce\n * domain-centric dependency rules.\n *\n * @param layer The layer identifier to evaluate.\n * @returns True when the layer is a client or server domain layer; otherwise false.\n *\n * @remarks This helper uses exact equality checks.\n *\n * @example\n * ```tsx\n * const isDomain = isDomainLayer('server-domain');\n * ```\n */\nexport const isDomainLayer = (layer: LayerType) => layer === 'client-domain' || layer === 'server-domain';\n\n/**\n * Determines whether a layer identifier represents the client application utilities layer. It compares the input\n * to the exact client utilities layer name. It returns a boolean suitable for applying utility-specific rules.\n *\n * @param layer The layer identifier to evaluate.\n * @returns True when the layer is the client application utilities layer; otherwise false.\n *\n * @remarks This helper uses an exact match.\n *\n * @example\n * ```tsx\n * const isUtils = isClientUtils('client-application-utils');\n * ```\n */\nexport const isClientUtils = (layer: LayerType) => layer === 'client-application-utils';\n\n/**\n * Determines whether a layer identifier represents the server utilities layer. It compares the input to the exact\n * server utilities layer name. It returns a boolean suitable for applying utility-specific rules.\n *\n * @param layer The layer identifier to evaluate.\n * @returns True when the layer is the server utilities layer; otherwise false.\n *\n * @remarks This helper uses an exact match.\n *\n * @example\n * ```tsx\n * const isUtils = isServerUtils('server-utils');\n * ```\n */\nexport const isServerUtils = (layer: LayerType) => layer === 'server-utils';\n\n/**\n * Determines whether a layer identifier represents a configuration layer. It checks for both client application\n * configs and server configs as defined by the layer taxonomy. It returns a boolean useful for config-specific\n * dependency direction checks.\n *\n * @param layer The layer identifier to evaluate.\n * @returns True when the layer is a client application configs or server configs layer; otherwise false.\n *\n * @remarks This helper uses exact equality checks.\n *\n * @example\n * ```tsx\n * const isConfig = isConfigLayer('server-configs');\n * ```\n */\nexport const isConfigLayer = (layer: LayerType) => layer === 'client-application-configs' || layer === 'server-configs';\n\n/**\n * Determines whether a program uses MobX makeAutoObservable in imports and call sites. It scans for the MobX import\n * specifier and then traverses the AST to detect usages of the identifier. It returns true only when both the import\n * and at least one invocation exist in the same program.\n *\n * @param program The TypeScript ESTree program to analyze.\n * @returns True when makeAutoObservable is imported from MobX and invoked in the program.\n *\n * @remarks This helper performs a shallow import scan and a full AST traversal.\n *\n * @example\n * ```tsx\n * const usesMobx = isMobxStoreFile(program);\n * ```\n */\n// eslint-disable-next-line complexity\nexport const isMobxStoreFile = (program: TSESTree.Program) => {\n let hasMakeAutoObservable = false;\n let usesMakeAutoObservable = false;\n\n for (const statement of program.body) {\n if (statement.type === 'ImportDeclaration' && statement.source.value === 'mobx') {\n for (const specifier of statement.specifiers) {\n if (\n specifier.type === 'ImportSpecifier'\n && specifier.imported.type === 'Identifier'\n && specifier.imported.name === 'makeAutoObservable'\n ) {\n hasMakeAutoObservable = true;\n }\n }\n }\n }\n\n const stack: TSESTree.Node[] = Array.from(program.body);\n\n while (stack.length) {\n const node = stack.pop()!;\n\n if (node.type === 'CallExpression' && ASTUtils.isIdentifier(node.callee)) {\n if (node.callee.name === 'makeAutoObservable') {\n usesMakeAutoObservable = true;\n }\n }\n\n for (const key of Object.keys(node) as (keyof TSESTree.Node)[]) {\n if (key === 'parent') {\n continue;\n }\n\n const value = node[key];\n\n // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition\n if (!value || typeof value !== 'object') {\n continue;\n }\n\n if (Array.isArray(value)) {\n for (const child of value) {\n if (child && typeof child === 'object' && 'type' in child) {\n stack.push(child as TSESTree.Node);\n }\n }\n } else if ('type' in value) {\n stack.push(value as unknown as TSESTree.Node);\n }\n }\n }\n\n return hasMakeAutoObservable && usesMakeAutoObservable;\n};","import {ESLintUtils} from '@typescript-eslint/utils';\n\nimport {\n buildAliasMap,\n getLayer,\n isClientLayer,\n isClientUtils,\n isConfigLayer,\n isDomainLayer,\n isMobxStoreFile,\n isServerLayer,\n isServerUtils,\n normalizePath,\n readAliasesFromSettings,\n resolveAliasImport,\n resolveRelativeImport\n} from './utils/hexagonal-dependency-direction-utils';\n\nimport type {TSESLint, TSESTree} from '@typescript-eslint/utils';\n\nconst createRule = ESLintUtils.RuleCreator(\n name => `https://github.com/nfqde/eslint-config-nfq/blob/master/docs/rules/${name}.md`\n);\n\ntype RuleOptions = [];\n\ntype MessageIds = 'apiImport' | 'clientApiImport' | 'crossBoundary' | 'domainImport' | 'domainUtilsImport'\n | 'missingServiceClass' | 'missingServiceImplements' | 'serverDirection' | 'uiApplicationImport';\n\nconst requiredAliases = [\n 'Domain',\n 'Application',\n 'UI',\n 'ApiRoutes',\n 'Controllers',\n 'ServerDomain',\n 'Services'\n];\n\nexport const hexagonalDependencyDirection = createRule<RuleOptions, MessageIds>({\n defaultOptions: [],\n meta: {\n docs: {description: 'Enforce hexagonal dependency direction and boundary imports.'},\n messages: {\n apiImport: 'API routes may only import controllers, middleware, or server utils.',\n clientApiImport: 'Only client application services may import API routes.',\n crossBoundary: 'Client and server layers must not import from each other.',\n domainImport: 'Domain layers must not import from other layers.',\n domainUtilsImport: 'Domain layers must not import from utils.',\n missingServiceClass: 'Client services must export a class implementing an adapter interface.',\n missingServiceImplements: 'Client services classes must implement an adapter interface.',\n serverDirection: 'Server dependency direction is domain → errors → services → controllers.',\n // eslint-disable-next-line @stylistic/max-len\n uiApplicationImport: 'UI may only import from application/useCases, application/configs, or application/utils.'\n },\n schema: [],\n type: 'problem'\n },\n name: 'hexagonal-dependency-direction',\n /**\n * This function creates the ESLint rule listeners for validating hexagonal dependency direction.\n * It initializes alias resolution, determines the current file layer, and wires up import checks.\n * It also validates service class exports and adapter implementations for client services.\n *\n * @param context The rule context used for reporting and settings.\n * @returns A rule listener map for import declarations and program validation.\n *\n * @example\n * ```tsx\n * const rule = hexagonalDependencyDirection.create(context);\n * ```\n */\n // eslint-disable-next-line max-lines-per-function\n create(context) {\n const aliases = readAliasesFromSettings(context.settings);\n const aliasMap = buildAliasMap(aliases);\n\n const missing = requiredAliases.filter(alias => !aliasMap.has(alias));\n\n if (missing.length > 0) {\n return {};\n }\n\n const {filename} = context;\n const normalizedFile = normalizePath(filename);\n const currentLayer = getLayer(normalizedFile);\n\n if (currentLayer === 'unknown') {\n return {};\n }\n\n const isClient = isClientLayer(currentLayer);\n const isServer = isServerLayer(currentLayer);\n\n /**\n * This function validates that client application services export at least one class and that the class\n * implements an adapter interface. It scans the program body for class declarations and named exports\n * containing classes. It reports rule violations when no class is found or when a class lacks implemented\n * interfaces.\n *\n * @param program The program node to analyze for service class exports.\n *\n * @example\n * ```tsx\n * reportInvalidService(program);\n * ```\n */\n const reportInvalidService = (program: TSESTree.Program) => {\n if (currentLayer !== 'client-application-services') {\n return;\n }\n\n if (isMobxStoreFile(program)) {\n return;\n }\n\n const classes: (TSESTree.ClassDeclaration | TSESTree.ClassExpression)[] = [];\n\n for (const node of program.body) {\n // @ts-expect-error\n if (node.type === 'ClassDeclaration' || node.type === 'ClassExpression') {\n classes.push(node);\n continue;\n }\n\n if (node.type === 'ExportNamedDeclaration' && node.declaration) {\n const {declaration} = node;\n\n // @ts-expect-error\n if (declaration.type === 'ClassDeclaration' || declaration.type === 'ClassExpression') {\n classes.push(declaration);\n }\n }\n }\n\n if (classes.length === 0) {\n context.report({\n messageId: 'missingServiceClass',\n node: program\n });\n\n return;\n }\n\n for (const classNode of classes) {\n if (classNode.implements.length === 0) {\n context.report({\n messageId: 'missingServiceImplements',\n node: classNode\n });\n }\n }\n };\n\n /**\n * Resolves an import source to a normalized path using aliases and relative paths. It first attempts to match\n * the source against configured aliases to ensure project-wide consistency. If no alias applies, it falls back\n * to resolving a relative import against the current file for local references.\n *\n * @param source The raw import source string from the import declaration.\n * @returns The resolved path string when resolution succeeds, or undefined when it cannot be resolved.\n *\n * @example\n * ```tsx\n * const resolved = resolveImport('@app/domain');\n * ```\n */\n const resolveImport = (source: string) => {\n const aliasResolved = resolveAliasImport(source, aliasMap);\n\n if (aliasResolved) {\n return aliasResolved;\n }\n\n return resolveRelativeImport(source, filename);\n };\n\n /**\n * Validates an import declaration against the hexagonal dependency rules for the current file.\n * It resolves the import source into a target layer and checks for forbidden cross-boundary or layer-specific dependencies.\n * It reports violations using the configured ESLint messages when a rule is broken.\n *\n * @param node The import declaration node to validate.\n *\n * @example\n * ```tsx\n * checkImport(node);\n * ```\n */\n // eslint-disable-next-line complexity\n const checkImport = (node: TSESTree.ImportDeclaration) => {\n const source = node.source.value;\n\n if (typeof source !== 'string') {\n return;\n }\n\n const resolved = resolveImport(source);\n\n if (!resolved) {\n return;\n }\n\n const targetLayer = getLayer(resolved);\n\n if (targetLayer === 'unknown') {\n return;\n }\n\n if (isClient && isServerLayer(targetLayer)) {\n context.report({\n messageId: 'crossBoundary',\n node\n });\n\n return;\n }\n\n if (isServer && isClientLayer(targetLayer)) {\n context.report({\n messageId: 'crossBoundary',\n node\n });\n\n return;\n }\n\n if (currentLayer === 'api') {\n const allowed = targetLayer === 'server-controllers'\n || targetLayer === 'server-middleware'\n || targetLayer === 'server-utils';\n\n if (!allowed) {\n context.report({\n messageId: 'apiImport',\n node\n });\n }\n\n return;\n }\n\n if (targetLayer === 'api' && currentLayer !== 'client-application-services') {\n context.report({\n messageId: 'clientApiImport',\n node\n });\n\n return;\n }\n\n if (isDomainLayer(currentLayer)) {\n if (targetLayer === 'client-shared' || targetLayer === 'server-configs') {\n return;\n }\n\n if (isConfigLayer(targetLayer)) {\n return;\n }\n\n if (isClientUtils(targetLayer) || isServerUtils(targetLayer)) {\n context.report({\n messageId: 'domainUtilsImport',\n node\n });\n\n return;\n }\n\n if (targetLayer !== currentLayer) {\n context.report({\n messageId: 'domainImport',\n node\n });\n }\n\n return;\n }\n\n if (currentLayer === 'client-application' || currentLayer === 'client-application-configs'\n || currentLayer === 'client-application-services'\n || currentLayer === 'client-application-usecases'\n || currentLayer === 'client-application-utils') {\n if (targetLayer === 'client-ui') {\n context.report({\n messageId: 'crossBoundary',\n node\n });\n }\n\n return;\n }\n\n if (currentLayer === 'client-ui') {\n const allowed = targetLayer === 'client-ui'\n || targetLayer === 'client-shared'\n || targetLayer === 'client-application-configs'\n || targetLayer === 'client-application-usecases'\n || targetLayer === 'client-application-utils';\n\n if (!allowed) {\n context.report({\n messageId: 'uiApplicationImport',\n node\n });\n }\n\n return;\n }\n\n if (currentLayer === 'server-errors') {\n const allowed = targetLayer === 'server-errors'\n || targetLayer === 'server-domain'\n || targetLayer === 'server-configs';\n\n if (!allowed) {\n context.report({\n messageId: 'serverDirection',\n node\n });\n }\n\n return;\n }\n\n if (currentLayer === 'server-services') {\n const allowed = targetLayer === 'server-services'\n || targetLayer === 'server-domain'\n || targetLayer === 'server-errors'\n || targetLayer === 'server-utils'\n || targetLayer === 'server-configs';\n\n if (!allowed) {\n context.report({\n messageId: 'serverDirection',\n node\n });\n }\n\n return;\n }\n\n if (currentLayer === 'server-controllers') {\n const allowed = targetLayer === 'server-controllers'\n || targetLayer === 'server-domain'\n || targetLayer === 'server-errors'\n || targetLayer === 'server-services'\n || targetLayer === 'server-utils'\n || targetLayer === 'server-middleware'\n || targetLayer === 'server-configs';\n\n if (!allowed) {\n context.report({\n messageId: 'serverDirection',\n node\n });\n }\n }\n };\n\n return {\n ImportDeclaration: checkImport,\n /**\n * Inspects constructor method definitions to detect assignments where a class method\n * is bound to `this` via `.bind(this)`, and reports such bindings for further handling.\n * This listener is triggered for the entire program to validate service class exports and adapter implementations\n * for client application services. It ensures that the hexagonal architecture rules are enforced at the program level.\n *\n * @param program The program node to analyze for service class export and implementation validation.\n */\n Program(program) {\n reportInvalidService(program);\n }\n } satisfies TSESLint.RuleListener;\n }\n});","import {ESLintUtils} from '@typescript-eslint/utils';\n\nimport type {TSESLint, TSESTree} from '@typescript-eslint/utils';\n\nconst createRule = ESLintUtils.RuleCreator(\n name => `https://github.com/nfqde/eslint-config-nfq/blob/master/docs/rules/${name}.md`\n);\n\nexport const noEmptyLinesInObjects = createRule({\n defaultOptions: [],\n meta: {\n docs: {description: 'Disallow empty lines inside object literals'},\n fixable: 'whitespace',\n messages: {noEmptyLine: 'Empty lines inside object literals are not allowed.'},\n schema: [],\n type: 'layout'\n },\n name: 'no-empty-lines-in-objects',\n /**\n * Creates the ESLint rule implementation that checks for empty lines in object literals.\n * This function sets up the rule's core logic by defining helper functions for gap detection\n * and block member validation, then returns listener functions that process AST nodes.\n *\n * @param context The ESLint rule context containing source code and reporting utilities.\n * @returns An object containing AST node listeners for rule enforcement.\n *\n * @example\n * ```tsx\n * const rule = createRule({\n * create(context) {\n * // Rule implementation\n * }\n * });\n * ```\n */\n create(context) {\n const {sourceCode} = context;\n\n type TokenLike = TSESTree.Comment | TSESTree.Node | TSESTree.Token;\n type ListenerNode = TSESTree.Node;\n\n /**\n * Reports gaps containing empty lines between two tokens in an object structure.\n * This function analyzes the whitespace between tokens and reports violations when\n * multiple consecutive newlines are found, providing automatic fixes when possible.\n *\n * @param node The AST node associated with the gap being checked.\n * @param startToken The starting token of the gap to check.\n * @param endToken The ending token of the gap to check.\n *\n * @example\n * ```tsx\n * reportGap(objectNode, leftBrace, firstProperty);\n * ```\n */\n const reportGap = (node: TSESTree.Node, startToken: TokenLike, endToken: TokenLike): void => {\n const startIndex = startToken.range[1];\n const endLineStartIndex = sourceCode.getIndexFromLoc({\n column: 0,\n line: endToken.loc.start.line\n });\n const gapText = sourceCode.text.slice(startIndex, endLineStartIndex);\n\n if (gapText.includes('\\n\\n')) {\n const indent = sourceCode.text.slice(endLineStartIndex, endToken.range[0]);\n const sourceText = sourceCode.text;\n let scanIndex = endLineStartIndex - 1;\n\n while (scanIndex >= startIndex && (/\\s/u).test(sourceText[scanIndex])) {\n scanIndex -= 1;\n }\n\n const fixStartIndex = Math.max(startIndex, scanIndex + 1);\n\n context.report({\n fix: fixer => fixer.replaceTextRange([fixStartIndex, endToken.range[0]], `\\n${indent}`),\n loc: endToken.loc,\n messageId: 'noEmptyLine',\n node\n });\n }\n };\n\n /**\n * Checks block-style structures for empty lines between their opening brace, members, and closing brace.\n * This function iterates through all members of a block structure and validates spacing\n * between the opening brace and first member, between consecutive members, and between the last member and closing brace.\n *\n * @param node The parent AST node containing the block structure.\n * @param members An array of member nodes within the block structure.\n *\n * @example\n * ```tsx\n * checkBlockMembers(objectNode, objectNode.properties);\n * ```\n */\n const checkBlockMembers = (node: TSESTree.Node, members: TSESTree.Node[] | undefined): void => {\n const leftBrace = sourceCode.getFirstToken(node);\n const rightBrace = sourceCode.getLastToken(node);\n\n if (!leftBrace || !rightBrace) {\n return;\n }\n\n const memberItems: {end: TSESTree.Token; start: TSESTree.Token}[] = [];\n\n for (const member of members ?? []) {\n const memberTokens = sourceCode.getTokens(member);\n\n if (memberTokens.length === 0) {\n continue;\n }\n\n memberItems.push({\n end: memberTokens[memberTokens.length - 1],\n start: memberTokens[0]\n });\n }\n const memberRanges = memberItems.map(item => ({\n end: item.end.range[1],\n start: item.start.range[0]\n }));\n const commentItems = sourceCode\n .getTokensBetween(leftBrace, rightBrace, {includeComments: true})\n .filter(token => token.type === 'Block' || token.type === 'Line')\n .filter(comment => !memberRanges\n .some(range => comment.range[0] >= range.start && comment.range[1] <= range.end))\n .map(comment => ({\n end: comment,\n start: comment\n }));\n const items = [...memberItems, ...commentItems]\n .sort((a, b) => a.start.range[0] - b.start.range[0]);\n\n if (items.length === 0) {\n return;\n }\n\n reportGap(node, leftBrace, items[0].start);\n\n for (let i = 1; i < items.length; i += 1) {\n reportGap(node, items[i - 1].end, items[i].start);\n }\n\n reportGap(node, items[items.length - 1].end, rightBrace);\n };\n\n const listeners: TSESLint.RuleListener = {\n /**\n * Handles ObjectExpression nodes to check for empty lines within object literals.\n * This listener function validates that object expressions follow the no-empty-lines rule\n * by examining spacing between properties and braces within the object structure.\n *\n * @param node The ObjectExpression AST node to validate.\n *\n * @example\n * ```tsx\n * // This would trigger the rule:\n * const obj = {\n * prop1: 'value',\n *\n * prop2: 'value'\n * };\n * ```\n */\n ObjectExpression(node: ListenerNode) {\n if (node.type !== 'ObjectExpression') {\n return;\n }\n const objectNode = node;\n\n checkBlockMembers(objectNode, objectNode.properties as TSESTree.Node[]);\n }\n };\n\n return listeners;\n }\n});","import {ESLintUtils} from '@typescript-eslint/utils';\n\nimport type {TSESLint, TSESTree} from '@typescript-eslint/utils';\n\nconst createRule = ESLintUtils.RuleCreator(\n name => `https://github.com/nfqde/eslint-config-nfq/blob/master/docs/rules/${name}.md`\n);\n\nexport const noEmptyLinesInTypes = createRule({\n defaultOptions: [],\n meta: {\n docs: {description: 'Disallow empty lines inside TypeScript interface and type literal bodies'},\n fixable: 'whitespace',\n messages: {noEmptyLine: 'Empty lines inside type bodies are not allowed.'},\n schema: [],\n type: 'layout'\n },\n name: 'no-empty-lines-in-types',\n /**\n * Creates an ESLint rule implementation that checks for empty lines in TypeScript type definitions.\n * This function returns a rule listener object that validates TypeScript interface bodies and type literals to ensure they don't contain unnecessary empty lines.\n * The rule helps maintain consistent formatting by preventing blank lines after opening braces, between members, and before closing braces.\n *\n * @param context The ESLint rule context containing source code and reporting utilities.\n * @returns An object containing event listeners for AST node types that need to be checked.\n *\n * @example\n * ```tsx\n * // This would trigger the rule (has empty line):\n * interface User {\n *\n * name: string;\n * }\n *\n * // This is correct (no empty lines):\n * interface User {\n * name: string;\n * }\n * ```\n */\n create(context) {\n const {sourceCode} = context;\n\n type TokenLike = TSESTree.Comment | TSESTree.Node | TSESTree.Token;\n type ListenerNode = TSESTree.Node;\n\n /**\n * Reports and fixes empty line gaps between tokens in TypeScript type definitions.\n * This function analyzes the text between two tokens to detect multiple consecutive newlines and reports them as violations.\n * It also provides an automatic fix by removing the extra empty lines while preserving proper indentation.\n *\n * @param node The AST node where the violation occurs.\n * @param startToken The token that marks the beginning of the gap to check.\n * @param endToken The token that marks the end of the gap to check.\n */\n const reportGap = (node: TSESTree.Node, startToken: TokenLike, endToken: TokenLike): void => {\n const startIndex = startToken.range[1];\n const endLineStartIndex = sourceCode.getIndexFromLoc({\n column: 0,\n line: endToken.loc.start.line\n });\n const gapText = sourceCode.text.slice(startIndex, endLineStartIndex);\n\n if (gapText.includes('\\n\\n')) {\n const indent = sourceCode.text.slice(endLineStartIndex, endToken.range[0]);\n const sourceText = sourceCode.text;\n let scanIndex = endLineStartIndex - 1;\n\n while (scanIndex >= startIndex && (/\\s/u).test(sourceText[scanIndex])) {\n scanIndex -= 1;\n }\n\n const fixStartIndex = Math.max(startIndex, scanIndex + 1);\n\n context.report({\n fix: fixer => fixer.replaceTextRange([fixStartIndex, endToken.range[0]], `\\n${indent}`),\n loc: endToken.loc,\n messageId: 'noEmptyLine',\n node\n });\n }\n };\n\n /**\n * Checks all members within a TypeScript interface or type literal block for empty line violations.\n * This function iterates through the members of a type definition and validates that there are no empty lines after the opening brace, between members, or before the closing brace.\n * It uses the reportGap function to identify and report any violations found in the spacing between type members.\n *\n * @param node The AST node representing the interface or type literal.\n * @param members An array of type elements (properties, methods, etc.) within the type definition.\n */\n const checkBlockMembers = (node: TSESTree.Node, members: TSESTree.TypeElement[]): void => {\n const leftBrace = sourceCode.getFirstToken(node);\n const rightBrace = sourceCode.getLastToken(node);\n\n if (!leftBrace || !rightBrace) {\n return;\n }\n\n const memberItems: {end: TSESTree.Token; start: TSESTree.Token}[] = [];\n\n for (const member of members) {\n const memberTokens = sourceCode.getTokens(member);\n\n if (memberTokens.length === 0) {\n continue;\n }\n\n memberItems.push({\n end: memberTokens[memberTokens.length - 1],\n start: memberTokens[0]\n });\n }\n const memberRanges = memberItems.map(item => ({\n end: item.end.range[1],\n start: item.start.range[0]\n }));\n const commentItems = sourceCode\n .getTokensBetween(leftBrace, rightBrace, {includeComments: true})\n .filter(token => token.type === 'Block' || token.type === 'Line')\n .filter(comment => !memberRanges\n .some(range => comment.range[0] >= range.start && comment.range[1] <= range.end))\n .map(comment => ({\n end: comment,\n start: comment\n }));\n const items = [...memberItems, ...commentItems]\n .sort((a, b) => a.start.range[0] - b.start.range[0]);\n\n if (items.length === 0) {\n return;\n }\n\n reportGap(node, leftBrace, items[0].start);\n\n for (let i = 1; i < items.length; i += 1) {\n reportGap(node, items[i - 1].end, items[i].start);\n }\n\n reportGap(node, items[items.length - 1].end, rightBrace);\n };\n\n const listeners: TSESLint.RuleListener = {\n /**\n * Handles TypeScript interface body nodes to check for empty line violations.\n * This listener function is called whenever the ESLint parser encounters a TSInterfaceBody node during traversal.\n * It validates that the node type is correct and then delegates to checkBlockMembers to perform the actual empty line checking.\n *\n * @param node The AST node representing a TypeScript interface body.\n */\n TSInterfaceBody(node: ListenerNode) {\n if ((node).type !== 'TSInterfaceBody') {\n return;\n }\n const interfaceNode = node;\n\n checkBlockMembers(interfaceNode, interfaceNode.body);\n },\n /**\n * Handles TypeScript type literal nodes to check for empty line violations.\n * This listener function is called whenever the ESLint parser encounters a TSTypeLiteral node during traversal.\n * It validates that the node type is correct and then delegates to checkBlockMembers to perform the actual empty line checking.\n *\n * @param node The AST node representing a TypeScript type literal.\n */\n TSTypeLiteral(node: ListenerNode) {\n if ((node).type !== 'TSTypeLiteral') {\n return;\n }\n const typeLiteralNode = node;\n\n checkBlockMembers(typeLiteralNode, typeLiteralNode.members);\n }\n };\n\n return listeners;\n }\n});","import {ASTUtils} from '@typescript-eslint/utils';\n\nimport type {TSESTree} from '@typescript-eslint/utils';\n\nexport type AstNode = TSESTree.Node | null | undefined;\n\n/**\n * Extracts the static property name from an AST node if it can be determined statically.\n * This function handles Property, MethodDefinition, and MemberExpression nodes and attempts\n * to resolve their property names to string values when possible at compile time.\n *\n * @param node The AST node to extract the property name from.\n * @returns The static property name as a string, or null if it cannot be determined statically.\n *\n * @example\n * ```tsx\n * // For obj.prop\n * const memberExpr = // ... MemberExpression node\n * const propName = getStaticPropertyName(memberExpr); // Returns \"prop\"\n *\n * // For { key: value }\n * const property = // ... Property node\n * const keyName = getStaticPropertyName(property); // Returns \"key\"\n * ```\n */\nexport const getStaticPropertyName = (node: AstNode): string | null => {\n let prop: TSESTree.Node | null = null;\n\n switch (node?.type) {\n case 'Property':\n case 'MethodDefinition':\n prop = node.key;\n break;\n case 'MemberExpression':\n prop = node.property;\n break;\n default:\n return null;\n }\n\n // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition\n if (!prop) {\n return null;\n }\n\n switch (prop.type) {\n case 'Literal':\n return String(prop.value);\n case 'TemplateLiteral':\n if (prop.expressions.length === 0 && prop.quasis.length === 1) {\n // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition\n return prop.quasis[0].value.cooked ?? null;\n }\n break;\n case 'Identifier': {\n const isComputed = 'computed' in node && node.computed;\n\n if (!isComputed) {\n return prop.name;\n }\n break;\n }\n default:\n break;\n }\n\n return null;\n};\n\n/**\n * Checks whether the actual text matches the expected pattern or string value.\n * This utility function provides a unified way to test strings against both literal string values and regular expressions.\n * It returns true if the actual string equals the expected string (when expected is a string) or matches the pattern (when expected is a RegExp).\n *\n * @param actual The actual string value to be tested against the expected pattern or value.\n * @param expected The expected pattern (RegExp) or literal string value to match against the actual string.\n * @returns True if the actual string matches the expected value or pattern, false otherwise.\n *\n * @example\n * ```tsx\n * // String comparison\n * const result1 = checkText(\"hello\", \"hello\"); // Returns true\n * const result2 = checkText(\"hello\", \"world\"); // Returns false\n *\n * // RegExp comparison\n * const pattern = /^test/;\n * const result3 = checkText(\"testing\", pattern); // Returns true\n * const result4 = checkText(\"example\", pattern); // Returns false\n * ```\n */\nexport const checkText = (actual: string, expected: RegExp | string): boolean => (\n typeof expected === 'string' ? actual === expected : expected.test(actual)\n);\n\n/**\n * Skips a ChainExpression node and returns its inner expression.\n * When encountering optional chaining expressions (e.g., `obj?.prop`), this utility\n * unwraps the ChainExpression wrapper to access the underlying expression node.\n *\n * @param node The AST node to potentially unwrap.\n * @returns The inner expression if the node is a ChainExpression, otherwise the original node.\n *\n * @example\n * ```typescript\n * // For optional chaining: obj?.prop\n * const chainNode = // ... ChainExpression node\n * const innerNode = skipChainExpression(chainNode); // Returns the MemberExpression\n * ```\n */\nexport const skipChainExpression = (node: AstNode): AstNode => (\n node?.type === 'ChainExpression' ? node.expression : node\n);\n\n/**\n * Checks whether the provided AST node represents a numeric literal value.\n * This function performs type narrowing to determine if a node is a Literal with a numeric value,\n * including both regular numbers and BigInt values. It serves as a type guard that helps with\n * type safety when working with numeric literals in AST processing.\n *\n * @param node The AST node to check for numeric literal properties.\n * @returns True if the node is a numeric Literal (number or BigInt), false otherwise.\n *\n * @example\n * ```tsx\n * // For numeric literal: 42\n * const numberNode = // ... Literal node with value 42\n * const isNumeric = isNumericLiteral(numberNode); // Returns true\n *\n * // For BigInt literal: 123n\n * const bigintNode = // ... Literal node with BigInt value\n * const isBigInt = isNumericLiteral(bigintNode); // Returns true\n *\n * // For string literal: \"hello\"\n * const stringNode = // ... Literal node with string value\n * const isString = isNumericLiteral(stringNode); // Returns false\n * ```\n */\nexport const isNumericLiteral = (node: AstNode): node is TSESTree.Literal => Boolean(\n node?.type === 'Literal'\n && (typeof node.value === 'number' || 'bigint' in node)\n);\n\n/**\n * Determines whether the provided AST node is an Identifier and whether its name matches the given pattern.\n * The check uses the shared text matcher to support both literal string comparisons and regular expressions.\n * This utility is useful for narrowing nodes when analyzing specific identifier names in the AST.\n *\n * @param node The AST node to test for an Identifier and name match.\n * @param name The expected identifier name or a RegExp pattern to match against the node name.\n * @returns True when the node is an Identifier and its name matches the provided pattern, otherwise false.\n *\n * @example\n * ```tsx\n * const node = // ... Identifier node with name \"foo\"\n * const matches = isSpecificId(node, \"foo\"); // Returns true\n * ```\n */\nexport const isSpecificId = (node: AstNode, name: RegExp | string): boolean => (\n ASTUtils.isIdentifier(node) && checkText(node.name, name)\n);\n\n/**\n * Checks whether a given AST node represents a specific member access pattern with optional object and property constraints.\n * This utility unwraps optional chaining, verifies the node is a MemberExpression, and then validates the object and property\n * names using shared matchers for strings and regular expressions. It is useful for rule logic that needs to detect precise\n * member access patterns while safely handling null or optional inputs.\n *\n * @param node The AST node to inspect for a member access expression.\n * @param objectName The expected object identifier name or pattern, or null to skip the object check.\n * @param propertyName The expected property name or pattern, or null to skip the property check.\n * @returns True when the node is a matching member access expression based on the provided constraints, otherwise false.\n *\n * @example\n * ```tsx\n * // For obj.prop\n * const memberNode = // ... MemberExpression node\n * const matches = isSpecificMemberAccess(memberNode, \"obj\", \"prop\"); // Returns true\n * ```\n */\nexport const isSpecificMemberAccess = (\n node: AstNode,\n objectName: RegExp | string | null,\n propertyName: RegExp | string | null\n): boolean => {\n const checkNode = skipChainExpression(node);\n\n if (checkNode?.type !== 'MemberExpression') {\n return false;\n }\n\n if (objectName && !isSpecificId(checkNode.object as AstNode, objectName)) {\n return false;\n }\n\n if (propertyName) {\n const actualPropertyName = getStaticPropertyName(checkNode);\n\n if (typeof actualPropertyName !== 'string' || !checkText(actualPropertyName, propertyName)) {\n return false;\n }\n }\n\n return true;\n};","/**\n * Normalizes a value used in magic number ignore lists into a consistent numeric form.\n * It ensures string values with numeric suffixes are converted to bigint while preserving\n * numeric and bigint inputs as-is. This helps downstream comparisons behave predictably\n * across mixed input types.\n *\n * @param value The ignore value to normalize, which may be a bigint, number, or string.\n * @returns The normalized value as a bigint or number suitable for comparisons.\n *\n *\n * @example\n * ```tsx\n * const normalized = normalizeIgnoreValue('10n');\n * ```\n */\nexport const normalizeIgnoreValue = (value: bigint | number | string) => (\n typeof value === 'string' ? BigInt(value.slice(0, -1)) : value\n);","import {AST_NODE_TYPES, ASTUtils, ESLintUtils} from '@typescript-eslint/utils';\n\nimport {isNumericLiteral, isSpecificId, isSpecificMemberAccess} from './utils/ast-utils';\nimport {normalizeIgnoreValue} from './utils/no-magic-numbers-utils';\n\nimport type {TSESLint, TSESTree} from '@typescript-eslint/utils';\n\nconst createRule = ESLintUtils.RuleCreator(\n name => `https://github.com/nfqde/eslint-config-nfq/blob/master/docs/rules/${name}.md`\n);\n\n// Maximum array length by the ECMAScript Specification.\n// eslint-disable-next-line @nfq/no-magic-numbers\nconst MAX_ARRAY_LENGTH = 2 ** 32 - 1;\n\ntype RuleOptions = [\n {\n detectObjects?: boolean;\n enforceConst?: boolean;\n ignore?: (number | string)[];\n ignoreArrayIndexes?: boolean;\n ignoreArrays?: boolean;\n ignoreClassFieldInitialValues?: boolean;\n ignoreConstDeclarations?: boolean;\n ignoreDefaultValues?: boolean;\n ignoreFunctions?: string[];\n }\n];\n\ntype MessageIds = 'noMagic' | 'useConst';\n\nexport const noMagicNumbers = createRule<RuleOptions, MessageIds>({\n defaultOptions: [{}],\n meta: {\n docs: {description: 'Disallow magic numbers, allows for ignoring functions'},\n messages: {\n noMagic: 'No magic number: {{raw}}.',\n useConst: \"Number constants declarations must use 'const'.\"\n },\n schema: [\n {\n additionalProperties: false,\n properties: {\n detectObjects: {\n default: false,\n type: 'boolean'\n },\n enforceConst: {\n default: false,\n type: 'boolean'\n },\n ignore: {\n items: {\n anyOf: [\n {type: 'number'},\n {\n pattern: '^[+-]?(?:0|[1-9][0-9]*)n$',\n type: 'string'\n }\n ]\n },\n type: 'array',\n uniqueItems: true\n },\n ignoreArrayIndexes: {\n default: false,\n type: 'boolean'\n },\n ignoreArrays: {\n default: false,\n type: 'boolean'\n },\n ignoreClassFieldInitialValues: {\n default: false,\n type: 'boolean'\n },\n ignoreConstDeclarations: {\n default: false,\n type: 'boolean'\n },\n ignoreDefaultValues: {\n default: false,\n type: 'boolean'\n },\n ignoreFunctions: {\n items: {type: 'string'},\n type: 'array',\n uniqueItems: true\n }\n },\n type: 'object'\n }\n ],\n type: 'suggestion'\n },\n name: 'no-magic-numbers',\n /**\n * Creates the rule listener set used to report magic numbers based on configured options.\n * It initializes configuration flags and helper predicates that keep the rule logic readable and consistent.\n * It returns the listener object that ESLint invokes for each relevant node in the AST.\n *\n * @param context The rule context providing options, reporting utilities, and source information.\n * @returns The listener map that ESLint uses to traverse and validate nodes.\n *\n * @example\n * ```tsx\n * const listeners = create(context);\n * ```\n */\n create(context) {\n const config = context.options[0];\n const detectObjects = Boolean(config.detectObjects);\n const enforceConst = Boolean(config.enforceConst);\n const ignore = new Set((config.ignore ?? []).map(normalizeIgnoreValue));\n const ignoreArrays = Boolean(config.ignoreArrays);\n const ignoreArrayIndexes = Boolean(config.ignoreArrayIndexes);\n const ignoreDefaultValues = Boolean(config.ignoreDefaultValues);\n const ignoreClassFieldInitialValues = Boolean(config.ignoreClassFieldInitialValues);\n const ignoreConstDeclarations = Boolean(config.ignoreConstDeclarations);\n const ignoreFunctions = config.ignoreFunctions ?? [];\n\n const okTypes = detectObjects\n ? []\n : [AST_NODE_TYPES.ObjectExpression, AST_NODE_TYPES.Property, AST_NODE_TYPES.AssignmentExpression];\n\n /**\n * Determines whether a numeric literal value should be ignored based on the configured ignore set.\n * This helper keeps the rule logic concise by centralizing the ignore lookup.\n * It returns a boolean that directly maps to whether reporting should be skipped.\n *\n * @param value The numeric or bigint value to check against the ignore set.\n * @returns True when the value is present in the ignore set and should be skipped.\n *\n * @example\n * ```tsx\n * const ignored = isIgnoredValue(10);\n * ```\n */\n const isIgnoredValue = (value: bigint | number) => ignore.has(value);\n\n /**\n * Checks whether a numeric literal is used as a default value in an assignment pattern.\n * This supports the rule option to ignore default parameter values.\n * It returns true only when the literal is the right-hand side of an assignment pattern.\n *\n * @param fullNumberNode The literal node that may be part of an assignment pattern.\n * @returns True when the node is a default value in an assignment pattern.\n *\n * @example\n * ```tsx\n * const ignored = isDefaultValue(node);\n * ```\n */\n const isDefaultValue = (fullNumberNode: TSESTree.Node) => {\n const {parent} = fullNumberNode;\n\n return Boolean(parent?.type === AST_NODE_TYPES.AssignmentPattern && parent.right === fullNumberNode);\n };\n\n /**\n * Determines whether a numeric literal is the initializer of a class field.\n * This supports the rule option to ignore class field initial values.\n * It returns true only when the literal is the value of a PropertyDefinition node.\n *\n * @param fullNumberNode The literal node that may be used as a class field initializer.\n * @returns True when the node is the initial value of a class field definition.\n *\n * @example\n * ```tsx\n * const ignored = isClassFieldInitialValue(node);\n * ```\n */\n const isClassFieldInitialValue = (fullNumberNode: TSESTree.Node) => {\n const {parent} = fullNumberNode;\n\n return Boolean(\n parent?.type === AST_NODE_TYPES.PropertyDefinition\n && parent.value === fullNumberNode\n );\n };\n\n /**\n * Determines whether a numeric literal represents the radix argument of a parseInt call.\n * It inspects the parent call expression and verifies the second argument position.\n * It only matches parseInt or Number.parseInt usage to keep the rule focused.\n *\n * @param fullNumberNode The numeric literal node to inspect within the call expression.\n * @returns True when the node is used as the radix argument in a parseInt call.\n *\n * @example\n * ```tsx\n * const ignored = isParseIntRadix(node);\n * ```\n */\n const isParseIntRadix = (fullNumberNode: TSESTree.Node) => {\n const {parent} = fullNumberNode;\n\n return Boolean(\n parent?.type === AST_NODE_TYPES.CallExpression\n && fullNumberNode === parent.arguments[1]\n && (\n isSpecificId(parent.callee, 'parseInt')\n || isSpecificMemberAccess(parent.callee, 'Number', 'parseInt')\n )\n );\n };\n\n /**\n * Checks whether a numeric literal appears within JSX syntax.\n * It looks at the parent node type and matches JSX-prefixed node types.\n * It returns a boolean to indicate whether the number should be treated as JSX-related.\n *\n * @param fullNumberNode The numeric literal node to evaluate for JSX context.\n * @returns True when the parent node is a JSX-related AST node.\n *\n * @example\n * ```tsx\n * const ignored = isJSXNumber(node);\n * ```\n */\n const isJSXNumber = (fullNumberNode: TSESTree.Node) => Boolean(fullNumberNode.parent?.type.startsWith('JSX'));\n\n /**\n * Determines whether a numeric literal is used as an array index.\n * It validates member expression usage and ensures the value is a non-negative integer or bigint.\n * It also enforces the ECMAScript maximum array length constraint.\n *\n * @param fullNumberNode The numeric literal node that may be used as an index.\n * @param value The numeric or bigint value extracted from the literal.\n * @returns True when the node is a valid array index access.\n *\n * @example\n * ```tsx\n * const ignored = isArrayIndex(node, 0);\n * ```\n */\n const isArrayIndex = (fullNumberNode: TSESTree.Node, value: bigint | number) => {\n const {parent} = fullNumberNode;\n\n return Boolean(\n parent?.type === AST_NODE_TYPES.MemberExpression\n && parent.property === fullNumberNode\n && (Number.isInteger(value) || typeof value === 'bigint')\n && value >= 0\n && value < MAX_ARRAY_LENGTH\n );\n };\n\n /**\n * Determines whether a numeric literal is declared within a const variable declaration.\n * It walks up the AST from the provided node until it finds a VariableDeclarator, then inspects\n * the corresponding declaration. It only reports true when the declaration exists and is explicitly a\n * const declaration, keeping the rule logic consistent with configuration. This helps the rule skip numbers\n * that are already in const contexts when configured. It returns false when the feature is disabled\n * or no const declaration is found.\n *\n * @param node The AST node to inspect for an enclosing const declaration.\n * @returns True when the node is part of a const variable declarator, otherwise false.\n *\n * @example\n * ```tsx\n * const ignored = isConstValue(node);\n * ```\n */\n const isConstValue = (node: TSESTree.Node | null | undefined) => {\n if (!ignoreConstDeclarations) {\n return false;\n }\n\n let current: TSESTree.Node | null | undefined = node;\n\n while (current) {\n if (current.type === AST_NODE_TYPES.VariableDeclarator) {\n const declaration = current.parent;\n\n return Boolean(\n // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition\n declaration?.type === AST_NODE_TYPES.VariableDeclaration\n && declaration.kind === 'const'\n );\n }\n\n current = current.parent;\n }\n\n return false;\n };\n\n /**\n * Determines whether a numeric literal appears within a call to an ignored function.\n * It inspects identifier and member expression callees to match configured names.\n * It returns false when the parent is not a call expression.\n *\n * @param parent The parent node to examine for a call expression context.\n * @returns True when the call matches a configured ignored function name.\n *\n * @example\n * ```tsx\n * const ignored = shouldIgnoreFunctions(node.parent);\n * ```\n */\n const shouldIgnoreFunctions = (parent: TSESTree.Node | null | undefined) => {\n if (parent?.type !== AST_NODE_TYPES.CallExpression) {\n return false;\n }\n\n if (ASTUtils.isIdentifier(parent.callee)) {\n return ignoreFunctions.includes(parent.callee.name);\n }\n\n if (\n parent.callee.type === AST_NODE_TYPES.MemberExpression\n && ASTUtils.isIdentifier(parent.callee.property)\n ) {\n return ignoreFunctions.includes(parent.callee.property.name);\n }\n\n return false;\n };\n\n /**\n * Determines whether a numeric literal appears within an array literal when arrays are ignored.\n * It checks the parent node for an array expression and consults the ignoreArrays flag.\n * It returns a boolean that directly informs the rule logic.\n *\n * @param parent The parent node to inspect for an array literal context.\n * @returns True when the parent is an array expression and arrays are configured to be ignored.\n *\n * @example\n * ```tsx\n * const ignored = shouldIgnoreArrays(node.parent);\n * ```\n */\n const shouldIgnoreArrays = (parent: TSESTree.Node | null | undefined) => Boolean(\n parent?.type === AST_NODE_TYPES.ArrayExpression && ignoreArrays\n );\n\n const listeners: TSESLint.RuleListener = {\n /**\n * Reports numeric literals that are considered magic numbers based on the configured options.\n * It handles negative literals, ignored contexts, and enforces const declarations when enabled.\n *\n * @param node The literal node encountered by the rule listener.\n */\n // eslint-disable-next-line complexity\n Literal(node: TSESTree.Literal) {\n if (!isNumericLiteral(node)) {\n return;\n }\n\n const numericValue = node.value;\n\n if (typeof numericValue !== 'number' && typeof numericValue !== 'bigint') {\n return;\n }\n\n let fullNumberNode: TSESTree.Node;\n let parent: TSESTree.Node | null | undefined;\n let value: bigint | number;\n let raw: string | null | undefined;\n\n // For negative magic numbers: update the value and parent node\n if (node.parent.type === AST_NODE_TYPES.UnaryExpression && node.parent.operator === '-') {\n fullNumberNode = node.parent;\n parent = fullNumberNode.parent;\n value = -numericValue;\n raw = `-${node.raw}`;\n } else {\n fullNumberNode = node;\n parent = node.parent;\n value = numericValue;\n raw = node.raw;\n }\n\n if (\n isIgnoredValue(value)\n || (ignoreDefaultValues && isDefaultValue(fullNumberNode))\n || (ignoreClassFieldInitialValues && isClassFieldInitialValue(fullNumberNode))\n || isParseIntRadix(fullNumberNode)\n || isJSXNumber(fullNumberNode)\n || (ignoreArrayIndexes && isArrayIndex(fullNumberNode, value))\n || shouldIgnoreFunctions(parent)\n || shouldIgnoreArrays(parent)\n || (ignoreConstDeclarations && isConstValue(fullNumberNode))\n ) {\n return;\n }\n\n if (parent.type === AST_NODE_TYPES.VariableDeclarator) {\n // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition\n if (enforceConst && parent.parent.type === AST_NODE_TYPES.VariableDeclaration) {\n if (parent.parent.kind !== 'const') {\n context.report({\n messageId: 'useConst',\n node: fullNumberNode\n });\n }\n }\n } else if (\n !okTypes.includes(parent.type)\n || (\n parent.type === AST_NODE_TYPES.AssignmentExpression\n && parent.left.type === AST_NODE_TYPES.Identifier\n )\n ) {\n context.report({\n data: {raw},\n messageId: 'noMagic',\n node: fullNumberNode\n });\n }\n }\n };\n\n return listeners;\n }\n});","import {AST_NODE_TYPES} from '@typescript-eslint/utils';\nimport ts from 'typescript';\n\nimport type {TSESTree} from '@typescript-eslint/utils';\n\nexport const DEFAULT_DECORATORS = ['autobind'];\n\n/**\n * Normalizes decorator names into a set of clean, consistent identifiers. It trims whitespace,\n * removes empty entries, and strips a leading '@' from each name. It also falls back to the default decorators when\n * no list is provided.\n *\n * @param names The optional list of decorator names to normalize.\n * @returns A set containing the normalized decorator names.\n *\n * @example\n * ```tsx\n * const names = normalizeDecoratorNames([' @autobind ', 'custom']);\n * ```\n */\nexport const normalizeDecoratorNames = (names?: string[]) => new Set(\n (names ?? DEFAULT_DECORATORS)\n .map(name => name.trim())\n .filter(Boolean)\n .map(name => (name.startsWith('@') ? name.slice(1) : name))\n);\n\n/**\n * Extracts the decorator name from a TypeScript decorator node. It supports identifiers, call expressions,\n * and property access expressions. It returns null when no recognizable name can be derived from the decorator syntax.\n *\n * @param decorator The decorator node to inspect for a name.\n * @returns The resolved decorator name or null when it cannot be determined.\n *\n * @example\n * ```tsx\n * const name = getDecoratorName(node.decorators[0]);\n * ```\n */\nexport const getDecoratorName = (decorator: ts.Decorator): string | null => {\n const {expression} = decorator;\n\n if (ts.isIdentifier(expression)) {\n return expression.text;\n }\n\n if (ts.isCallExpression(expression)) {\n const callee = expression.expression;\n\n if (ts.isIdentifier(callee)) {\n return callee.text;\n }\n\n if (ts.isPropertyAccessExpression(callee)) {\n return callee.name.text;\n }\n }\n\n if (ts.isPropertyAccessExpression(expression)) {\n return expression.name.text;\n }\n\n return null;\n};\n\n/**\n * Determines whether a TypeScript method declaration references the `this` keyword in its body.\n * It walks the method body nodes and stops early once a `this` keyword is found. It returns false when the method\n * has no body or when no `this` usage is detected.\n *\n * @param node The method declaration to inspect.\n * @returns True when the method body references `this`, otherwise false.\n *\n * @example\n * ```tsx\n * const usesThis = methodUsesThis(methodNode);\n * ```\n */\nexport const methodUsesThis = (node: ts.MethodDeclaration): boolean => {\n if (!node.body) {\n return false;\n }\n\n let found = false;\n\n /**\n * Visits a TypeScript AST node and checks if it is a `this` keyword. It updates the outer `found` flag when a\n * `this` keyword is discovered so the traversal can short-circuit. It also recurses into child nodes only while\n * no `this` keyword has been found to avoid unnecessary work.\n *\n * @param child The AST node to inspect for a `this` keyword.\n *\n * @example\n * ```tsx\n * node.body && ts.forEachChild(node.body, visit);\n * ```\n */\n const visit = (child: ts.Node) => {\n if (child.kind === ts.SyntaxKind.ThisKeyword) {\n found = true;\n\n return;\n }\n\n if (!found) {\n ts.forEachChild(child, visit);\n }\n };\n\n ts.forEachChild(node.body, visit);\n\n return found;\n};\n\n/**\n * Unwraps nested TypeScript or optional chaining wrapper expressions until a concrete inner expression is reached.\n * It repeatedly peels off chain, non-null, and type assertion nodes while tracking the current expression.\n * It returns the first expression that is not one of the supported wrapper types.\n *\n * @param node The expression node to unwrap.\n * @returns The innermost expression after removing supported wrapper nodes.\n *\n * @example\n * ```tsx\n * const unwrapped = unwrapExpression(node);\n * ```\n */\nexport const unwrapExpression = (node: TSESTree.Expression): TSESTree.Expression => {\n let current = node;\n\n while (\n current.type === AST_NODE_TYPES.ChainExpression\n || current.type === AST_NODE_TYPES.TSNonNullExpression\n || current.type === AST_NODE_TYPES.TSAsExpression\n || current.type === AST_NODE_TYPES.TSTypeAssertion\n ) {\n current = current.expression as TSESTree.Expression;\n }\n\n return current;\n};\n\ninterface unWrapReturn {\n current: TSESTree.Expression;\n parent: TSESTree.Node | null;\n}\n\n/**\n * Unwraps a usage expression by walking up through supported wrapper nodes to find the effective parent. It tracks the\n * current expression as it traverses chain, non-null, and type assertion wrappers. It returns both the unwrapped\n * expression and the first parent that is not a supported wrapper.\n *\n * @param node The expression node to unwrap within its usage context.\n * @returns An object containing the unwrapped current expression and its first non-wrapper parent.\n *\n * @example\n * ```tsx\n * const {current, parent} = unwrapUsage(memberExpression);\n * ```\n */\nexport const unwrapUsage = (node: TSESTree.Expression): unWrapReturn => {\n let current = node;\n let {parent} = node;\n\n while (\n parent.type === AST_NODE_TYPES.ChainExpression\n || parent.type === AST_NODE_TYPES.TSNonNullExpression\n || parent.type === AST_NODE_TYPES.TSAsExpression\n || parent.type === AST_NODE_TYPES.TSTypeAssertion\n ) {\n current = parent as TSESTree.Expression;\n parent = parent.parent;\n }\n\n return {\n current,\n parent\n };\n};\n\n/**\n * Determines whether a member expression is used as a `this`-binding call on `bind`, `call`, or `apply`.\n * It checks the parent nodes to ensure the expression is part of a call expression and that the callee is the\n * binding method. It then verifies the first argument resolves to a `this` expression after unwrapping any\n * supported wrapper nodes.\n *\n * @param node The member expression to inspect for a `this` bind/call/apply usage.\n * @returns True when the member expression is a `bind`, `call`, or `apply` invocation whose first argument is `this`.\n *\n * @example\n * ```tsx\n * const isBind = isThisBindCall(memberExpression);\n * ```\n */\nexport const isThisBindCall = (node: TSESTree.MemberExpression): boolean => {\n const {parent} = node;\n\n if (parent.type !== AST_NODE_TYPES.MemberExpression) {\n return false;\n }\n\n const name = parent.property.type === AST_NODE_TYPES.Identifier ? parent.property.name : null;\n\n if (!name || !['bind', 'call', 'apply'].includes(name)) {\n return false;\n }\n\n const grandParent = parent.parent;\n\n if (grandParent.type !== AST_NODE_TYPES.CallExpression) {\n return false;\n }\n\n if (grandParent.callee !== parent) {\n return false;\n }\n\n if (grandParent.arguments.length === 0) {\n return false;\n }\n\n const firstArg = unwrapExpression(grandParent.arguments[0] as TSESTree.Expression);\n\n return firstArg.type === AST_NODE_TYPES.ThisExpression;\n};\n\n/**\n * Determines whether a member expression is used as a callback value in common usage contexts. It walks up through\n * wrapper nodes to find the effective parent and then checks a variety of parent node types to decide if the\n * expression is passed, assigned, or returned as a callback. It returns false when the expression is not used in a\n * supported callback position.\n *\n * @param node The member expression to inspect for callback usage contexts.\n * @returns True when the expression appears in a callback position, otherwise false.\n *\n * @example\n * ```tsx\n * const isCallback = isCallbackUsage(memberExpression);\n * ```\n */\nexport const isCallbackUsage = (node: TSESTree.MemberExpression): boolean => {\n const {current, parent} = unwrapUsage(node);\n\n if (!parent) {\n return false;\n }\n\n if (parent.type === AST_NODE_TYPES.CallExpression || parent.type === AST_NODE_TYPES.NewExpression) {\n return parent.arguments.includes(current);\n }\n\n if (\n parent.type === AST_NODE_TYPES.JSXExpressionContainer\n && parent.parent.type === AST_NODE_TYPES.JSXAttribute\n ) {\n return true;\n }\n\n if (parent.type === AST_NODE_TYPES.VariableDeclarator) {\n return parent.init === current;\n }\n\n if (parent.type === AST_NODE_TYPES.AssignmentExpression) {\n return parent.right === current;\n }\n\n if (parent.type === AST_NODE_TYPES.Property) {\n return parent.value === current;\n }\n\n if (parent.type === AST_NODE_TYPES.ArrayExpression) {\n return parent.elements.includes(current);\n }\n\n if (parent.type === AST_NODE_TYPES.ReturnStatement) {\n return parent.argument === current;\n }\n\n return false;\n};","import {AST_NODE_TYPES, ESLintUtils} from '@typescript-eslint/utils';\nimport ts from 'typescript';\n\nimport {\n DEFAULT_DECORATORS,\n getDecoratorName,\n isCallbackUsage,\n isThisBindCall,\n methodUsesThis,\n normalizeDecoratorNames,\n unwrapExpression\n} from './utils/no-unbound-method-utils';\n\nimport type {TSESLint, TSESTree} from '@typescript-eslint/utils';\n\nconst createRule = ESLintUtils.RuleCreator(\n name => `https://github.com/nfqde/eslint-config-nfq/blob/master/docs/rules/${name}.md`\n);\n\ntype RuleOptions = [\n {decoratorNames?: string[]}?\n];\n\ntype MessageIds = 'constructorBind' | 'unboundMethod';\n\ntype MethodInfo = {\n autoBind: boolean;\n hasDecorator: boolean;\n isStatic: boolean;\n usesThis: boolean;\n};\n\nexport const noUnboundMethod = createRule<RuleOptions, MessageIds>({\n defaultOptions: [{decoratorNames: DEFAULT_DECORATORS}],\n meta: {\n docs: {description: 'Warn when unbound class methods that use this are passed as callbacks.'},\n messages: {\n constructorBind: 'Do not bind in the constructor; prefer {{decoratorName}}.',\n unboundMethod: 'Method {{methodName}} uses this and is passed unbound. Add {{decoratorName}} or bind it.'\n },\n schema: [\n {\n additionalProperties: false,\n properties: {\n decoratorNames: {\n items: {type: 'string'},\n type: 'array',\n uniqueItems: true\n }\n },\n type: 'object'\n }\n ],\n type: 'problem'\n },\n name: 'no-unbound-method',\n /**\n * Creates the rule listeners and initializes caches for symbol analysis.\n * It wires the parser services to the TypeScript type checker and configures decorator handling.\n * It returns ESLint listeners that report unbound method usage in callbacks and constructor binding.\n *\n * @param context Rule context used to access parser services and report issues.\n * @returns The rule listener map for this rule.\n *\n * @example\n * ```tsx\n * const listeners = rule.create(context);\n * ```\n */\n create(context) {\n const services = ESLintUtils.getParserServices(context);\n const checker = services.program.getTypeChecker();\n const decoratorNames = normalizeDecoratorNames(context.options[0]?.decoratorNames);\n const decoratorLabel = `@${Array.from(decoratorNames)[0] ?? 'autobind'}`;\n const methodCache = new Map<ts.Symbol, MethodInfo>();\n const reportCache = new Map<ts.Symbol, boolean>();\n const aliasCache = new Map<ts.Symbol, ts.Symbol>();\n const memberSymbolCache = new Map<TSESTree.MemberExpression, ts.Symbol | null>();\n const classAutoBindCache = new WeakMap<ts.ClassLikeDeclaration, boolean>();\n\n const isAutoBindOption = (node: ts.Expression): boolean => {\n if (!ts.isObjectLiteralExpression(node)) {\n return false;\n }\n\n return node.properties.some(property => {\n if (!ts.isPropertyAssignment(property)) {\n return false;\n }\n\n const name = ts.isIdentifier(property.name)\n ? property.name.text\n : ts.isStringLiteral(property.name)\n ? property.name.text\n : null;\n\n if (name !== 'autoBind') {\n return false;\n }\n\n return property.initializer.kind === ts.SyntaxKind.TrueKeyword;\n });\n };\n\n const isMakeAutoObservableCallee = (node: ts.Expression): boolean => {\n if (ts.isIdentifier(node)) {\n return node.text === 'makeAutoObservable';\n }\n\n return ts.isPropertyAccessExpression(node) && node.name.text === 'makeAutoObservable';\n };\n\n const hasAutoBindInConstructor = (classDecl: ts.ClassLikeDeclaration): boolean => {\n const cached = classAutoBindCache.get(classDecl);\n\n if (cached !== undefined) {\n return cached;\n }\n\n const ctor = classDecl.members.find(member => ts.isConstructorDeclaration(member));\n\n if (!ctor?.body) {\n classAutoBindCache.set(classDecl, false);\n\n return false;\n }\n\n for (const statement of ctor.body.statements) {\n if (!ts.isExpressionStatement(statement)) {\n continue;\n }\n\n const expr = statement.expression;\n\n if (!ts.isCallExpression(expr)) {\n continue;\n }\n\n if (!isMakeAutoObservableCallee(expr.expression)) {\n continue;\n }\n\n if (expr.arguments.length < 2) {\n continue;\n }\n\n if (expr.arguments[0].kind !== ts.SyntaxKind.ThisKeyword) {\n continue;\n }\n\n const hasAutoBind = expr.arguments.slice(1).some(arg => isAutoBindOption(arg));\n\n if (hasAutoBind) {\n classAutoBindCache.set(classDecl, true);\n\n return true;\n }\n }\n\n classAutoBindCache.set(classDecl, false);\n\n return false;\n };\n\n /**\n * Resolves an alias symbol to its original symbol and caches the result for reuse.\n * This function avoids repeated TypeScript checker work by memoizing alias resolutions.\n * It ensures downstream analysis consistently uses the same canonical symbol instance.\n *\n * @param symbol The symbol that may be an alias and needs resolution.\n * @returns The resolved canonical symbol for further analysis.\n *\n * @example\n * ```tsx\n * const resolved = resolveSymbol(methodSymbol);\n * ```\n */\n const resolveSymbol = (symbol: ts.Symbol): ts.Symbol => {\n const cached = aliasCache.get(symbol);\n\n if (cached) {\n return cached;\n }\n\n // eslint-disable-next-line no-bitwise\n const resolved = symbol.flags & ts.SymbolFlags.Alias ? checker.getAliasedSymbol(symbol) : symbol;\n\n aliasCache.set(symbol, resolved);\n\n return resolved;\n };\n\n /**\n * Computes metadata about a method-like symbol and caches the result for later use.\n * This function filters out non-method symbols and constructor declarations before gathering details.\n * It also determines decorator presence, static status, and whether the method uses `this`.\n *\n * @param symbol The symbol to inspect for method information.\n * @returns The resolved method info or null when the symbol is not a supported method.\n *\n * @example\n * ```tsx\n * const info = getMethodInfo(methodSymbol);\n * ```\n */\n const getMethodInfo = (symbol: ts.Symbol): MethodInfo | null => {\n const aliased = resolveSymbol(symbol);\n const cached = methodCache.get(aliased);\n\n if (cached) {\n return cached;\n }\n\n if (!(\n // eslint-disable-next-line no-bitwise\n aliased.flags\n & (\n // eslint-disable-next-line no-bitwise\n ts.SymbolFlags.Method\n | ts.SymbolFlags.Property\n | ts.SymbolFlags.Function\n | ts.SymbolFlags.GetAccessor\n | ts.SymbolFlags.SetAccessor\n )\n )) {\n return null;\n }\n\n const declarations = aliased.getDeclarations() ?? [];\n const methodDecl = declarations\n .find(decl => ts.isMethodDeclaration(decl));\n\n if (!methodDecl?.parent || !ts.isClassLike(methodDecl.parent)) {\n return null;\n }\n\n if (ts.isIdentifier(methodDecl.name) && methodDecl.name.text === 'constructor') {\n return null;\n }\n\n const flags = ts.getCombinedModifierFlags(methodDecl);\n // eslint-disable-next-line no-bitwise\n const isStatic = Boolean(flags & ts.ModifierFlags.Static);\n const decorators = ts.canHaveDecorators(methodDecl) ? ts.getDecorators(methodDecl) : undefined;\n const hasDecorator = Boolean(decorators?.some(decorator => {\n const name = getDecoratorName(decorator);\n\n return Boolean(name && decoratorNames.has(name));\n }));\n\n const info: MethodInfo = {\n autoBind: hasAutoBindInConstructor(methodDecl.parent),\n hasDecorator,\n isStatic,\n usesThis: methodUsesThis(methodDecl)\n };\n\n methodCache.set(aliased, info);\n\n return info;\n };\n\n /**\n * Determines whether a symbol should be reported as an unbound method.\n * It resolves aliases and consults cached results to avoid repeated analysis.\n * It evaluates method metadata to ensure only non-static methods that use `this` and lack decorators are flagged.\n *\n * @param symbol The symbol to evaluate for reporting eligibility.\n * @returns True when the symbol represents an unbound method that should be reported.\n *\n * @example\n * ```tsx\n * const shouldReport = shouldReportSymbol(methodSymbol);\n * ```\n */\n const shouldReportSymbol = (symbol: ts.Symbol): boolean => {\n const aliased = resolveSymbol(symbol);\n const cached = reportCache.get(aliased);\n\n if (cached !== undefined) {\n return cached;\n }\n\n const info = getMethodInfo(aliased);\n\n if (!info) {\n reportCache.set(aliased, false);\n\n return false;\n }\n\n const shouldReport = !info.autoBind && !info.isStatic && info.usesThis && !info.hasDecorator;\n\n reportCache.set(aliased, shouldReport);\n\n return shouldReport;\n };\n\n /**\n * Resolves the TypeScript symbol associated with a member expression node.\n * It caches the resolved symbol to minimize repeated checker lookups.\n * It supports both property access and string-literal element access expressions.\n *\n * @param node The member expression node to resolve into a symbol.\n * @returns The resolved symbol, or null when no symbol can be determined.\n *\n * @example\n * ```tsx\n * const symbol = getSymbolForMember(memberExpression);\n * ```\n */\n const getSymbolForMember = (node: TSESTree.MemberExpression): ts.Symbol | null => {\n const cached = memberSymbolCache.get(node);\n\n if (cached !== undefined) {\n return cached;\n }\n\n const tsNode = services.esTreeNodeToTSNodeMap.get(node);\n\n if (ts.isPropertyAccessExpression(tsNode)) {\n const symbol = checker.getSymbolAtLocation(tsNode.name) ?? null;\n\n memberSymbolCache.set(node, symbol);\n\n return symbol;\n }\n\n if (ts.isElementAccessExpression(tsNode)) {\n const arg = tsNode.argumentExpression;\n\n if (ts.isStringLiteralLike(arg)) {\n const symbol = checker.getSymbolAtLocation(arg) ?? null;\n\n memberSymbolCache.set(node, symbol);\n\n return symbol;\n }\n }\n\n memberSymbolCache.set(node, null);\n\n return null;\n };\n\n /**\n * Reports a constructor binding assignment for a method name.\n * It formats the report data with the decorator label and method name.\n * It delegates to the ESLint context to surface the diagnostic at the provided node.\n *\n * @param methodName The name of the method that was bound in the constructor.\n * @param node The AST node that represents the binding expression.\n *\n * @example\n * ```tsx\n * reportConstructorBinding('handleClick', expressionNode);\n * ```\n */\n const reportConstructorBinding = (methodName: string, node: TSESTree.Node) => {\n context.report({\n data: {\n decoratorName: decoratorLabel,\n methodName\n },\n messageId: 'constructorBind',\n node\n });\n };\n\n const listeners: TSESLint.RuleListener = {\n /**\n * Processes a member expression node to determine whether it represents an unbound method usage that\n * should be reported. It performs multiple early returns based on node shape, parent usage, callback context,\n * binding checks, and symbol eligibility. It ultimately reports a linting issue when all conditions\n * indicate a problematic unbound method reference.\n *\n * @param node The member expression node to analyze for unbound method usage.\n *\n * @example\n * ```tsx\n * MemberExpression(node);\n * ```\n */\n MemberExpression(node: TSESTree.MemberExpression) {\n if (node.property.type !== AST_NODE_TYPES.Identifier) {\n return;\n }\n\n const {parent} = node;\n\n if (\n (parent.type === AST_NODE_TYPES.CallExpression || parent.type === AST_NODE_TYPES.NewExpression)\n && parent.callee === node\n ) {\n return;\n }\n\n if (!isCallbackUsage(node)) {\n return;\n }\n\n if (isThisBindCall(node)) {\n return;\n }\n\n const symbol = getSymbolForMember(node);\n\n if (!symbol) {\n return;\n }\n\n if (!shouldReportSymbol(symbol)) {\n return;\n }\n\n context.report({\n data: {\n decoratorName: decoratorLabel,\n methodName: node.property.name\n },\n messageId: 'unboundMethod',\n node\n });\n },\n /**\n * Inspects constructor method definitions to detect assignments where a class method\n * is bound to `this` via `.bind(this)`, and reports such bindings for further handling.\n *\n * @param node The method definition node to analyze.\n */\n MethodDefinition(node: TSESTree.MethodDefinition) {\n if (node.kind !== 'constructor' || !node.value.body) {\n return;\n }\n\n const constructorBody = node.value.body;\n\n for (const statement of constructorBody.body) {\n if (statement.type !== AST_NODE_TYPES.ExpressionStatement) {\n continue;\n }\n\n const {expression} = statement;\n\n if (expression.type !== AST_NODE_TYPES.AssignmentExpression || expression.operator !== '=') {\n continue;\n }\n\n const {left, right} = expression;\n\n if (\n left.type !== AST_NODE_TYPES.MemberExpression\n || left.property.type !== AST_NODE_TYPES.Identifier\n ) {\n continue;\n }\n\n if (left.object.type !== AST_NODE_TYPES.ThisExpression) {\n continue;\n }\n\n if (right.type !== AST_NODE_TYPES.CallExpression) {\n continue;\n }\n\n const {callee} = right;\n\n if (callee.type !== AST_NODE_TYPES.MemberExpression) {\n continue;\n }\n\n if (\n callee.object.type !== AST_NODE_TYPES.MemberExpression\n || callee.object.object.type !== AST_NODE_TYPES.ThisExpression\n || callee.object.property.type !== AST_NODE_TYPES.Identifier\n || callee.object.property.name !== left.property.name\n ) {\n continue;\n }\n\n if (\n callee.property.type !== AST_NODE_TYPES.Identifier\n || callee.property.name !== 'bind'\n ) {\n continue;\n }\n\n if (right.arguments.length === 0) {\n continue;\n }\n\n const firstArg = unwrapExpression(right.arguments[0] as TSESTree.Expression);\n\n if (firstArg.type !== AST_NODE_TYPES.ThisExpression) {\n continue;\n }\n\n reportConstructorBinding(left.property.name, expression);\n }\n }\n };\n\n return listeners;\n }\n});","import {ASTUtils, ESLintUtils} from '@typescript-eslint/utils';\n\nimport type {TSESLint, TSESTree} from '@typescript-eslint/utils';\n\nconst createRule = ESLintUtils.RuleCreator(\n name => `https://github.com/nfqde/eslint-config-nfq/blob/master/docs/rules/${name}.md`\n);\n\nconst DEFAULT_SCREEN_SIZES = ['xs', 'sm', 'md', 'lg', 'xl', 'xxl'];\n\ntype RuleOptions = [\n {\n allowAllPropertiesOnSameLine?: boolean;\n allowMultiplePropertiesPerLine?: boolean;\n ignoredProperties?: string[];\n }\n];\n\ntype MessageIds = 'propertiesOnNewline' | 'propertiesOnNewlineAll';\n\nexport const objectPropertyNewline = createRule<RuleOptions, MessageIds>({\n defaultOptions: [{\n allowAllPropertiesOnSameLine: false,\n allowMultiplePropertiesPerLine: false,\n ignoredProperties: DEFAULT_SCREEN_SIZES\n }],\n meta: {\n docs: {description: 'Enforce placing object properties on separate lines except screensize object properties.'},\n fixable: 'whitespace',\n messages: {\n propertiesOnNewline: 'Object properties must go on a new line.',\n propertiesOnNewlineAll: \"Object properties must go on a new line if they aren't all on the same line.\"\n },\n schema: [\n {\n additionalProperties: false,\n properties: {\n allowAllPropertiesOnSameLine: {\n default: false,\n type: 'boolean'\n },\n allowMultiplePropertiesPerLine: {\n default: false,\n // Deprecated\n type: 'boolean'\n },\n ignoredProperties: {\n default: DEFAULT_SCREEN_SIZES,\n items: {type: 'string'},\n type: 'array'\n }\n },\n type: 'object'\n }\n ],\n type: 'layout'\n },\n name: 'object-property-newline',\n /**\n * Creates the rule listener set for enforcing object property newlines. It reads configuration from rule options\n * and shared settings. It returns listeners that validate object expressions and optionally fix formatting.\n *\n * @param context The rule context provided by ESLint.\n * @returns The rule listener map for this rule.\n *\n * @example\n * ```tsx\n * const listeners = objectPropertyNewline.create(context);\n * ```\n */\n create(context) {\n const options = context.options[0];\n const shared = (\n context.settings as {'@nfq'?: {ignoredProperties?: string[]}} | undefined\n )?.['@nfq']?.ignoredProperties ?? [];\n const allowSameLine = Boolean(\n // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition\n options?.allowAllPropertiesOnSameLine\n // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition\n ?? options?.allowMultiplePropertiesPerLine\n );\n const ignoredProperties = new Set(\n // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition\n options?.ignoredProperties ?? shared ?? DEFAULT_SCREEN_SIZES\n );\n const messageId: MessageIds = allowSameLine ? 'propertiesOnNewlineAll' : 'propertiesOnNewline';\n const {sourceCode} = context;\n\n /**\n * Checks whether a property key matches an ignored screen size. It supports identifier and string literal keys.\n * It returns false for any other key type.\n *\n * @param prop The object property to test.\n * @returns True when the property should be ignored.\n *\n * @example\n * ```tsx\n * const ignored = isScreenSizeProperty(prop);\n * ```\n */\n const isScreenSizeProperty = (prop: TSESTree.Property) => {\n const {key} = prop;\n\n if (ASTUtils.isIdentifier(key)) {\n return ignoredProperties.has(key.name);\n }\n\n if (key.type === 'Literal' && typeof key.value === 'string') {\n return ignoredProperties.has(key.value);\n }\n\n return false;\n };\n\n const listeners: TSESLint.RuleListener = {\n /**\n * Validates object expressions for property newline rules. It skips allowed single-line objects and\n * ignored screen size-only objects. It reports and fixes properties that share a line.\n *\n * @param node The object expression node being visited.\n *\n * @example\n * ```tsx\n * ObjectExpression(node);\n * ```\n */\n ObjectExpression(node: TSESTree.ObjectExpression) {\n if (allowSameLine && node.properties.length > 1) {\n const firstToken = sourceCode.getFirstToken(node.properties[0]);\n const lastToken = sourceCode.getLastToken(node.properties[node.properties.length - 1]);\n\n if (firstToken?.loc.end.line === lastToken?.loc.start.line) {\n return;\n }\n }\n\n if (\n node.properties.length > 0\n && node.properties.every(prop => prop.type === 'Property' && isScreenSizeProperty(prop))\n ) {\n return;\n }\n\n for (let i = 1; i < node.properties.length; i++) {\n const prev = node.properties[i - 1];\n const curr = node.properties[i];\n const lastTokenOfPrevious = sourceCode.getLastToken(prev);\n const firstTokenOfCurrent = sourceCode.getFirstToken(curr);\n\n if (lastTokenOfPrevious?.loc.end.line === firstTokenOfCurrent?.loc.start.line) {\n context.report({\n loc: firstTokenOfCurrent?.loc,\n messageId,\n node,\n /**\n * Fixes the newline between properties when only whitespace exists. It replaces the\n * whitespace after the comma with a newline. It returns null when a safe fix is not\n * possible.\n *\n * @param fixer The ESLint fixer utility.\n * @returns The fix or null when no safe fix is available.\n *\n * @example\n * ```tsx\n * fix(fixer);\n * ```\n */\n fix(fixer) {\n const comma = sourceCode.getTokenBefore(firstTokenOfCurrent!);\n const rangeAfterComma = [comma!.range[1], firstTokenOfCurrent!.range[0]] as const;\n\n if (sourceCode.text.slice(rangeAfterComma[0], rangeAfterComma[1]).trim()) {\n return null;\n }\n\n return fixer.replaceTextRange(rangeAfterComma, '\\n');\n }\n });\n }\n }\n }\n };\n\n return listeners;\n }\n});","import {ASTUtils} from '@typescript-eslint/utils';\n\nimport {unwrapExpression} from './expression-utils';\n\nimport type {TSESTree} from '@typescript-eslint/utils';\n\n/**\n * Determines whether the provided node represents the `Cypress.Commands` member expression.\n * This function inspects the node shape and validates the object and property identifiers.\n * It returns a boolean result suitable for guard conditions in rule logic.\n *\n * @param node The AST node to inspect for a Cypress.Commands member expression.\n * @returns True when the node matches `Cypress.Commands`, otherwise false.\n *\n * @remarks\n * This helper assumes the node has already been parsed by the TypeScript ESLint parser.\n *\n * @example\n * ```tsx\n * const isCommands = isCypressCommandsObject(node);\n * ```\n */\nexport const isCypressCommandsObject = (node: TSESTree.Node): boolean => (\n node.type === 'MemberExpression'\n && ASTUtils.isIdentifier(node.object)\n && node.object.name === 'Cypress'\n && ASTUtils.isIdentifier(node.property)\n && node.property.name === 'Commands'\n);\n\n/**\n * Checks whether a node represents a registration call for the `getCy` command.\n * The function validates call expression structure, target object, and method name.\n * It returns a boolean that signals if the call is an add or overwrite for `getCy`.\n *\n * @param node The AST node to inspect for a Cypress.Commands registration call.\n * @returns True when the call registers `getCy`, otherwise false.\n *\n * @remarks\n * This utility expects the first argument to be a literal command name.\n *\n * @example\n * ```tsx\n * const isRegistration = isGetCyRegistration(node);\n * ```\n */\nexport const isGetCyRegistration = (node: TSESTree.Node): boolean => {\n if (node.type !== 'CallExpression') {\n return false;\n }\n\n if (node.arguments.length === 0) {\n return false;\n }\n\n const callee = unwrapExpression(node.callee);\n\n if (callee.type !== 'MemberExpression' || !ASTUtils.isIdentifier(callee.property)) {\n return false;\n }\n\n if (!isCypressCommandsObject(callee.object)) {\n return false;\n }\n\n const methodName = callee.property.name;\n\n if (methodName !== 'add' && methodName !== 'overwrite') {\n return false;\n }\n\n const nameArg = node.arguments[0];\n\n return nameArg.type === 'Literal' && nameArg.value === 'getCy';\n};\n\n/**\n * Determines whether the provided call expression represents a `cy.get` invocation.\n * The logic unwraps the callee to inspect the member expression shape and confirm the object identifier.\n * It returns a boolean that can be used as a guard for command-specific rules.\n *\n * @param node The call expression node to evaluate.\n * @returns True when the node is a `cy.get` call, otherwise false.\n *\n * @remarks\n * This helper assumes the call expression has already been parsed and type-checked by the parser.\n *\n * @example\n * ```tsx\n * const isGet = isCyGetCall(node);\n * ```\n */\nexport const isCyGetCall = (node: TSESTree.CallExpression): boolean => {\n const callee = unwrapExpression(node.callee);\n\n if (callee.type !== 'MemberExpression') {\n return false;\n }\n\n const object = unwrapExpression(callee.object);\n\n return ASTUtils.isIdentifier(object)\n && object.name === 'cy'\n && ASTUtils.isIdentifier(callee.property)\n && callee.property.name === 'get';\n};\n\n/**\n * Determines whether the provided call expression uses an alias string as its first argument.\n * The function checks for at least one argument and verifies it is a string literal starting with `@`.\n * It returns a boolean that indicates whether the call is an alias lookup.\n *\n * @param node The call expression node to inspect.\n * @returns True when the first argument is an alias string, otherwise false.\n *\n * @remarks\n * This utility only inspects the first argument and ignores additional arguments.\n *\n * @example\n * ```tsx\n * const isAlias = isAliasGetCall(node);\n * ```\n */\nexport const isAliasGetCall = (node: TSESTree.CallExpression): boolean => {\n if (node.arguments.length === 0) {\n return false;\n }\n\n const [arg] = node.arguments;\n\n return arg.type === 'Literal'\n && typeof arg.value === 'string'\n && arg.value.startsWith('@');\n};","import {ESLintUtils} from '@typescript-eslint/utils';\n\nimport {\n isAliasGetCall,\n isCyGetCall,\n isGetCyRegistration\n} from './utils/require-getcy-utils';\n\nimport type {TSESLint, TSESTree} from '@typescript-eslint/utils';\n\nconst createRule = ESLintUtils.RuleCreator(\n name => `https://github.com/nfqde/eslint-config-nfq/blob/master/docs/rules/${name}.md`\n);\n\ntype MessageIds = 'useGetCy';\n\nexport const requireGetCy = createRule<[], MessageIds>({\n defaultOptions: [],\n meta: {\n docs: {description: 'Require using cy.getCy instead of cy.get.'},\n messages: {useGetCy: 'Use cy.getCy() instead of cy.get().'},\n schema: [],\n type: 'suggestion'\n },\n name: 'require-getcy',\n /**\n * Creates the rule listener set for this ESLint rule.\n * It wires the context to the callbacks that will analyze nodes and report violations.\n * It returns an object that satisfies the rule listener contract expected by ESLint.\n *\n * @param context The rule context used to report violations and access options.\n * @returns A rule listener object that contains callbacks for traversed nodes.\n *\n * @example\n * ```tsx\n * const listeners = create(context);\n * ```\n */\n create(context) {\n /**\n * Determines whether a node is located within a getCy registration call.\n * It walks up the AST parent chain to detect any registration node.\n * It returns true when a registration is found, otherwise false.\n *\n * @param node The node to start walking from.\n * @returns Whether the node is inside a getCy registration.\n *\n * @example\n * ```tsx\n * const inside = isInsideGetCyRegistration(node);\n * ```\n */\n const isInsideGetCyRegistration = (node: TSESTree.Node) => {\n let current: TSESTree.Node | undefined = node;\n\n while (current) {\n if (isGetCyRegistration(current)) {\n return true;\n }\n\n current = current.parent ?? undefined;\n }\n\n return false;\n };\n\n return {\n /**\n * Handles CallExpression nodes and reports invalid cy.get usage.\n * It skips nodes that are not cy.get calls or are allowed aliases.\n * It reports a suggestion when a disallowed call is found.\n *\n * @param node The call expression node being visited.\n *\n * @example\n * ```tsx\n * CallExpression(node);\n * ```\n */\n CallExpression(node) {\n if (!isCyGetCall(node)) {\n return;\n }\n\n if (isInsideGetCyRegistration(node)) {\n return;\n }\n\n if (isAliasGetCall(node)) {\n return;\n }\n\n context.report({\n messageId: 'useGetCy',\n node\n });\n }\n } satisfies TSESLint.RuleListener;\n }\n});","import naturalCompare from 'natural-compare';\n\ntype NameWithMethod = {method: boolean; name: string};\n\nexport const isValidOrders = {\n /**\n * Compares two entries by name using ascending lexical order.\n * It treats the name fields as plain strings and checks if the first sorts before or equal to the second.\n * It is used as the base comparison for other ordering variants.\n *\n * @param a The first name wrapper to compare.\n * @param b The second name wrapper to compare.\n * @returns True when the first name is ordered before or equal to the second name.\n *\n * @remarks Uses direct string comparison for ordering.\n *\n * @example\n * ```tsx\n * const ok = isValidOrders.asc({name: 'a'}, {name: 'b'});\n * ```\n */\n asc(a: NameWithMethod, b: NameWithMethod) {\n return a.name <= b.name;\n },\n /**\n * Compares two entries by method flag and then by name in ascending order.\n * It groups by the method indicator and falls back to standard ascending name comparison.\n * It is used when method ordering is enabled for ascending checks.\n *\n * @param a The first name wrapper to compare.\n * @param b The second name wrapper to compare.\n * @returns True when the first entry is ordered before or equal to the second entry with method-aware ordering.\n *\n * @remarks Uses method grouping before name comparison.\n *\n * @example\n * ```tsx\n * const ok = isValidOrders.ascF({name: 'a', method: false}, {name: 'b', method: true});\n * ```\n */\n ascF(a: NameWithMethod, b: NameWithMethod) {\n if (a.method === b.method) {\n return isValidOrders.asc(a, b);\n }\n\n return a.method <= b.method;\n },\n /**\n * Compares two entries by name using ascending order with case folding.\n * It lowercases both names to provide a case-insensitive check.\n * It is used when the ordering option disables case sensitivity.\n *\n * @param a The first name wrapper to compare.\n * @param b The second name wrapper to compare.\n * @returns True when the first name is ordered before or equal to the second name.\n *\n * @remarks Uses lowercased strings to avoid case differences.\n *\n * @example\n * ```tsx\n * const ok = isValidOrders.ascI({name: 'A'}, {name: 'b'});\n * ```\n */\n ascI(a: NameWithMethod, b: NameWithMethod) {\n return a.name.toLowerCase() <= b.name.toLowerCase();\n },\n /**\n * Compares two entries by method flag and then by name using case-insensitive ascending order.\n * It groups by the method indicator and compares lowercased names when methods match.\n * It is used when method ordering and case-insensitive ordering are enabled together.\n *\n * @param a The first name wrapper to compare.\n * @param b The second name wrapper to compare.\n * @returns True when the first entry is ordered before or equal to the second entry with method-aware, case-insensitive ordering.\n *\n * @remarks Uses method grouping before case-insensitive comparison.\n *\n * @example\n * ```tsx\n * const ok = isValidOrders.ascIF({name: 'A', method: true}, {name: 'b', method: true});\n * ```\n */\n ascIF(a: NameWithMethod, b: NameWithMethod) {\n if (a.method === b.method) {\n return isValidOrders.ascI(a, b);\n }\n\n return a.method <= b.method;\n },\n /**\n * Compares two entries by name using natural ascending order with case folding.\n * It lowercases both names and applies natural comparison.\n * It is used when both natural and case-insensitive ordering are enabled.\n *\n * @param a The first name wrapper to compare.\n * @param b The second name wrapper to compare.\n * @returns True when the first name is ordered before or equal to the second name in natural, case-insensitive order.\n *\n * @remarks Combines natural ordering with case folding.\n *\n * @example\n * ```tsx\n * const ok = isValidOrders.ascIN({name: 'A2'}, {name: 'a10'});\n * ```\n */\n ascIN(a: NameWithMethod, b: NameWithMethod) {\n return naturalCompare(a.name.toLowerCase(), b.name.toLowerCase()) <= 0;\n },\n /**\n * Compares two entries by method flag and then by name using natural, case-insensitive ascending order.\n * It groups by the method indicator and uses natural comparison on lowercased names when methods match.\n * It is used when method ordering, natural ordering, and case-insensitive ordering are enabled together.\n *\n * @param a The first name wrapper to compare.\n * @param b The second name wrapper to compare.\n * @returns True when the first entry is ordered before or equal to the second entry with method-aware, natural, case-insensitive ordering.\n *\n * @remarks Uses method grouping before natural, case-insensitive comparison.\n *\n * @example\n * ```tsx\n * const ok = isValidOrders.ascINF({name: 'A2', method: true}, {name: 'a10', method: true});\n * ```\n */\n ascINF(a: NameWithMethod, b: NameWithMethod) {\n if (a.method === b.method) {\n return isValidOrders.ascIN(a, b);\n }\n\n return a.method <= b.method;\n },\n /**\n * Compares two entries by name using natural ascending order.\n * It delegates to a natural compare function to handle numeric substrings sensibly.\n * It is used when natural sorting is enabled.\n *\n * @param a The first name wrapper to compare.\n * @param b The second name wrapper to compare.\n * @returns True when the first name is ordered before or equal to the second name in natural order.\n *\n * @remarks Uses natural-compare for string ordering.\n *\n * @example\n * ```tsx\n * const ok = isValidOrders.ascN({name: 'a2'}, {name: 'a10'});\n * ```\n */\n ascN(a: NameWithMethod, b: NameWithMethod) {\n return naturalCompare(a.name, b.name) <= 0;\n },\n /**\n * Compares two entries by method flag and then by name using natural ascending order.\n * It groups by the method indicator and uses natural comparison when methods match.\n * It is used when method ordering and natural ordering are enabled together.\n *\n * @param a The first name wrapper to compare.\n * @param b The second name wrapper to compare.\n * @returns True when the first entry is ordered before or equal to the second entry with method-aware natural ordering.\n *\n * @remarks Uses method grouping before natural comparison.\n *\n * @example\n * ```tsx\n * const ok = isValidOrders.ascNF({name: 'a2', method: false}, {name: 'a10', method: false});\n * ```\n */\n ascNF(a: NameWithMethod, b: NameWithMethod) {\n if (a.method === b.method) {\n return isValidOrders.ascN(a, b);\n }\n\n return a.method <= b.method;\n },\n /**\n * Compares two entries by name using descending lexical order.\n * It delegates to the ascending comparison with swapped operands.\n * It is used as the base comparison for descending variants.\n *\n * @param a The first name wrapper to compare.\n * @param b The second name wrapper to compare.\n * @returns True when the first name is ordered after or equal to the second name.\n *\n * @remarks Uses ascending logic with swapped inputs.\n *\n * @example\n * ```tsx\n * const ok = isValidOrders.desc({name: 'b'}, {name: 'a'});\n * ```\n */\n desc(a: NameWithMethod, b: NameWithMethod) {\n return isValidOrders.asc(b, a);\n },\n /**\n * Compares two entries by method flag and then by name using descending order.\n * It delegates to the ascending method-aware comparison with swapped operands.\n * It is used when method ordering and descending ordering are enabled together.\n *\n * @param a The first name wrapper to compare.\n * @param b The second name wrapper to compare.\n * @returns True when the first entry is ordered after or equal to the second entry with method-aware ordering.\n *\n * @remarks Uses ascending method-aware logic with swapped inputs.\n *\n * @example\n * ```tsx\n * const ok = isValidOrders.descF({name: 'b', method: true}, {name: 'a', method: false});\n * ```\n */\n descF(a: NameWithMethod, b: NameWithMethod) {\n return isValidOrders.ascF(b, a);\n },\n /**\n * Compares two entries by name using descending order with case folding.\n * It delegates to the ascending case-insensitive comparison with swapped operands.\n * It is used when descending and case-insensitive ordering are enabled.\n *\n * @param a The first name wrapper to compare.\n * @param b The second name wrapper to compare.\n * @returns True when the first name is ordered after or equal to the second name in case-insensitive order.\n *\n * @remarks Uses ascending case-insensitive logic with swapped inputs.\n *\n * @example\n * ```tsx\n * const ok = isValidOrders.descI({name: 'b'}, {name: 'A'});\n * ```\n */\n descI(a: NameWithMethod, b: NameWithMethod) {\n return isValidOrders.ascI(b, a);\n },\n /**\n * Compares two entries by method flag and then by name using descending case-insensitive order.\n * It delegates to the ascending method-aware case-insensitive comparison with swapped operands.\n * It is used when method ordering, descending ordering, and case-insensitive ordering are enabled together.\n *\n * @param a The first name wrapper to compare.\n * @param b The second name wrapper to compare.\n * @returns True when the first entry is ordered after or equal to the second entry with method-aware, case-insensitive ordering.\n *\n * @remarks Uses ascending method-aware case-insensitive logic with swapped inputs.\n *\n * @example\n * ```tsx\n * const ok = isValidOrders.descIF({name: 'b', method: true}, {name: 'A', method: true});\n * ```\n */\n descIF(a: NameWithMethod, b: NameWithMethod) {\n return isValidOrders.ascIF(b, a);\n },\n /**\n * Compares two entries by name using natural descending order with case folding.\n * It delegates to the ascending natural case-insensitive comparison with swapped operands.\n * It is used when descending, natural, and case-insensitive ordering are enabled.\n *\n * @param a The first name wrapper to compare.\n * @param b The second name wrapper to compare.\n * @returns True when the first name is ordered after or equal to the second name in natural, case-insensitive order.\n *\n * @remarks Uses ascending natural case-insensitive logic with swapped inputs.\n *\n * @example\n * ```tsx\n * const ok = isValidOrders.descIN({name: 'a10'}, {name: 'A2'});\n * ```\n */\n descIN(a: NameWithMethod, b: NameWithMethod) {\n return isValidOrders.ascIN(b, a);\n },\n /**\n * Compares two entries by method flag and then by name using descending natural, case-insensitive order.\n * It delegates to the ascending method-aware natural case-insensitive comparison with swapped operands.\n * It is used when method ordering, descending ordering, natural ordering, and case-insensitive ordering\n * are enabled together.\n *\n * @param a The first name wrapper to compare.\n * @param b The second name wrapper to compare.\n * @returns True when the first entry is ordered after or equal to the second entry with method-aware, natural,case-insensitive ordering.\n *\n * @remarks Uses ascending method-aware natural case-insensitive logic with swapped inputs.\n *\n * @example\n * ```tsx\n * const ok = isValidOrders.descINF({name: 'a10', method: true}, {name: 'A2', method: true});\n * ```\n */\n descINF(a: NameWithMethod, b: NameWithMethod) {\n return isValidOrders.ascINF(b, a);\n },\n /**\n * Compares two entries by name using natural descending order.\n * It delegates to the ascending natural comparison with swapped operands.\n * It is used when descending natural ordering is enabled.\n *\n * @param a The first name wrapper to compare.\n * @param b The second name wrapper to compare.\n * @returns True when the first name is ordered after or equal to the second name in natural order.\n *\n * @remarks Uses ascending natural logic with swapped inputs.\n *\n * @example\n * ```tsx\n * const ok = isValidOrders.descN({name: 'a10'}, {name: 'a2'});\n * ```\n */\n descN(a: NameWithMethod, b: NameWithMethod) {\n return isValidOrders.ascN(b, a);\n },\n /**\n * Compares two entries by method flag and then by name using descending natural order.\n * It delegates to the ascending method-aware natural comparison with swapped operands.\n * It is used when method ordering, descending ordering, and natural ordering are enabled together.\n *\n * @param a The first name wrapper to compare.\n * @param b The second name wrapper to compare.\n * @returns True when the first entry is ordered after or equal to the second entry with method-aware natural ordering.\n *\n * @remarks Uses ascending method-aware natural logic with swapped inputs.\n *\n * @example\n * ```tsx\n * const ok = isValidOrders.descNF({name: 'a10', method: false}, {name: 'a2', method: false});\n * ```\n */\n descNF(a: NameWithMethod, b: NameWithMethod) {\n return isValidOrders.ascNF(b, a);\n }\n};","import * as astUtils from './ast-utils';\n\nimport type {TSESTree} from '@typescript-eslint/utils';\n\n/**\n * Retrieves the property name from a property node when it can be determined statically.\n * It first checks for a static name using the AST utilities and returns it when available.\n * It falls back to reading the identifier name from the key and returns null when no name can be resolved.\n *\n * @param node The property node to inspect for a name.\n * @returns The resolved property name or null if it cannot be determined.\n *\n * @example\n * ```tsx\n * const name = getPropertyName(propertyNode);\n * ```\n */\nexport const getPropertyName = (node: TSESTree.Property): string | null => {\n const staticName = astUtils.getStaticPropertyName(node);\n\n if (staticName !== null) {\n return staticName;\n }\n\n if (typeof node.key === 'undefined') {\n return null;\n }\n\n // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition\n return (node.key as TSESTree.Identifier).name ?? null;\n};","import {AST_NODE_TYPES, ESLintUtils} from '@typescript-eslint/utils';\n\nimport {isValidOrders} from './utils/isValidOrders';\nimport {getPropertyName} from './utils/sort-keys-utils';\n\nimport type {TSESLint, TSESTree} from '@typescript-eslint/utils';\n\nconst createRule = ESLintUtils.RuleCreator(\n name => `https://github.com/nfqde/eslint-config-nfq/blob/master/docs/rules/${name}.md`\n);\n\ntype SortOrder = 'asc' | 'desc';\n\ntype RuleOptions = [\n SortOrder?,\n {\n caseSensitive?: boolean;\n ignorePropTypes?: boolean;\n methodsExtra?: boolean;\n natural?: boolean;\n }?\n];\n\ntype Stack = {\n ignoreSort?: boolean;\n prevName: string | null;\n prevNode: TSESTree.Property | null;\n upper: Stack | null;\n};\n\ntype MessageIds = 'ignoredPropertiesOrder' | 'outOfOrder';\n\nexport const sortKeys = createRule<RuleOptions, MessageIds>({\n defaultOptions: [],\n meta: {\n docs: {description: 'require object keys to be sorted'},\n fixable: 'code',\n messages: {\n ignoredPropertiesOrder: 'Object keys must follow the configured order: {{order}}.',\n // eslint-disable-next-line @stylistic/max-len\n outOfOrder: \"Expected object keys to be in {{natual}}{{insensitive}}{{order}}ending order{{methods}}. '{{thisName}}' should be before '{{prevName}}'.\"\n },\n schema: [\n {\n enum: ['asc', 'desc'],\n type: 'string'\n },\n {\n additionalProperties: false,\n properties: {\n caseSensitive: {type: 'boolean'},\n ignorePropTypes: {type: 'boolean'},\n methodsExtra: {type: 'boolean'},\n natural: {type: 'boolean'}\n },\n type: 'object'\n }\n ],\n type: 'suggestion'\n },\n name: 'sort-keys',\n /**\n * Creates the rule listeners and shared state for the sort-keys rule. It initializes\n * configuration options from context and wires up the AST visitors used for sorting.\n * The function returns a listener map that ESLint executes while traversing the AST.\n *\n * @param context The rule context provided by ESLint.\n * @returns The listener map for the rule.\n *\n * @example\n * ```tsx\n * const listeners = create(context);\n * ```\n */\n create(context) {\n const ignoredProperties = (\n context.settings as {'@nfq'?: {ignoredProperties?: string[]}} | undefined\n )?.['@nfq']?.ignoredProperties ?? [];\n const ignoredPropertySet = new Set(ignoredProperties);\n const ignoredOrderIndex = new Map(ignoredProperties.map((name, index) => [name, index]));\n\n const order = (context.options[0] ?? 'asc');\n const options = context.options[1];\n const insensitive = (options?.caseSensitive) === false;\n const natual = Boolean(options?.natural);\n const ignorePropTypes = Boolean(options?.ignorePropTypes);\n const methodsExtra = Boolean(options?.methodsExtra);\n const orderFuncKey = `${order}${(insensitive ? 'I' : '')}${(natual ? 'N' : '')}${(methodsExtra ? 'F' : '')}` as const;\n const isValidOrder = isValidOrders[orderFuncKey];\n\n /**\n * Determines whether an object expression consists only of ignored properties. It\n * checks the configured ignored property names and validates each property node.\n * The function is used to skip sorting for objects that contain only ignored keys.\n *\n * @param node The object expression to inspect.\n * @returns Whether the object should be ignored for sorting.\n *\n * @example\n * ```tsx\n * const ignored = isIgnoredOnlyObject(objectExpression);\n * ```\n */\n const isIgnoredOnlyObject = (node: TSESTree.ObjectExpression) => (\n ignoredProperties.length > 0\n && node.properties.length > 0\n && node.properties.every(\n prop => prop.type === AST_NODE_TYPES.Property\n && Boolean(getPropertyName(prop))\n && ignoredPropertySet.has(getPropertyName(prop)!)\n )\n );\n\n let stack: Stack | null = null;\n\n /**\n * Handles spread elements inside object expressions by resetting the previous name. It\n * ensures the sort comparison restarts after a spread. This avoids false positives\n * when ordering keys around spreads.\n *\n * @param node The spread element node to process.\n *\n * @example\n * ```tsx\n * SpreadElement(spreadNode);\n * ```\n */\n const SpreadElement = (node: TSESTree.SpreadElement) => {\n if (node.parent.type === AST_NODE_TYPES.ObjectExpression && stack) {\n stack.prevName = null;\n }\n };\n\n const listeners: TSESLint.RuleListener = {\n ExperimentalSpreadProperty: SpreadElement,\n /**\n * Pops the stack frame when leaving an object expression. It restores the previous\n * frame so outer objects continue tracking property order correctly. The function\n * performs a null check before restoring.\n *\n * @example\n * ```tsx\n * listeners['ObjectExpression:exit']();\n * ```\n */\n 'ObjectExpression:exit': function() {\n if (stack) {\n stack = stack.upper;\n }\n },\n SpreadElement,\n /**\n * Pushes a new stack frame when entering an object expression. It tracks previous\n * property state for ordering checks within that object. The frame is configured\n * to ignore sorting when the object contains only ignored properties.\n *\n * @param node The object expression node.\n *\n * @example\n * ```tsx\n * listeners.ObjectExpression(objectExpression);\n * ```\n */\n ObjectExpression(node: TSESTree.ObjectExpression) {\n stack = {\n ignoreSort: isIgnoredOnlyObject(node),\n prevName: null,\n prevNode: null,\n upper: stack\n };\n },\n /**\n * Validates property ordering and reports if keys are out of order. It respects\n * configuration options such as ignored properties and method sorting. The handler\n * may report and fix key ordering by swapping property text.\n *\n * @param node The property node to validate.\n *\n * @example\n * ```tsx\n * listeners.Property(propertyNode);\n * ```\n */\n // eslint-disable-next-line complexity\n Property(node: TSESTree.Property) {\n if (!stack) {\n return;\n }\n\n if (node.parent.type === AST_NODE_TYPES.ObjectPattern) {\n return;\n }\n\n if (ignorePropTypes) {\n if (\n // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition\n node.parent.type === AST_NODE_TYPES.ObjectExpression\n && getPropertyName(node.parent.parent as TSESTree.Property) === 'propTypes'\n ) {\n return;\n }\n if (\n // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition\n node.parent.type === AST_NODE_TYPES.ObjectExpression\n && getPropertyName(node.parent.parent as TSESTree.Property) === 'defaultProps'\n ) {\n return;\n }\n }\n\n const {prevName} = stack;\n const {prevNode} = stack;\n const thisName = getPropertyName(node);\n\n if (thisName !== null) {\n stack.prevName = thisName;\n // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition\n stack.prevNode = node || prevNode;\n }\n\n if (prevName === null || thisName === null || !prevNode) {\n return;\n }\n\n if (stack.ignoreSort) {\n const prevIndex = ignoredOrderIndex.get(prevName);\n const thisIndex = ignoredOrderIndex.get(thisName);\n\n if (prevIndex !== undefined && thisIndex !== undefined && thisIndex < prevIndex) {\n context.report({\n data: {order: ignoredProperties.join(', ')},\n // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition\n loc: node.key.loc ?? undefined,\n messageId: 'ignoredPropertiesOrder',\n node,\n /**\n * Creates fixes that swap the text and leading comments between two properties.\n * It builds a list of ESLint fixes and preserves comment placement during the swap.\n * It returns the collection of fixes that ESLint applies to reorder the properties.\n *\n * @param fixer The fixer used to generate the text edits.\n * @returns The list of fixes that swap the property positions.\n *\n * @example\n * ```tsx\n * const fixes = fix(fixer);\n * ```\n */\n fix(fixer) {\n const fixes: TSESLint.RuleFix[] = [];\n const {sourceCode} = context;\n /**\n * Moves property text and associated comments between nodes. It\n * copies the text from one node to another and preserves leading\n * comments by re-inserting them before the target node.\n *\n * @param fromNode The property to move from.\n * @param toNode The property to move to.\n *\n * @example\n * ```tsx\n * moveProperty(fromNode, toNode);\n * ```\n */\n const moveProperty = (fromNode: TSESTree.Property, toNode: TSESTree.Property) => {\n const prevText = sourceCode.getText(fromNode);\n const thisComments = sourceCode.getCommentsBefore(fromNode);\n\n for (const thisComment of thisComments) {\n fixes.push(fixer.insertTextBefore(toNode, `${sourceCode.getText(thisComment)}\\n`));\n fixes.push(fixer.remove(thisComment));\n }\n fixes.push(fixer.replaceText(toNode, prevText));\n };\n\n moveProperty(node, prevNode);\n moveProperty(prevNode, node);\n\n return fixes;\n }\n });\n }\n\n return;\n }\n\n if (!isValidOrder({\n method: prevNode.method,\n name: prevName\n }, {\n method: node.method,\n name: thisName\n })) {\n context.report({\n data: {\n insensitive: insensitive ? 'insensitive ' : '',\n methods: methodsExtra ? ' (methods seperate)' : '',\n natual: natual ? 'natural ' : '',\n order,\n prevName,\n thisName\n },\n // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition\n loc: node.key.loc ?? undefined,\n messageId: 'outOfOrder',\n node,\n /**\n * Creates the list of fixes that swap the out-of-order properties.\n * It gathers the text edits required to move both properties and any leading comments to\n * their new locations. It returns the fixes so ESLint can apply them as a single operation.\n *\n * @param fixer The fixer used to construct text edits for the swap.\n * @returns The collection of fixes that reorder the two properties.\n *\n * @example\n * ```tsx\n * const edits = fix(fixer);\n * ```\n */\n fix(fixer) {\n const fixes: TSESLint.RuleFix[] = [];\n const {sourceCode} = context;\n /**\n * Moves property text and associated comments between nodes. It\n * copies the text from one node to another and preserves leading\n * comments by re-inserting them before the target node.\n *\n * @param fromNode The property to move from.\n * @param toNode The property to move to.\n *\n * @example\n * ```tsx\n * moveProperty(fromNode, toNode);\n * ```\n */\n const moveProperty = (fromNode: TSESTree.Property, toNode: TSESTree.Property) => {\n const prevText = sourceCode.getText(fromNode);\n const thisComments = sourceCode.getCommentsBefore(fromNode);\n\n for (const thisComment of thisComments) {\n fixes.push(fixer.insertTextBefore(toNode, `${sourceCode.getText(thisComment)}\\n`));\n fixes.push(fixer.remove(thisComment));\n }\n fixes.push(fixer.replaceText(toNode, prevText));\n };\n\n moveProperty(node, prevNode);\n moveProperty(prevNode, node);\n\n return fixes;\n }\n });\n }\n }\n };\n\n return listeners;\n }\n});","import {ASTUtils} from '@typescript-eslint/utils';\n\nimport type {TSESTree} from '@typescript-eslint/utils';\n\n/**\n * Unwraps nested TypeScript expression wrappers until the underlying expression is reached.\n * It repeatedly removes chain, type assertion, and non-null wrapper nodes so downstream logic can analyze the actual\n * target. This helps ensure consistent behavior when expressions are wrapped by optional chaining or type-related syntax.\n *\n * @param expression The expression to unwrap.\n * @returns The innermost unwrapped expression.\n *\n * @example\n * ```tsx\n * const base = unwrapExpression(someExpression);\n * ```\n */\nexport const unwrapExpression = (expression: TSESTree.Expression): TSESTree.Expression => {\n let current = expression;\n\n while (\n current.type === 'ChainExpression'\n || current.type === 'TSAsExpression'\n || current.type === 'TSNonNullExpression'\n ) {\n current = current.expression;\n }\n\n return current;\n};\n\n/**\n * Determines whether an expression ultimately resolves to the styled base identifier.\n * It walks through member access and call expressions to reach the root value. This allows the rule logic to\n * treat chained or called styled usages as coming from the same base.\n *\n * @param expression The expression to inspect.\n * @returns True when the expression resolves to the styled base.\n *\n * @example\n * ```tsx\n * const isBase = isStyledBase(styled.div);\n * ```\n */\nexport const isStyledBase = (expression: TSESTree.Expression): boolean => {\n const node = unwrapExpression(expression);\n\n if (ASTUtils.isIdentifier(node)) {\n return node.name === 'styled';\n }\n\n if (node.type === 'MemberExpression') {\n return isStyledBase(node.object);\n }\n\n if (node.type === 'CallExpression') {\n return isStyledBase(node.callee);\n }\n\n return false;\n};\n\n/**\n * Collects identifier dependencies used inside a template literal. It unwraps each expression\n * to its base and keeps only identifiers for easier analysis. This provides both the name and the\n * identifier node for each dependency.\n *\n * @param template The template literal to analyze.\n * @returns A list of dependency names with their identifier nodes.\n *\n * @example\n * ```tsx\n * const deps = getDependencyNames(templateLiteral);\n * ```\n */\nexport const getDependencyNames = (\n template: TSESTree.TemplateLiteral\n): {name: string; node: TSESTree.Identifier}[] => (\n template.expressions\n .map(expression => unwrapExpression(expression))\n .filter(ASTUtils.isIdentifier)\n .map(identifier => ({\n name: identifier.name,\n node: identifier\n }))\n);\n\n/**\n * Returns a type statement node when the given node represents a type declaration. It supports direct type\n * declarations and named export declarations that contain them. This helps callers normalize type statement\n * handling in a consistent way.\n *\n * @param node The node to inspect.\n * @returns The type statement node when found, otherwise null.\n *\n * @example\n * ```tsx\n * const typeNode = unwrapTypeStatement(node);\n * ```\n */\nexport const unwrapTypeStatement = (node: TSESTree.Node): TSESTree.Node | null => {\n if (node.type === 'TSInterfaceDeclaration' || node.type === 'TSTypeAliasDeclaration') {\n return node;\n }\n\n if (node.type === 'ExportNamedDeclaration' && node.declaration) {\n const {declaration} = node;\n\n if (declaration.type === 'TSInterfaceDeclaration' || declaration.type === 'TSTypeAliasDeclaration') {\n return node;\n }\n }\n\n return null;\n};\n\n/**\n * Sorts a list of items using a provided comparison function. It delegates to the native sort algorithm to\n * produce the ordering. This utility keeps comparison logic centralized while returning the sorted array.\n *\n * @param items The items to sort.\n * @param compare The comparison function used for sorting.\n * @returns The sorted items array.\n *\n * @example\n * ```tsx\n * const sorted = compareBy(items, (a, b) => a.value - b.value);\n * ```\n */\nexport const compareBy = <T>(items: T[], compare: (left: T, right: T) => number) => (\n items.sort(compare)\n);","import {ESLintUtils} from '@typescript-eslint/utils';\n\nimport {\n compareBy,\n getDependencyNames,\n isStyledBase,\n unwrapExpression,\n unwrapTypeStatement\n} from './utils/styled-components-order-utils';\n\nimport type {TSESLint, TSESTree} from '@typescript-eslint/utils';\n\nconst createRule = ESLintUtils.RuleCreator(\n name => `https://github.com/nfqde/eslint-config-nfq/blob/master/docs/rules/${name}.md`\n);\n\ntype MessageIds = 'dependencyOrder' | 'renderOrder';\n\ntype DefinitionInfo = {\n canFix: boolean;\n dependencies: {name: string; node: TSESTree.Identifier}[];\n groupFirst: TSESTree.Node;\n groupLast: TSESTree.Node;\n id: TSESTree.Identifier;\n index: number;\n name: string;\n};\n\nexport const styledComponentsOrder = createRule<[], MessageIds>({\n defaultOptions: [],\n meta: {\n docs: {description: 'Ensure styled component definitions follow their JSX render order.'},\n fixable: 'code',\n messages: {\n dependencyOrder: 'Define {{dependency}} before {{component}} because it is used in its styles.',\n renderOrder: 'Define {{name}} after {{previous}} to match JSX render order.'\n },\n schema: [],\n type: 'suggestion'\n },\n name: 'styled-components-order',\n /**\n * Creates the rule visitor set and initializes all tracking state.\n * This function wires together definition collection and render-order analysis.\n * It returns the listener map that ESLint uses to walk the AST.\n *\n * @param context The rule context provided by ESLint.\n * @returns The rule listener map for this rule.\n *\n * @example\n * ```tsx\n * const listeners = create(context);\n * ```\n */\n // eslint-disable-next-line max-lines-per-function\n create(context) {\n const {sourceCode} = context;\n const definitions = new Map<string, DefinitionInfo>();\n const renderOrder: string[] = [];\n const renderSet = new Set<string>();\n /**\n * Computes statement grouping and placement information for a variable declarator.\n * This helps keep related statements together when producing fixes.\n * It returns null when the node cannot be safely handled.\n *\n * @param node The variable declarator to analyze.\n * @returns The statement info or null if unavailable.\n *\n * @example\n * ```tsx\n * const info = getStatementInfo(node);\n * ```\n */\n const getStatementInfo = (node: TSESTree.VariableDeclarator) => {\n // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition\n if (node.parent?.type !== 'VariableDeclaration') {\n return null;\n }\n\n const declaration = node.parent;\n const statement = declaration.parent.type === 'ExportNamedDeclaration'\n ? declaration.parent\n : declaration;\n\n const parentNode = statement.parent;\n const body = 'body' in parentNode && Array.isArray(parentNode.body)\n ? parentNode.body\n : null;\n\n if (!body) {\n return null;\n }\n\n // @ts-expect-error\n const statementIndex = body.indexOf(statement);\n\n if (statementIndex === -1) {\n return null;\n }\n\n let groupFirst: TSESTree.Node = statement as TSESTree.Node;\n\n for (let i = statementIndex - 1; i >= 0; i -= 1) {\n const candidate = unwrapTypeStatement(body[i] as TSESTree.Node);\n\n if (!candidate) {\n break;\n }\n\n const gapText = sourceCode.text.slice(candidate.range[1], groupFirst.range[0]);\n\n if (gapText.trim()) {\n break;\n }\n\n groupFirst = candidate;\n }\n\n return {\n canFix: declaration.declarations.length === 1,\n groupFirst,\n groupLast: statement as TSESTree.Node,\n index: groupFirst.range[0]\n };\n };\n /**\n * Builds a single fix function that reorders definitions to a desired sequence.\n * This function validates that a safe, contiguous replacement can be made.\n * It returns null when the fix would be unsafe or unnecessary.\n *\n * @param current The current ordered definitions.\n * @param desired The desired ordered definitions.\n * @returns A fixer callback or null if no fix is possible.\n *\n * @example\n * ```tsx\n * const fix = buildReorderFix(current, desired);\n * ```\n */\n const buildReorderFix = (current: DefinitionInfo[], desired: DefinitionInfo[]) => {\n if (current.length !== desired.length) {\n return null;\n }\n\n if (current.every((definition, index) => definition === desired[index])) {\n return null;\n }\n\n if (current.some(definition => !definition.canFix)) {\n return null;\n }\n\n if (current.some(definition => sourceCode.getCommentsBefore(definition.groupFirst).length > 0)) {\n return null;\n }\n\n const parent = current[0]?.groupFirst.parent;\n\n if (!parent || current.some(definition => definition.groupFirst.parent !== parent)) {\n return null;\n }\n\n if (!('body' in parent) || !Array.isArray(parent.body)) {\n return null;\n }\n\n const body = parent.body as TSESTree.Node[];\n const groupEntries = current.map(definition => {\n const startIndex = body.indexOf(definition.groupFirst);\n const endIndex = body.indexOf(definition.groupLast);\n\n if (startIndex === -1 || endIndex === -1 || startIndex > endIndex) {\n return null;\n }\n\n return {\n definition,\n endIndex,\n startIndex\n };\n });\n\n if (groupEntries.some(entry => !entry)) {\n return null;\n }\n\n const ranges = groupEntries;\n const minIndex = Math.min(...ranges.map(entry => entry!.startIndex));\n const maxIndex = Math.max(...ranges.map(entry => entry!.endIndex));\n const covered = new Set<number>();\n\n ranges.forEach(entry => {\n for (let i = entry!.startIndex; i <= entry!.endIndex; i += 1) {\n covered.add(i);\n }\n });\n\n for (let i = minIndex; i <= maxIndex; i += 1) {\n if (!covered.has(i)) {\n return null;\n }\n }\n\n const minRange = Math.min(...current.map(definition => definition.groupFirst.range[0]));\n const maxRange = Math.max(...current.map(definition => definition.groupLast.range[1]));\n const desiredText = desired\n .map(definition => sourceCode.text.slice(definition.groupFirst.range[0], definition.groupLast.range[1]))\n .join('\\n\\n');\n\n return (fixer: TSESLint.RuleFixer) => [\n fixer.replaceTextRange([minRange, maxRange], desiredText)\n ];\n };\n\n /**\n * Records a styled component definition and its dependencies for later validation.\n * This function ignores non-styled or duplicate definitions.\n * It stores grouping and index data required for reporting and fixes.\n *\n * @param node The variable declarator to inspect.\n *\n * @example\n * ```tsx\n * recordDefinition(node);\n * ```\n */\n const recordDefinition = (node: TSESTree.VariableDeclarator) => {\n if (node.id.type !== 'Identifier') {\n return;\n }\n\n if (node.init?.type !== 'TaggedTemplateExpression') {\n return;\n }\n\n const tag = unwrapExpression(node.init.tag);\n\n if (!isStyledBase(tag)) {\n return;\n }\n\n const {name} = node.id;\n const statementInfo = getStatementInfo(node);\n\n if (!statementInfo) {\n return;\n }\n\n if (definitions.has(name)) {\n return;\n }\n\n definitions.set(name, {\n canFix: statementInfo.canFix,\n dependencies: getDependencyNames(node.init.quasi),\n groupFirst: statementInfo.groupFirst,\n groupLast: statementInfo.groupLast,\n id: node.id,\n index: statementInfo.index,\n name\n });\n };\n\n const listeners: TSESLint.RuleListener = {\n 'Program:exit': () => {\n const orderedDefinitions = Array.from(definitions.values()).sort((a, b) => a.index - b.index);\n const definitionIndex = new Map<string, number>();\n\n orderedDefinitions.forEach((definition, index) => {\n definitionIndex.set(definition.name, index);\n });\n\n const dependencyMap = new Map<string, Set<string>>();\n\n const renderIndex = new Map(renderOrder.map((name, index) => [name, index] as const));\n const graph = new Map<string, Set<string>>();\n const inDegree = new Map<string, number>();\n\n orderedDefinitions.forEach(definition => {\n graph.set(definition.name, new Set());\n inDegree.set(definition.name, 0);\n });\n\n orderedDefinitions.forEach(definition => {\n const deps = new Set(\n definition.dependencies\n .map(dep => dep.name)\n .filter(dep => definitionIndex.has(dep))\n );\n\n if (deps.size > 0) {\n dependencyMap.set(definition.name, deps);\n }\n\n deps.forEach(dep => {\n if (!graph.has(dep)) {\n graph.set(dep, new Set());\n }\n\n graph.get(dep)!.add(definition.name);\n inDegree.set(definition.name, (inDegree.get(definition.name) ?? 0) + 1);\n });\n });\n\n /**\n * Computes a tuple used to prioritize definitions during sorting.\n * This combines render order position with source order.\n * It returns a tuple that is stable and deterministic.\n *\n * @param definition The definition to prioritize.\n * @returns The priority tuple.\n *\n * @example\n * ```tsx\n * const priority = priorityFor(definition);\n * ```\n */\n const priorityFor = (definition: DefinitionInfo) => {\n const renderPos = renderIndex.get(definition.name);\n\n return [renderPos ?? Number.POSITIVE_INFINITY, definition.index] as const;\n };\n\n /**\n * Compares two definitions using their computed priority. This ensures render order wins over source order when available. It returns a standard sort comparator value.\n *\n * @param left The first definition to compare.\n * @param right The second definition to compare.\n * @returns A comparator number for sorting.\n *\n * @example\n * ```tsx\n * const result = byPriority(a, b);\n * ```\n */\n const byPriority = (left: DefinitionInfo, right: DefinitionInfo) => {\n const [leftRender, leftIndex] = priorityFor(left);\n const [rightRender, rightIndex] = priorityFor(right);\n\n if (leftRender !== rightRender) {\n return leftRender - rightRender;\n }\n\n return leftIndex - rightIndex;\n };\n\n const pending = orderedDefinitions.filter(definition => (inDegree.get(definition.name) ?? 0) === 0);\n const desiredOrder: DefinitionInfo[] = [];\n\n while (pending.length > 0) {\n compareBy(pending, byPriority);\n const next = pending.shift()!;\n\n desiredOrder.push(next);\n\n graph.get(next.name)?.forEach(dependent => {\n const nextDegree = (inDegree.get(dependent) ?? 0) - 1;\n\n inDegree.set(dependent, nextDegree);\n\n if (nextDegree === 0) {\n const dependentDefinition = definitions.get(dependent);\n\n if (dependentDefinition) {\n pending.push(dependentDefinition);\n }\n }\n });\n }\n\n const renderNames = renderOrder.filter(name => definitionIndex.has(name));\n const needsRenderOrder = renderNames.length > 0;\n const reorderFix = desiredOrder.length === orderedDefinitions.length\n ? buildReorderFix(orderedDefinitions, desiredOrder)\n : null;\n let fixUsed = false;\n\n /**\n * Attaches a fix only once, ensuring deterministic and safe fixes.\n * This function prevents multiple reports from emitting the same fixer.\n * It returns undefined when a fix cannot be attached.\n *\n * @param fix The candidate fix to attach.\n * @returns The fix or undefined.\n *\n * @example\n * ```tsx\n * const fix = attachFix(reorderFix);\n * ```\n */\n const attachFix = (fix: ReturnType<typeof buildReorderFix>) => {\n if (!fix || fixUsed) {\n return undefined;\n }\n\n fixUsed = true;\n\n return fix;\n };\n\n orderedDefinitions.forEach(definition => {\n const currentIndex = definitionIndex.get(definition.name);\n\n if (currentIndex === undefined) {\n return;\n }\n\n definition.dependencies.forEach(dep => {\n const depIndex = definitionIndex.get(dep.name);\n\n if (depIndex !== undefined && depIndex > currentIndex) {\n context.report({\n data: {\n component: definition.name,\n dependency: dep.name\n },\n fix: attachFix(reorderFix),\n messageId: 'dependencyOrder',\n node: dep.node\n });\n }\n });\n });\n\n const earlierRendered: string[] = [];\n let maxDefIndex = -1;\n let maxDefName = '';\n\n renderNames.forEach(name => {\n const currentIndex = definitionIndex.get(name);\n\n if (currentIndex === undefined) {\n return;\n }\n\n if (currentIndex < maxDefIndex) {\n const isDependencyForEarlier = earlierRendered\n .some(earlier => dependencyMap.get(earlier)?.has(name));\n\n if (!isDependencyForEarlier) {\n const definition = definitions.get(name);\n\n if (definition) {\n context.report({\n data: {\n name,\n previous: maxDefName\n },\n fix: needsRenderOrder ? attachFix(reorderFix) : undefined,\n messageId: 'renderOrder',\n node: definition.id\n });\n }\n }\n }\n\n if (currentIndex > maxDefIndex) {\n maxDefIndex = currentIndex;\n maxDefName = name;\n }\n\n earlierRendered.push(name);\n });\n },\n VariableDeclarator: recordDefinition,\n /**\n * Tracks JSX opening elements to derive render order.\n * This function records each component name once in first-seen order.\n * It ignores non-identifier element names.\n *\n * @param node The JSX opening element node.\n *\n * @example\n * ```tsx\n * listeners.JSXOpeningElement(node);\n * ```\n */\n JSXOpeningElement(node) {\n if (node.name.type !== 'JSXIdentifier') {\n return;\n }\n\n const {name} = node.name;\n\n if (!renderSet.has(name)) {\n renderSet.add(name);\n renderOrder.push(name);\n }\n }\n };\n\n return listeners;\n }\n});","import {componentFileStructure} from './component-file-structure';\nimport {componentSingleHook} from './component-single-hook';\nimport {cypressMountHook} from './cypress-mount-hook';\nimport {hexagonalDependencyDirection} from './hexagonal-dependency-direction';\nimport {noEmptyLinesInObjects} from './no-empty-lines-in-objects';\nimport {noEmptyLinesInTypes} from './no-empty-lines-in-types';\nimport {noMagicNumbers} from './no-magic-numbers';\nimport {noUnboundMethod} from './no-unbound-method';\nimport {objectPropertyNewline} from './object-property-newline';\nimport {requireGetCy} from './require-getcy';\nimport {sortKeys} from './sort-keys';\nimport {styledComponentsOrder} from './styled-components-order';\n\nexport const customRules = {\n rules: {\n 'component-file-structure': componentFileStructure,\n 'component-single-hook': componentSingleHook,\n 'cypress-mount-hook': cypressMountHook,\n 'hexagonal-dependency-direction': hexagonalDependencyDirection,\n 'no-empty-lines-in-objects': noEmptyLinesInObjects,\n 'no-empty-lines-in-types': noEmptyLinesInTypes,\n 'no-magic-numbers': noMagicNumbers,\n 'no-unbound-method': noUnboundMethod,\n 'object-property-newline': objectPropertyNewline,\n 'require-getcy': requireGetCy,\n 'sort-keys': sortKeys,\n 'styled-components-order': styledComponentsOrder\n }\n};","import * as pluginEmotion from '@emotion/eslint-plugin';\nimport pluginStylistic from '@stylistic/eslint-plugin';\n// @ts-expect-error\nimport pluginArrayFunc from 'eslint-plugin-array-func';\nimport pluginCypress from 'eslint-plugin-cypress';\nimport * as pluginImport from 'eslint-plugin-import';\nimport pluginJsDoc from 'eslint-plugin-jsdoc';\n// @ts-expect-error\nimport pluginJsxA11y from 'eslint-plugin-jsx-a11y';\nimport pluginNode from 'eslint-plugin-n';\n// @ts-expect-error\nimport pluginNoUnsanitized from 'eslint-plugin-no-unsanitized';\n// @ts-expect-error\nimport pluginPromise from 'eslint-plugin-promise';\nimport pluginReact from 'eslint-plugin-react';\nimport pluginReactHooks from 'eslint-plugin-react-hooks';\n// @ts-expect-error\nimport pluginRedos from 'eslint-plugin-redos';\n// @ts-expect-error\nimport pluginSecurity from 'eslint-plugin-security';\n// @ts-expect-error\nimport pluginSortDestructureKeys from 'eslint-plugin-sort-destructure-keys';\n// @ts-expect-error\nimport pluginStyledComponentsOrder from 'eslint-plugin-styled-components-order';\n\nimport {customRules} from '../rules/custom';\n\nexport const plugins: Record<string, any> = {\n '@emotion': pluginEmotion,\n '@nfq': customRules,\n '@stylistic': pluginStylistic,\n 'array-func': pluginArrayFunc,\n cypress: pluginCypress,\n import: pluginImport,\n jsdoc: pluginJsDoc,\n 'jsx-a11y': pluginJsxA11y,\n n: pluginNode,\n 'no-unsanitized': pluginNoUnsanitized,\n promise: pluginPromise,\n react: pluginReact,\n 'react-hooks': pluginReactHooks,\n redos: pluginRedos,\n security: pluginSecurity,\n 'sort-destructure-keys': pluginSortDestructureKeys,\n 'styled-components-order': pluginStyledComponentsOrder\n};","export const settings = {\n settings: {\n '@nfq': {ignoredProperties: ['xs', 'sm', 'md', 'lg', 'xl', 'xxl']},\n 'import/resolver': {\n alias: {\n extensions: [\n '.js',\n '.ts',\n '.cjs',\n '.mjs',\n '.cts',\n '.mts',\n '.jsx',\n '.tsx',\n '.json',\n '.css',\n '.png',\n '.jpeg',\n '.jpg',\n '.svg',\n '.webp'\n ]\n }\n },\n jsdoc: {\n ignoreInternal: false,\n ignorePrivate: false,\n maxLines: 1,\n minLines: 0,\n mode: 'typescript',\n tagNamePreference: {\n augments: 'extends',\n ignore: false\n }\n },\n linkComponents: ['Hyperlink', {\n linkAttribute: 'href',\n name: 'Link'\n }],\n react: {version: 'detect'}\n }\n};","import * as pluginEmotion from '@emotion/eslint-plugin';\nimport pluginStylistic from '@stylistic/eslint-plugin';\nimport pluginTS from '@typescript-eslint/eslint-plugin';\n// @ts-expect-error\nimport pluginArrayFunc from 'eslint-plugin-array-func';\nimport pluginCypress from 'eslint-plugin-cypress';\nimport * as pluginImport from 'eslint-plugin-import';\nimport pluginJsDoc from 'eslint-plugin-jsdoc';\n// @ts-expect-error\nimport pluginJsxA11y from 'eslint-plugin-jsx-a11y';\nimport pluginNode from 'eslint-plugin-n';\n// @ts-expect-error\nimport pluginNoUnsanitized from 'eslint-plugin-no-unsanitized';\n// @ts-expect-error\nimport pluginPromise from 'eslint-plugin-promise';\nimport pluginReact from 'eslint-plugin-react';\nimport pluginReactHooks from 'eslint-plugin-react-hooks';\n// @ts-expect-error\nimport pluginRedos from 'eslint-plugin-redos';\n// @ts-expect-error\nimport pluginSecurity from 'eslint-plugin-security';\n// @ts-expect-error\nimport pluginSortDestructureKeys from 'eslint-plugin-sort-destructure-keys';\n// @ts-expect-error\nimport pluginStyledComponentsOrder from 'eslint-plugin-styled-components-order';\n\nimport {customRules} from '../rules/custom';\n\nexport const tsPlugins: Record<string, any> = {\n '@emotion': pluginEmotion,\n '@nfq': customRules,\n '@stylistic': pluginStylistic,\n '@typescript-eslint': pluginTS,\n 'array-func': pluginArrayFunc,\n cypress: pluginCypress,\n import: pluginImport,\n jsdoc: pluginJsDoc,\n 'jsx-a11y': pluginJsxA11y,\n n: pluginNode,\n 'no-unsanitized': pluginNoUnsanitized,\n promise: pluginPromise,\n react: pluginReact,\n 'react-hooks': pluginReactHooks,\n redos: pluginRedos,\n security: pluginSecurity,\n 'sort-destructure-keys': pluginSortDestructureKeys,\n 'styled-components-order': pluginStyledComponentsOrder\n};","import * as tsParser from '@typescript-eslint/parser';\n\nimport {\n commonEslintRules,\n commonPluginRules,\n cypressPluginRules,\n cypressResets,\n nodeRules,\n reactPluginRules,\n storybookResets,\n tsRules,\n typescriptRuleResets\n} from './rules';\nimport {globals} from './settings/globals';\nimport {plugins} from './settings/plugins';\nimport {settings} from './settings/settings';\nimport {tsPlugins} from './settings/tsPlugins';\n\nexport const NFQEslintConfig = [\n settings,\n {\n files: ['**/*.{js,cjs,mjs,jsx}'],\n languageOptions: {\n ecmaVersion: 'latest',\n globals,\n parser: tsParser,\n parserOptions: {\n ecmaFeatures: {jsx: true},\n ecmaVersion: 'latest',\n project: '**/tsconfig*.json'\n }\n },\n linterOptions: {\n reportUnusedDisableDirectives: 'error',\n reportUnusedInlineConfigs: 'error'\n },\n name: 'NFQ ESLint JS Config',\n plugins,\n rules: {\n ...commonEslintRules,\n ...commonPluginRules,\n ...nodeRules,\n ...reactPluginRules\n }\n },\n {\n files: ['**/*.{ts,cts,mts,tsx}'],\n languageOptions: {\n ecmaVersion: 'latest',\n globals,\n parser: tsParser,\n parserOptions: {\n ecmaFeatures: {jsx: true},\n ecmaVersion: 'latest',\n project: '**/tsconfig*.json'\n }\n },\n linterOptions: {\n reportUnusedDisableDirectives: 'error',\n reportUnusedInlineConfigs: 'error'\n },\n name: 'NFQ ESLint TS Config',\n plugins: tsPlugins,\n rules: {\n ...commonEslintRules,\n ...commonPluginRules,\n ...nodeRules,\n ...reactPluginRules,\n ...tsRules,\n ...typescriptRuleResets\n }\n },\n {\n files: ['**/*.stories.{ts,cts,mts,tsx}'],\n languageOptions: {\n ecmaVersion: 'latest',\n globals,\n parser: tsParser,\n parserOptions: {\n ecmaFeatures: {jsx: true},\n ecmaVersion: 'latest',\n project: '**/tsconfig*.json'\n }\n },\n linterOptions: {\n reportUnusedDisableDirectives: 'error',\n reportUnusedInlineConfigs: 'error'\n },\n name: 'NFQ ESLint TS Story Config',\n plugins: tsPlugins,\n rules: {\n ...commonEslintRules,\n ...commonPluginRules,\n ...nodeRules,\n ...reactPluginRules,\n ...tsRules,\n ...typescriptRuleResets,\n ...storybookResets\n }\n },\n {\n files: ['**/*.cy.{ts,cts,mts,tsx}'],\n languageOptions: {\n ecmaVersion: 'latest',\n globals,\n parser: tsParser,\n parserOptions: {\n ecmaFeatures: {jsx: true},\n ecmaVersion: 'latest',\n project: '**/tsconfig*.json'\n }\n },\n linterOptions: {\n reportUnusedDisableDirectives: 'error',\n reportUnusedInlineConfigs: 'error'\n },\n name: 'NFQ ESLint Cypress Config',\n plugins: tsPlugins,\n rules: {\n ...commonEslintRules,\n ...commonPluginRules,\n ...nodeRules,\n ...reactPluginRules,\n ...tsRules,\n ...typescriptRuleResets,\n ...cypressPluginRules,\n ...cypressResets\n }\n }\n];\n\nexport {globals, plugins, settings, tsPlugins};"],"names":["codeQuality","getWithoutSet","setWithoutGet","allowImplicit","camelcase","ignoreDestructuring","properties","curly","commentPattern","allowKeywords","considerPropertyDescriptor","includeCommonJSModuleExports","max","skipBlankLines","skipComments","IIFEs","capIsNew","capIsNewExceptions","newIsCap","newIsCapExceptions","allowElseIf","allow","ignorePattern","message","object","property","selector","defaultAssignment","allowShortCircuit","allowTaggedTemplates","allowTernary","allowAsStatement","location","terms","allowEmptyReject","caseSensitive","yoda","complexity","exceptMethods","ignorePropertyModificationsFor","props","errorPrevention","eqeqeq","checkLoops","radix","requireStringLiterals","modernJavaScript","requireReturnForObjectLiteral","paths","patterns","ignoreExport","ignoreImport","avoidExplicitReturnArrows","avoidQuotes","ignoreConstructors","allowNamedFunctions","allowUnboundThis","destructuring","ignoreReadBeforeAssign","AssignmentExpression","array","VariableDeclarator","enforceForRenamedProperties","ignoreCase","ignoreDeclarationSort","ignoreMemberSort","strictMode","strict","variables","concat","confusingBrowserGlobals","args","argsIgnorePattern","caughtErrors","ignoreRestSiblings","vars","classes","functions","commonEslintRules","arrayFunc","emotion","importRules","importFunctions","webpackChunknameFormat","eot","otf","ttf","woff","woff2","ignoreTypeImports","allowComputed","allowAnonymousClass","allowAnonymousFunction","allowArray","allowArrowFunction","allowLiteral","allowObject","maxDepth","Infinity","considerQueryString","devDependencies","optionalDependencies","commonjs","ignore","ignoreExports","missingExports","unusedExports","alphabetize","caseInsensitive","order","groups","pathGroups","group","pattern","position","pathGroupsExcludedImportTypes","jsdoc","tags","checkDestructured","checkRestProperty","enableFixer","noFinalLineText","noMultilineBlocks","noSingleLineBlocks","noZeroLineText","exemptedBy","contexts","publicOnly","require","ArrowFunctionExpression","ClassDeclaration","ClassExpression","FunctionDeclaration","FunctionExpression","MethodDefinition","checkDestructuredRoots","enableRestElementFixer","enableRootFixer","unnamedRootBase","useDefaultObjectProperties","startLines","nfq","detectObjects","enforceConst","ignoreArrayIndexes","ignoreArrays","ignoreClassFieldInitialValues","ignoreConstDeclarations","ignoreDefaultValues","ignoreFunctions","decoratorNames","ignorePropTypes","methodsExtra","natural","promise","redos","cache","checker","ignoreErrors","permittableComplexities","timeout","sanitize","security","stylistic","after","before","allowSingleLine","exceptions","ArrayExpression","ArrayPattern","CallExpression","ImportDeclaration","NewExpression","ObjectExpression","ObjectPattern","VariableDeclaration","arguments","flatTernaryExpressions","body","parameters","ignoreComments","ignoredNodes","outerIIFEBody","SwitchCase","afterColon","beforeColon","mode","applyDefaultPatterns","exceptAfterSingleLine","code","ignoreRegExpLiterals","ignoreTemplateLiterals","ignoreUrls","multiline","delimiter","requireLast","multilineDetection","singleline","ignoreChainWithDepth","allowParens","allowSamePrecedence","maxBOF","maxEOF","overrides","ExportDeclaration","consistent","minProperties","TSEnumBody","TSInterfaceBody","TSTypeLiteral","blankLine","next","prev","keywords","numbers","unnecessary","avoidEscape","anonymous","asyncArrow","named","nonwords","words","block","balanced","markers","line","functionPrototypeMethods","commonPluginRules","cypress","nfqPluginRules","cypressPluginRules","cypressResets","nodeRules","ignores","SPACE_INDENT","reactRules","allowAfterSuper","allowAfterThis","enforceInMethodNames","propTypeNames","rule","button","reset","submit","allowRequiredDefaults","ignoreTranspilerName","forbid","allowInPropTypes","checkChildContextTypes","checkContextTypes","namedComponents","unnamedComponents","always","children","allowMultiline","extensions","eventHandlerPrefix","eventHandlerPropPrefix","checkAttributes","indentLogicalExpressions","checkFragmentShorthand","checkKeyMustBeforeSpread","warnOnDuplicates","maximum","when","prevent","allowArrowFunctions","allowBind","allowFunctions","ignoreDOMComponents","ignoreRefs","noStrings","name","enforceDynamicLinks","allowGlobals","allowAllCaps","custom","explicitSpread","html","callbacksLast","noSortAlphabetically","reservedFirst","shorthandFirst","shorthandLast","afterOpening","beforeClosing","beforeSelfClosing","closingSlash","arrow","assignment","condition","declaration","logical","prop","return","ignoreStateless","checkAliases","customValidators","skipShapeProps","ignorePureComponents","skipUndeclared","forbidDefaultForRequired","allowDecorators","lifecycle","rendering","requiredFirst","sortShapeProp","reactA11y","area","elements","img","components","aspects","specialLink","ignoreNonDom","assert","controlComponents","depth","labelAttributes","labelComponents","audio","track","video","ignoreNonDOM","tr","handlers","li","ol","table","td","ul","roles","reactHooks","reactPluginRules","eslint","react","typescriptRuleResets","nfqRules","tsEslint","default","assertionStyle","disallowTypeAnnotations","prefer","accessibility","interfaces","typeLiterals","checksVoidReturn","allowDeclarations","allowDefinitionFiles","allowedNames","checkIntersections","allowDefaultCaseForExhaustiveSwitch","considerDefaultExhaustiveForUnions","tsRules","storybookResets","globals","afterEach","beforeEach","chai","Chai","context","cy","Cypress","describe","it","JQuery","JSX","NodeJS","globalsEslint","browser","node","builtin","es2026","unwrapExpression","expression","current","type","isUppercaseName","test","COMPONENT_WRAPPERS","Set","isComponentWrapperCall","callee","has","getFunctionFromExpression","argument","nested","containsJsx","stack","length","pop","key","Object","keys","value","Array","isArray","item","push","isComponentSuperclass","isClassComponent","superClass","renderMethod","find","member","getSuperclassPropsType","withSuperParams","superParams","superTypeArguments","superTypeParameters","params","getTypeArguments","withTypeArgs","typeArgs","typeArguments","typeParameters","isForwardRefCallee","getForwardRefPropsType","getComponentInfoFromStatement","id","componentTypeNode","returnType","typeAnnotation","propsTypeNode","statement","declarator","declarations","ASTUtils","isIdentifier","init","functionNode","initPropsType","forwardRefPropsType","isDisplayNameAssignment","componentName","left","isComponentExport","specifiers","some","specifier","local","exported","isDefaultComponentExport","Boolean","isStyledDeclaration","isStyledTagExpression","tag","STYLED_FACTORY_NAMES","isStyledFactory","isStyledFactoryDeclaration","getTypeDeclarationInfo","collectTypeReferences","typeNode","names","typeName","add","createRule","ESLintUtils","RuleCreator","ORDER_LABELS","ORDER_MESSAGE","join","getSectionLabel","section","PAGE_TYPE_NAMES","componentFileStructure","defaultOptions","meta","docs","description","messages","invalidOrder","missingDisplayName","missingNamedExport","schema","create","sourceCode","programBody","ast","componentCandidates","filter","map","info","componentInfo","sort","right","range","typeDeclarations","Map","set","propsTypeNames","propsTypeRefs","isPageType","typeRefs","from","isPageLayoutAssignment","hasDefaultExport","hasLayoutAssignment","isPageComponent","hasStaticDisplayName","hasDisplayNameMember","static","isPropsTypeDeclaration","isNonPropsTypeDeclaration","isOptionalVarDeclaration","sectionForStatement","getStatementName","first","Program","lastSection","lastSectionName","hasDisplayName","hasNamedExport","report","data","currentName","previous","previousName","messageId","isHookCallee","startsWith","getComponentInfos","getHookCallFromStatement","isGuardClause","alternate","consequent","hasReturnStatement","componentSingleHook","invalidStatement","tooManyHooks","componentInfos","component","statements","hasReturn","hookCount","hookCall","isHookCall","isCyCommandCall","command","isMountHookCall","isThenCall","target","getThenChain","mountCall","thens","parent","getHookCallFromArrow","checkHookArguments","messageIds","allowedHookCalls","errors","isHooks","missingHooksArgs","invalidHookArgument","arg","hasWrapValues","wrapCall","containsMockComponent","openingElement","child","hasMountWithMock","hasAssertionCall","isAllowedFirstThenStatement","walk","visitor","isItCall","isThenCallbackValid","callback","param","isValuesGetCall","isValuesItsCall","hasValuesCurrentInChain","isCurrent","isValuesInvokeCall","hasValuesInvokeInCallback","found","checkFirstThenBody","needs","hasAssertion","hasInvalidOrder","hasInvalidStatement","hasMount","hasWrap","wrapIndex","mountIndex","index","cypressMountHook","assertionInFirstThen","invalidFirstThenStatement","invalidThenOrder","missingFirstThen","missingMount","missingSecondThen","missingThenAfterInvoke","missingThenDestructure","missingThenWrap","unwrappedHook","hookCalls","mountCalls","result","hasHookArgErrors","error","firstThen","validCallback","firstThenValid","secondThen","secondCallback","toPosix","replace","stripDrive","normalizePath","normalized","path","posix","normalize","withoutDrive","ensureTrailingSlash","endsWith","buildAliasMap","aliases","alias","aliasPath","readAliasesFromSettings","settings","resolver","resolveAliasImport","source","aliasMap","entries","slice","resolveRelativeImport","filename","normalizedFile","dir","split","getLayer","resolvedPath","pathValue","pathWithSlash","contains","includes","isClientLayer","layer","isServerLayer","isDomainLayer","isClientUtils","isServerUtils","isConfigLayer","isMobxStoreFile","program","hasMakeAutoObservable","usesMakeAutoObservable","imported","requiredAliases","hexagonalDependencyDirection","apiImport","clientApiImport","crossBoundary","domainImport","domainUtilsImport","missingServiceClass","missingServiceImplements","serverDirection","uiApplicationImport","missing","currentLayer","isClient","isServer","reportInvalidService","classNode","implements","resolveImport","aliasResolved","checkImport","resolved","targetLayer","allowed","noEmptyLinesInObjects","fixable","noEmptyLine","reportGap","startToken","endToken","startIndex","endLineStartIndex","getIndexFromLoc","column","loc","start","gapText","text","indent","sourceText","scanIndex","fixStartIndex","Math","fix","fixer","replaceTextRange","checkBlockMembers","members","leftBrace","getFirstToken","rightBrace","getLastToken","memberItems","memberTokens","getTokens","end","memberRanges","commentItems","getTokensBetween","includeComments","token","comment","items","a","b","i","listeners","objectNode","noEmptyLinesInTypes","interfaceNode","typeLiteralNode","getStaticPropertyName","String","expressions","quasis","cooked","isComputed","computed","checkText","actual","expected","skipChainExpression","isNumericLiteral","isSpecificId","isSpecificMemberAccess","objectName","propertyName","checkNode","actualPropertyName","normalizeIgnoreValue","BigInt","MAX_ARRAY_LENGTH","noMagicNumbers","noMagic","useConst","additionalProperties","anyOf","uniqueItems","config","options","okTypes","AST_NODE_TYPES","Property","isIgnoredValue","isDefaultValue","fullNumberNode","AssignmentPattern","isClassFieldInitialValue","PropertyDefinition","isParseIntRadix","isJSXNumber","isArrayIndex","MemberExpression","Number","isInteger","isConstValue","kind","shouldIgnoreFunctions","shouldIgnoreArrays","Literal","numericValue","raw","UnaryExpression","operator","Identifier","DEFAULT_DECORATORS","normalizeDecoratorNames","trim","getDecoratorName","decorator","ts","isCallExpression","isPropertyAccessExpression","methodUsesThis","visit","SyntaxKind","ThisKeyword","forEachChild","ChainExpression","TSNonNullExpression","TSAsExpression","TSTypeAssertion","unwrapUsage","isThisBindCall","grandParent","firstArg","ThisExpression","isCallbackUsage","JSXExpressionContainer","JSXAttribute","ReturnStatement","noUnboundMethod","constructorBind","unboundMethod","services","getParserServices","getTypeChecker","decoratorLabel","methodCache","reportCache","aliasCache","memberSymbolCache","classAutoBindCache","WeakMap","isAutoBindOption","isObjectLiteralExpression","isPropertyAssignment","isStringLiteral","initializer","TrueKeyword","isMakeAutoObservableCallee","hasAutoBindInConstructor","classDecl","cached","get","undefined","ctor","isConstructorDeclaration","isExpressionStatement","expr","hasAutoBind","resolveSymbol","symbol","flags","SymbolFlags","Alias","getAliasedSymbol","getMethodInfo","aliased","Method","Function","GetAccessor","SetAccessor","getDeclarations","methodDecl","decl","isMethodDeclaration","isClassLike","getCombinedModifierFlags","isStatic","ModifierFlags","Static","decorators","canHaveDecorators","getDecorators","hasDecorator","autoBind","usesThis","shouldReportSymbol","shouldReport","getSymbolForMember","tsNode","esTreeNodeToTSNodeMap","getSymbolAtLocation","isElementAccessExpression","argumentExpression","isStringLiteralLike","reportConstructorBinding","methodName","decoratorName","constructorBody","ExpressionStatement","DEFAULT_SCREEN_SIZES","objectPropertyNewline","allowAllPropertiesOnSameLine","allowMultiplePropertiesPerLine","ignoredProperties","propertiesOnNewline","propertiesOnNewlineAll","shared","allowSameLine","isScreenSizeProperty","firstToken","lastToken","every","curr","lastTokenOfPrevious","firstTokenOfCurrent","comma","getTokenBefore","rangeAfterComma","isCypressCommandsObject","isGetCyRegistration","nameArg","isCyGetCall","isAliasGetCall","requireGetCy","useGetCy","isInsideGetCyRegistration","isValidOrders","asc","ascF","method","ascI","toLowerCase","ascIF","ascIN","naturalCompare","ascINF","ascN","ascNF","desc","descF","descI","descIF","descIN","descINF","descN","descNF","getPropertyName","staticName","astUtils","sortKeys","ignoredPropertiesOrder","outOfOrder","enum","ignoredPropertySet","ignoredOrderIndex","insensitive","natual","orderFuncKey","isValidOrder","isIgnoredOnlyObject","SpreadElement","prevName","ExperimentalSpreadProperty","upper","ignoreSort","prevNode","thisName","prevIndex","thisIndex","fixes","moveProperty","fromNode","toNode","prevText","getText","thisComments","getCommentsBefore","thisComment","insertTextBefore","remove","replaceText","methods","isStyledBase","getDependencyNames","template","identifier","unwrapTypeStatement","compareBy","compare","styledComponentsOrder","dependencyOrder","renderOrder","definitions","renderSet","getStatementInfo","parentNode","statementIndex","indexOf","groupFirst","candidate","canFix","groupLast","buildReorderFix","desired","definition","groupEntries","endIndex","entry","ranges","minIndex","min","maxIndex","covered","forEach","minRange","maxRange","desiredText","recordDefinition","statementInfo","dependencies","quasi","Program:exit","orderedDefinitions","values","definitionIndex","dependencyMap","renderIndex","graph","inDegree","deps","dep","size","priorityFor","renderPos","POSITIVE_INFINITY","byPriority","leftRender","leftIndex","rightRender","rightIndex","pending","desiredOrder","shift","dependent","nextDegree","dependentDefinition","renderNames","needsRenderOrder","reorderFix","fixUsed","attachFix","currentIndex","depIndex","dependency","earlierRendered","maxDefIndex","maxDefName","isDependencyForEarlier","earlier","JSXOpeningElement","customRules","rules","plugins","pluginEmotion","pluginStylistic","pluginArrayFunc","pluginCypress","import","pluginImport","pluginJsDoc","pluginJsxA11y","n","pluginNode","pluginNoUnsanitized","pluginPromise","pluginReact","pluginReactHooks","pluginRedos","pluginSecurity","pluginSortDestructureKeys","pluginStyledComponentsOrder","ignoreInternal","ignorePrivate","maxLines","minLines","tagNamePreference","augments","linkComponents","linkAttribute","version","tsPlugins","pluginTS","NFQEslintConfig","files","languageOptions","ecmaVersion","parser","tsParser","parserOptions","ecmaFeatures","jsx","project","linterOptions","reportUnusedDisableDirectives","reportUnusedInlineConfigs"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAO,MAAMA,WAAW,GAAG;EACvB,gBAAgB,EAAE,CACd,OAAO,EACP;AACIC,IAAAA,aAAa,EAAE,KAAK;AACpBC,IAAAA,aAAa,EAAE;AACnB,GAAC,CACJ;EACD,uBAAuB,EAAE,CAAC,OAAO,EAAE;AAACC,IAAAA,aAAa,EAAE;AAAI,GAAC,CAAC;AACzD,EAAA,kBAAkB,EAAE,OAAO;EAC3BC,SAAS,EAAE,CACP,OAAO,EACP;AACIC,IAAAA,mBAAmB,EAAE,KAAK;AAC1BC,IAAAA,UAAU,EAAE;AAChB,GAAC,CACJ;AACD,EAAA,mBAAmB,EAAE,OAAO;AAC5B,EAAA,iBAAiB,EAAE,CAAC,OAAO,EAAE,MAAM,CAAC;AACpCC,EAAAA,KAAK,EAAE,CAAC,OAAO,EAAE,YAAY,EAAE,YAAY,CAAC;EAC5C,cAAc,EAAE,CAAC,MAAM,EAAE;AAACC,IAAAA,cAAc,EAAE;AAAc,GAAC,CAAC;AAC1D,EAAA,oBAAoB,EAAE,OAAO;EAC7B,cAAc,EAAE,CAAC,OAAO,EAAE;AAACC,IAAAA,aAAa,EAAE;AAAI,GAAC,CAAC;AAChD,EAAA,oBAAoB,EAAE,CAClB,KAAK,EACL,QAAQ,EACR;AACIC,IAAAA,0BAA0B,EAAE,IAAI;AAChCC,IAAAA,4BAA4B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