@comment-labs/oxlint-config 1.0.0 → 1.0.2

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/index.mjs CHANGED
@@ -101,18 +101,16 @@ const baseRules = {
101
101
  "import/no-nodejs-modules": "off",
102
102
  "import/unambiguous": "off",
103
103
  "node/no-top-level-await": "off",
104
- "node/no-sync": ["warn", { ignores: ["execSync"] }],
104
+ "node/no-sync": "off",
105
105
  "react/react-in-jsx-scope": "off",
106
106
  "react/jsx-filename-extension": ["error", { extensions: ["jsx", "tsx"] }],
107
107
  "jest/require-hook": "off",
108
108
  "jest/no-conditional-in-test": "off",
109
109
  "jest/prefer-expect-assertions": "off",
110
110
  "vitest/prefer-called-times": "off",
111
+ "vitest/prefer-expect-assertions": "off",
111
112
  "vitest/prefer-strict-boolean-matchers": "off",
112
- "vitest/prefer-expect-assertions": ["warn", {
113
- onlyFunctionsWithExpectInCallback: true,
114
- onlyFunctionsWithExpectInLoop: true
115
- }],
113
+ "vitest/require-hook": "off",
116
114
  "vitest/require-test-timeout": "off",
117
115
  "vitest/no-importing-vitest-globals": "off",
118
116
  "vitest/no-conditional-in-test": "off",
@@ -163,16 +161,72 @@ const baseRules = {
163
161
  "security-js/detect-object-injection": "off",
164
162
  "security-js/detect-new-buffer": "error",
165
163
  "security-js/detect-bidi-characters": "error",
166
- "unicorn-js/better-regex": "warn",
164
+ "unicorn-js/class-reference-in-static-methods": "warn",
165
+ "unicorn-js/consistent-conditional-object-spread": "warn",
167
166
  "unicorn-js/consistent-destructuring": "warn",
167
+ "unicorn-js/consistent-json-file-read": "warn",
168
168
  "unicorn-js/consistent-template-literal-escape": "warn",
169
+ "unicorn-js/consistent-tuple-labels": "warn",
170
+ "unicorn-js/default-export-style": "warn",
171
+ "unicorn-js/no-array-concat-in-loop": "warn",
172
+ "unicorn-js/no-array-splice": "warn",
173
+ "unicorn-js/no-computed-property-existence-check": "warn",
174
+ "unicorn-js/no-confusing-array-splice": "warn",
175
+ "unicorn-js/no-duplicate-if-branches": "warn",
176
+ "unicorn-js/no-duplicate-loops": "warn",
177
+ "unicorn-js/no-duplicate-set-values": "warn",
169
178
  "unicorn-js/no-for-loop": "warn",
179
+ "unicorn-js/no-incorrect-query-selector": "warn",
180
+ "unicorn-js/no-incorrect-template-string-interpolation": "warn",
181
+ "unicorn-js/no-late-current-target-access": "warn",
182
+ "unicorn-js/no-late-event-control": "warn",
183
+ "unicorn-js/no-loop-iterable-mutation": "warn",
184
+ "unicorn-js/no-mismatched-map-key": "warn",
185
+ "unicorn-js/no-non-function-verb-prefix": "warn",
186
+ "unicorn-js/no-object-methods-with-collections": "warn",
187
+ "unicorn-js/no-optional-chaining-on-undeclared-variable": "warn",
188
+ "unicorn-js/no-return-array-push": "warn",
189
+ "unicorn-js/no-selector-as-dom-name": "warn",
190
+ "unicorn-js/no-this-outside-of-class": "warn",
191
+ "unicorn-js/no-top-level-assignment-in-function": "warn",
192
+ "unicorn-js/no-uncalled-method": "warn",
193
+ "unicorn-js/no-undeclared-class-members": "warn",
194
+ "unicorn-js/no-unnecessary-array-flat-map": "warn",
195
+ "unicorn-js/no-unnecessary-boolean-comparison": "warn",
196
+ "unicorn-js/no-unnecessary-splice": "warn",
197
+ "unicorn-js/no-unsafe-property-key": "warn",
198
+ "unicorn-js/no-useless-else": "warn",
170
199
  "unicorn-js/no-useless-iterator-to-array": "warn",
200
+ "unicorn-js/prefer-abort-signal-any": "warn",
201
+ "unicorn-js/prefer-abort-signal-timeout": "warn",
202
+ "unicorn-js/prefer-array-from-async": "warn",
203
+ "unicorn-js/prefer-array-iterable-methods": "warn",
204
+ "unicorn-js/prefer-array-slice": "warn",
205
+ "unicorn-js/prefer-continue": "warn",
206
+ "unicorn-js/prefer-dom-node-html-methods": "warn",
207
+ "unicorn-js/prefer-else-if": "warn",
171
208
  "unicorn-js/prefer-export-from": "warn",
209
+ "unicorn-js/prefer-get-or-insert-computed": "warn",
210
+ "unicorn-js/prefer-group-by": "warn",
211
+ "unicorn-js/prefer-hoisting-branch-code": "warn",
212
+ "unicorn-js/prefer-includes-over-repeated-comparisons": "warn",
213
+ "unicorn-js/prefer-iterator-to-array": "warn",
214
+ "unicorn-js/prefer-location-assign": "warn",
215
+ "unicorn-js/prefer-number-is-safe-integer": "warn",
216
+ "unicorn-js/prefer-object-destructuring-defaults": "warn",
217
+ "unicorn-js/prefer-observer-apis": "warn",
218
+ "unicorn-js/prefer-private-class-fields": "warn",
219
+ "unicorn-js/prefer-promise-try": "warn",
220
+ "unicorn-js/prefer-scoped-selector": "warn",
221
+ "unicorn-js/prefer-set-methods": "warn",
172
222
  "unicorn-js/prefer-simple-condition-first": "warn",
223
+ "unicorn-js/prefer-single-call": "warn",
224
+ "unicorn-js/prefer-single-object-destructuring": "warn",
225
+ "unicorn-js/prefer-smaller-scope": "warn",
173
226
  "unicorn-js/prefer-switch": "warn",
227
+ "unicorn-js/prefer-then-catch": "warn",
228
+ "unicorn-js/prefer-type-literal-last": "warn",
174
229
  "unicorn-js/switch-case-break-position": "warn",
175
- "unicorn-js/prefer-single-call": "warn",
176
230
  "jsdoc-js/check-alignment": "warn",
177
231
  "jsdoc-js/check-indentation": "warn",
178
232
  "jsdoc-js/check-line-alignment": "warn",
@@ -584,8 +638,14 @@ async function getGlobals() {
584
638
  if (await enableMode([
585
639
  "wrangler.toml",
586
640
  "wrangler.json",
587
- "wrangler.jsonc"
588
- ], ["@cloudflare/workers-types", "wrangler"])) return cloudflare;
641
+ "wrangler.jsonc",
642
+ "cloudflare.config.ts"
643
+ ], [
644
+ "@cloudflare/workers-types",
645
+ "wrangler",
646
+ "@cloudflare/vite-plugin",
647
+ "@cloudflare/vitest-plugin"
648
+ ])) return cloudflare;
589
649
  return base;
590
650
  }
591
651
  const globals = await getGlobals();
@@ -739,6 +799,18 @@ const ambientOverrides = {
739
799
  rules: { "no-redeclare": "off" }
740
800
  };
741
801
  //#endregion
802
+ //#region src/overrides/vitest.ts
803
+ const vitestOverrides = {
804
+ files: ["**/{test,tests}/**/*.{js,jsx,ts,tsx,mjs,cjs,mts,cts}", "**/*.{test,spec}.{js,jsx,ts,tsx,mjs,cjs,mts,cts}"],
805
+ rules: {
806
+ "vitest/prefer-expect-assertions": ["warn", {
807
+ onlyFunctionsWithExpectInCallback: true,
808
+ onlyFunctionsWithExpectInLoop: true
809
+ }],
810
+ "vitest/require-hook": "warn"
811
+ }
812
+ };
813
+ //#endregion
742
814
  //#region src/index.ts
743
815
  const config = {
744
816
  options: {
@@ -762,7 +834,8 @@ const config = {
762
834
  playwrightOverrides,
763
835
  reactOverrides,
764
836
  reactNativeOverrides,
765
- scriptsOverrides
837
+ scriptsOverrides,
838
+ vitestOverrides
766
839
  ],
767
840
  ignorePatterns: [
768
841
  "coverage/**",
@@ -1 +1 @@
1
- {"version":3,"file":"index.mjs","names":[],"sources":["../src/categories.ts","../src/base-rules.ts","../src/stylistic-rules.ts","../src/plugins.ts","../src/utils.ts","../src/globals.ts","../src/js-plugins.ts","../src/overrides/i18next.ts","../src/overrides/playwright.ts","../src/overrides/react.ts","../src/overrides/react-native.ts","../src/overrides/scripts.ts","../src/overrides/declarations.ts","../src/overrides/ambient.ts","../src/index.ts"],"sourcesContent":["import type { RuleCategories } from 'oxlint'\n\n\nexport const categories: RuleCategories = {\n correctness: 'error',\n nursery: 'warn',\n pedantic: 'warn',\n perf: 'warn',\n restriction: 'warn',\n style: 'warn',\n suspicious: 'error'\n}\n","import type { DummyRuleMap } from 'oxlint'\n\n\nexport const baseRules: DummyRuleMap = {\n 'array-type': 'off',\n 'capitalized-comments': 'off',\n 'class-methods-use-this': 'off',\n 'consistent-indexed-object-style': 'off',\n 'consistent-type-definitions': 'off',\n 'complexity': [ 'warn', { max: 50 }],\n 'default-case': 'off',\n 'exports-last': 'off',\n 'explicit-function-return-type': 'off',\n 'explicit-module-boundary-types': 'off',\n 'func-style': 'off',\n 'group-exports': 'off',\n 'id-length': 'off',\n 'init-declarations': 'off',\n 'max-dependencies': 'off',\n 'max-depth': [ 'warn', 7 ],\n 'max-lines': [\n 'warn',\n {\n max: 500,\n skipBlankLines: true,\n skipComments: true\n }\n ],\n 'max-lines-per-function': [\n 'warn',\n {\n max: 300,\n skipBlankLines: true,\n skipComments: true\n }\n ],\n 'max-params': 'off',\n 'max-statements': [ 'warn', { max: 50 }],\n 'no-array-for-each': 'off',\n 'no-array-method-this-argument': 'off',\n 'no-array-reduce': 'off',\n 'no-array-sort': 'off',\n 'no-async-await': 'off',\n 'no-await-expression-member': 'off',\n 'no-await-in-loop': 'off',\n 'no-bitwise': 'off',\n 'new-cap': 'off',\n 'no-console': 'off',\n 'no-continue': 'off',\n 'no-default-export': 'off',\n 'no-extraneous-class': 'off',\n 'no-inline-comments': 'off',\n 'no-magic-numbers': 'off',\n 'no-map-spread': 'off',\n 'no-named-export': 'off',\n 'no-namespace': 'off',\n 'no-nested-ternary': 'off',\n 'no-null': 'off',\n 'no-negated-condition': 'off',\n 'no-optional-chaining': 'off',\n 'no-plusplus': 'off',\n 'no-relative-parent-imports': 'off',\n 'no-rest-spread-properties': 'off',\n 'no-shadow': 'warn',\n 'no-ternary': 'off',\n 'no-undefined': 'off',\n 'no-unassigned-import': 'off',\n 'no-use-before-define': [ 'warn', { functions: false }],\n 'no-warning-comments': 'off',\n 'one-var': 'off',\n 'prefer-default-export': 'off',\n 'prefer-destructuring': 'off',\n 'require-await': 'off',\n 'sort-imports': 'off',\n 'sort-keys': 'off',\n\n 'typescript/consistent-type-imports': [\n 'warn',\n {\n disallowTypeAnnotations: false,\n fixStyle: 'inline-type-imports'\n }\n ],\n 'typescript/no-import-type-side-effects': 'error',\n 'typescript/parameter-properties': [ 'warn', { prefer: 'parameter-property' }],\n 'typescript/prefer-readonly-parameter-types': 'off',\n 'typescript/require-await': 'warn',\n 'typescript/non-nullable-type-assertion-style': 'warn',\n 'typescript/explicit-member-accessibility': 'off',\n 'typescript/method-signature-style': 'off',\n 'typescript/return-await': [ 'warn', 'always' ],\n 'typescript/no-confusing-void-expression': [ 'warn', { ignoreArrowShorthand: true }],\n\n 'import/no-unassigned-import': 'warn',\n 'import/consistent-type-specifier-style': 'off',\n 'import/no-anonymous-default-export': 'off',\n 'import/no-cycle': 'off',\n 'import/no-nodejs-modules': 'off',\n 'import/unambiguous': 'off',\n\n 'node/no-top-level-await': 'off',\n 'node/no-sync': [\n 'warn', {\n ignores: [ 'execSync' ]\n }\n ],\n\n 'react/react-in-jsx-scope': 'off',\n 'react/jsx-filename-extension': [ 'error', { extensions: [ 'jsx', 'tsx' ] }],\n\n // TODO enable jest rules for vitest\n 'jest/require-hook': 'off',\n 'jest/no-conditional-in-test': 'off',\n 'jest/prefer-expect-assertions': 'off',\n\n 'vitest/prefer-called-times': 'off',\n 'vitest/prefer-strict-boolean-matchers': 'off',\n 'vitest/prefer-expect-assertions': [\n 'warn', {\n onlyFunctionsWithExpectInCallback: true,\n onlyFunctionsWithExpectInLoop: true\n }\n ],\n 'vitest/require-test-timeout': 'off',\n 'vitest/no-importing-vitest-globals': 'off',\n 'vitest/no-conditional-in-test': 'off',\n 'vitest/no-hooks': 'off',\n\n 'jsdoc/require-param-type': 'off',\n 'jsdoc/require-returns': 'off',\n 'jsdoc/require-param': 'off',\n\n 'unicorn/no-nested-ternary': 'off',\n 'unicorn/switch-case-braces': [ 'warn', 'avoid' ],\n 'unicorn/no-array-method-this-argument': 'warn',\n 'unicorn/no-await-expression-member': 'warn',\n 'unicorn/no-invalid-fetch-options': 'off',\n 'unicorn/import-style': [\n 'warn', {\n extendDefaultStyles: false,\n styles: {\n 'path': { named: true, default: false },\n 'util': { named: true, default: false }\n }\n }\n ],\n 'unicorn/max-nested-calls': [\n 'warn', {\n max: 5\n }\n ],\n\n // custom rules\n 'comment-labs-js/no-self-assign': 'error',\n\n // js plugin rules\n 'brettz9-js/arrow-parens': 'off',\n 'brettz9-js/block-scoped-var': 'off',\n 'brettz9-js/no-instanceof-wrapper': 'error',\n 'brettz9-js/no-literal-call': 'error',\n 'brettz9-js/no-this-in-static': 'error',\n 'brettz9-js/no-use-ignored-vars': 'warn',\n 'brettz9-js/no-useless-rest-spread': 'warn',\n 'brettz9-js/prefer-for-of': 'off',\n\n 'import-zod-js/prefer-zod-namespace': 'warn',\n\n 'security-js/detect-unsafe-regex': 'error',\n 'security-js/detect-non-literal-regexp': 'error',\n 'security-js/detect-non-literal-require': 'off',\n 'security-js/detect-non-literal-fs-filename': 'off',\n 'security-js/detect-eval-with-expression': 'error',\n 'security-js/detect-pseudoRandomBytes': 'error',\n 'security-js/detect-possible-timing-attacks': 'error',\n 'security-js/detect-no-csrf-before-method-override': 'error',\n 'security-js/detect-buffer-noassert': 'error',\n 'security-js/detect-child-process': 'error',\n 'security-js/detect-disable-mustache-escape': 'error',\n 'security-js/detect-object-injection': 'off',\n 'security-js/detect-new-buffer': 'error',\n 'security-js/detect-bidi-characters': 'error',\n\n 'unicorn-js/better-regex': 'warn',\n 'unicorn-js/consistent-destructuring': 'warn',\n 'unicorn-js/consistent-template-literal-escape': 'warn',\n 'unicorn-js/no-for-loop': 'warn',\n 'unicorn-js/no-useless-iterator-to-array': 'warn',\n 'unicorn-js/prefer-export-from': 'warn',\n 'unicorn-js/prefer-simple-condition-first': 'warn',\n 'unicorn-js/prefer-switch': 'warn',\n 'unicorn-js/switch-case-break-position': 'warn',\n 'unicorn-js/prefer-single-call': 'warn',\n\n 'jsdoc-js/check-alignment': 'warn',\n 'jsdoc-js/check-indentation': 'warn',\n 'jsdoc-js/check-line-alignment': 'warn',\n 'jsdoc-js/check-param-names': 'warn',\n 'jsdoc-js/check-types': 'warn',\n 'jsdoc-js/check-values': 'warn',\n 'jsdoc-js/multiline-blocks': 'warn',\n 'jsdoc-js/no-multi-asterisks': 'warn',\n 'jsdoc-js/no-undefined-types': 'warn',\n 'jsdoc-js/require-returns-check': 'warn',\n 'jsdoc-js/require-yields-check': 'warn',\n 'jsdoc-js/tag-lines': 'warn',\n 'jsdoc-js/valid-types': 'warn',\n\n 'e18e-js/prefer-array-at': 'error',\n 'e18e-js/prefer-array-fill': 'error',\n 'e18e-js/prefer-includes': 'error',\n 'e18e-js/prefer-array-to-reversed': 'error',\n 'e18e-js/prefer-array-to-sorted': 'error',\n 'e18e-js/prefer-array-to-spliced': 'error',\n 'e18e-js/prefer-nullish-coalescing': 'error',\n 'e18e-js/prefer-object-has-own': 'error',\n 'e18e-js/prefer-spread-syntax': 'error',\n 'e18e-js/prefer-url-canparse': 'error',\n 'e18e-js/ban-dependencies': 'error',\n 'e18e-js/prefer-array-from-map': 'error',\n 'e18e-js/prefer-timer-args': 'error',\n 'e18e-js/prefer-date-now': 'error',\n 'e18e-js/prefer-regex-test': 'error',\n 'e18e-js/prefer-array-some': 'error',\n 'e18e-js/prefer-static-regex': 'error',\n\n 'no-control-regex': 'error',\n 'no-misleading-character-class': 'error',\n 'no-regex-spaces': 'error',\n // TODO add when supported\n // 'prefer-regex-literals': 'error',\n 'no-invalid-regexp': 'off',\n 'no-useless-backreference': 'off',\n 'no-empty-character-class': 'off',\n\n 'regexp-js/confusing-quantifier': 'warn',\n 'regexp-js/control-character-escape': 'error',\n 'regexp-js/match-any': 'error',\n 'regexp-js/negation': 'error',\n 'regexp-js/no-contradiction-with-assertion': 'error',\n 'regexp-js/no-dupe-characters-character-class': 'error',\n 'regexp-js/no-dupe-disjunctions': 'error',\n 'regexp-js/no-empty-alternative': 'warn',\n 'regexp-js/no-empty-capturing-group': 'error',\n 'regexp-js/no-empty-character-class': 'error',\n 'regexp-js/no-empty-group': 'error',\n 'regexp-js/no-empty-lookarounds-assertion': 'error',\n 'regexp-js/no-empty-string-literal': 'error',\n 'regexp-js/no-escape-backspace': 'error',\n 'regexp-js/no-extra-lookaround-assertions': 'error',\n 'regexp-js/no-invalid-regexp': 'error',\n 'regexp-js/no-invisible-character': 'error',\n 'regexp-js/no-lazy-ends': 'warn',\n 'regexp-js/no-legacy-features': 'error',\n 'regexp-js/no-misleading-capturing-group': 'error',\n 'regexp-js/no-misleading-unicode-character': 'error',\n 'regexp-js/no-missing-g-flag': 'error',\n 'regexp-js/no-non-standard-flag': 'error',\n 'regexp-js/no-obscure-range': 'error',\n 'regexp-js/no-optional-assertion': 'error',\n 'regexp-js/no-potentially-useless-backreference': 'warn',\n 'regexp-js/no-super-linear-backtracking': 'error',\n 'regexp-js/no-trivially-nested-assertion': 'error',\n 'regexp-js/no-trivially-nested-quantifier': 'error',\n 'regexp-js/no-unused-capturing-group': 'error',\n 'regexp-js/no-useless-assertions': 'error',\n 'regexp-js/no-useless-backreference': 'error',\n 'regexp-js/no-useless-character-class': 'error',\n 'regexp-js/no-useless-dollar-replacements': 'error',\n 'regexp-js/no-useless-escape': 'error',\n 'regexp-js/no-useless-flag': 'warn',\n 'regexp-js/no-useless-lazy': 'error',\n 'regexp-js/no-useless-non-capturing-group': 'error',\n 'regexp-js/no-useless-quantifier': 'error',\n 'regexp-js/no-useless-range': 'error',\n 'regexp-js/no-useless-set-operand': 'error',\n 'regexp-js/no-useless-string-literal': 'error',\n 'regexp-js/no-useless-two-nums-quantifier': 'error',\n 'regexp-js/no-zero-quantifier': 'error',\n 'regexp-js/optimal-lookaround-quantifier': 'warn',\n 'regexp-js/optimal-quantifier-concatenation': 'error',\n 'regexp-js/prefer-character-class': 'error',\n 'regexp-js/prefer-d': 'error',\n 'regexp-js/prefer-plus-quantifier': 'error',\n 'regexp-js/prefer-predefined-assertion': 'error',\n 'regexp-js/prefer-question-quantifier': 'error',\n 'regexp-js/prefer-range': 'error',\n 'regexp-js/prefer-set-operation': 'error',\n 'regexp-js/prefer-star-quantifier': 'error',\n 'regexp-js/prefer-unicode-codepoint-escapes': 'error',\n 'regexp-js/prefer-w': 'error',\n 'regexp-js/simplify-set-operations': 'error',\n 'regexp-js/sort-flags': 'error',\n 'regexp-js/strict': 'error',\n 'regexp-js/use-ignore-case': 'error'\n}\n","import type { DummyRuleMap } from 'oxlint'\n\n\nexport const stylisticRules: DummyRuleMap = {\n 'stylistic-js/type-generic-spacing': 'warn',\n 'stylistic-js/type-named-tuple-spacing': 'warn',\n 'stylistic-js/function-call-spacing': [\n 'warn',\n 'never'\n ],\n 'stylistic-js/semi': [\n 'warn',\n 'never'\n ],\n 'stylistic-js/space-before-blocks': 'warn',\n 'stylistic-js/space-before-function-paren': [\n 'warn',\n {\n 'anonymous': 'never',\n 'asyncArrow': 'always',\n 'named': 'never'\n }\n ],\n 'stylistic-js/space-infix-ops': [ 'warn', { int32Hint: false }],\n 'stylistic-js/semi-spacing': 'warn',\n 'stylistic-js/type-annotation-spacing': [\n 'warn', {\n after: true, before: true,\n overrides: { colon: { after: true, before: false } }\n }\n ],\n 'stylistic-js/member-delimiter-style': [\n 'warn', {\n multiline: { delimiter: 'none', requireLast: true },\n singleline: { delimiter: 'semi', requireLast: false }\n }\n ],\n 'stylistic-js/quotes': [ 'warn', 'single' ],\n 'stylistic-js/rest-spread-spacing': 'warn',\n 'stylistic-js/space-in-parens': [\n 'warn',\n 'never'\n ],\n 'stylistic-js/spaced-comment': [\n 'warn',\n 'always',\n {\n 'line': {\n 'markers': [ '/' ]\n },\n 'block': {\n 'markers': [ '!', '*' ],\n 'balanced': true\n }\n }\n ],\n 'stylistic-js/template-curly-spacing': [\n 'warn',\n 'never'\n ],\n 'stylistic-js/template-tag-spacing': 'warn',\n 'stylistic-js/array-bracket-newline': [\n 'warn',\n {\n 'multiline': true\n }\n ],\n 'stylistic-js/array-bracket-spacing': [\n 'warn',\n 'always',\n {\n 'arraysInArrays': false,\n 'objectsInArrays': false\n }\n ],\n 'stylistic-js/arrow-parens': [\n 'warn',\n 'as-needed'\n ],\n 'stylistic-js/arrow-spacing': 'warn',\n 'stylistic-js/block-spacing': [\n 'warn',\n 'always'\n ],\n 'stylistic-js/brace-style': [\n 'warn',\n '1tbs'\n ],\n 'stylistic-js/comma-dangle': [\n 'warn',\n 'never'\n ],\n 'stylistic-js/comma-spacing': [\n 'warn',\n {\n 'after': true,\n 'before': false\n }\n ],\n 'stylistic-js/comma-style': [\n 'warn',\n 'last'\n ],\n 'stylistic-js/dot-location': [\n 'warn',\n 'property'\n ],\n 'stylistic-js/eol-last': [\n 'warn',\n 'always'\n ],\n 'stylistic-js/function-call-argument-newline': [\n 'warn',\n 'consistent'\n ],\n 'stylistic-js/function-paren-newline': [\n 'warn',\n 'multiline-arguments'\n ],\n 'stylistic-js/indent': [\n 'warn',\n 2,\n {\n 'SwitchCase': 1\n }\n ],\n 'stylistic-js/key-spacing': [\n 'warn',\n {\n 'afterColon': true,\n 'beforeColon': false,\n 'mode': 'strict'\n }\n ],\n 'stylistic-js/keyword-spacing': [\n 'warn',\n {\n 'after': true,\n 'before': true\n }\n ],\n 'stylistic-js/linebreak-style': [\n 'error',\n 'unix'\n ],\n 'stylistic-js/lines-between-class-members': [\n 'warn',\n 'always',\n {\n 'exceptAfterSingleLine': true\n }\n ],\n 'stylistic-js/max-len': [\n 'warn',\n {\n 'code': 120,\n 'comments': 180,\n 'ignoreRegExpLiterals': true,\n 'ignoreStrings': true,\n 'ignoreTemplateLiterals': true,\n 'ignoreTrailingComments': true,\n 'ignoreUrls': true\n }\n ],\n 'stylistic-js/max-statements-per-line': 'warn',\n 'stylistic-js/new-parens': 'warn',\n 'stylistic-js/no-confusing-arrow': 'off',\n 'stylistic-js/no-extra-parens': [\n 'warn',\n 'functions'\n ],\n 'stylistic-js/no-extra-semi': 'warn',\n 'stylistic-js/no-floating-decimal': 'warn',\n 'stylistic-js/no-mixed-operators': [\n 'warn', {\n 'groups': [\n [ '&', '|', '^', '~', '<<', '>>', '>>>' ],\n [ '==', '!=', '===', '!==', '>', '>=', '<', '<=' ],\n [ '&&', '||' ],\n [ 'in', 'instanceof' ]\n ]\n }\n ],\n 'stylistic-js/no-mixed-spaces-and-tabs': 'warn',\n 'stylistic-js/no-multi-spaces': 'warn',\n 'stylistic-js/no-multiple-empty-lines': [\n 'warn',\n {\n 'max': 2,\n 'maxEOF': 0\n }\n ],\n 'stylistic-js/no-tabs': 'warn',\n 'stylistic-js/no-trailing-spaces': 'warn',\n 'stylistic-js/no-whitespace-before-property': 'warn',\n 'stylistic-js/object-curly-newline': [\n 'warn',\n {\n 'ExportDeclaration': {\n 'multiline': true\n },\n 'ImportDeclaration': {\n 'multiline': true\n }\n }\n ],\n 'stylistic-js/object-curly-spacing': [\n 'warn',\n 'always'\n ],\n 'stylistic-js/operator-linebreak': [\n 'warn',\n 'before'\n ],\n 'stylistic-js/padding-line-between-statements': [\n 'warn',\n { blankLine: 'always', prev: '*', next: 'return' },\n { blankLine: 'always', prev: '*', next: 'function' },\n { blankLine: 'always', prev: '*', next: 'iife' },\n { blankLine: 'always', prev: '*', next: 'class' },\n { blankLine: 'always', prev: '*', next: 'do' },\n { blankLine: 'always', prev: '*', next: 'for' },\n { blankLine: 'always', prev: '*', next: 'throw' },\n { blankLine: 'always', prev: '*', next: 'try' },\n { blankLine: 'always', prev: '*', next: 'while' },\n { blankLine: 'always', prev: '*', next: 'switch' },\n\n { blankLine: 'always', prev: '*', next: 'const' },\n { blankLine: 'any', prev: 'const', next: 'const' },\n { blankLine: 'any', prev: 'let', next: 'const' },\n { blankLine: 'always', prev: '*', next: 'let' },\n { blankLine: 'any', prev: 'let', next: 'let' },\n { blankLine: 'any', prev: 'const', next: 'let' },\n\n { blankLine: 'always', prev: '*', next: 'export' },\n { blankLine: 'any', prev: 'export', next: 'export' },\n { blankLine: 'always', prev: 'block-like', next: '*' },\n { blankLine: 'always', prev: 'multiline-block-like', next: '*' }\n ]\n}\n","import type { OxlintConfig } from 'oxlint'\n\n\nexport const plugins: NonNullable<OxlintConfig['plugins']> = [\n 'eslint',\n 'oxc',\n 'typescript',\n 'unicorn',\n 'import',\n 'jsdoc',\n 'react',\n 'react-perf',\n 'vitest',\n 'jsx-a11y',\n 'promise',\n 'node',\n 'vue'\n]\n","import { access, readFile } from 'node:fs/promises'\nimport { join } from 'node:path'\nimport { cwd } from 'node:process'\nimport { up } from 'empathic/find'\n\n\nexport async function enableMode(configFiles: string[], dependencies?: string[]): Promise<boolean> {\n\n const hasConfigFile = await Promise.all(configFiles.map(async file => await access(join(cwd(), file))\n .then(() => true)\n .catch(() => false)))\n\n if (hasConfigFile.some(Boolean)) {\n return true\n }\n\n const packageJson = up('package.json', { cwd: cwd() })\n if (typeof packageJson === 'string') {\n // oxlint-disable-next-line typescript/no-unsafe-type-assertion\n const json = JSON.parse(await readFile(packageJson, 'utf8')) as { dependencies?: Record<string, string>; devDependencies?: Record<string, string> }\n\n return dependencies?.some(dependency =>\n json.dependencies?.[dependency] !== undefined || json.devDependencies?.[dependency] !== undefined) ?? false\n }\n\n return false\n}\n","import globalsPkg from 'globals'\nimport type { OxlintGlobals } from 'oxlint'\nimport { enableMode } from './utils'\n\n\nconst convertGlobals = (input: Record<string, boolean>): OxlintGlobals => {\n const result: Record<string, 'readonly' | 'writable'> = {}\n\n for (const [ key, value ] of Object.entries(input)) {\n result[key] = value ? 'writable' : 'readonly'\n }\n\n return result\n}\n\nconst base: OxlintGlobals = convertGlobals(globalsPkg['shared-node-browser'])\n\nconst cloudflareSpecificGlobals: OxlintGlobals = {\n Cloudflare: 'readonly',\n URLPattern: 'readonly',\n FixedLengthStream: 'readonly',\n IdentityTransformStream: 'readonly',\n HTMLRewriter: 'readonly',\n WebSocketPair: 'readonly',\n WebSocketRequestResponsePair: 'readonly',\n scheduler: 'readonly',\n caches: 'readonly'\n}\n\nconst cloudflare: OxlintGlobals = {\n ...base,\n ...cloudflareSpecificGlobals\n}\n\nconst { Cloudflare: _, ...cloudflareWithoutCF } = cloudflare\nconst astro: OxlintGlobals = {\n ...cloudflareWithoutCF,\n Astro: 'readonly'\n}\n\nasync function getGlobals(): Promise<OxlintGlobals> {\n const isAstro = await enableMode(\n [ 'astro.config.ts', 'astro.config.mjs', 'astro.config.js' ],\n [ 'astro' ]\n )\n\n if (isAstro) {\n return astro\n }\n\n const isCloudflare = await enableMode(\n [ 'wrangler.toml', 'wrangler.json', 'wrangler.jsonc' ],\n [ '@cloudflare/workers-types', 'wrangler' ]\n )\n\n if (isCloudflare) {\n return cloudflare\n }\n\n return base\n}\n\nexport const globals = await getGlobals()\n","export const jsPlugins = [\n { name: 'comment-labs-js', specifier: '@comment-labs/oxlint-config/plugins/labs' },\n { name: 'brettz9-js', specifier: '@comment-labs/oxlint-config/plugins/brettz9' },\n { name: 'i18next-js', specifier: '@comment-labs/oxlint-config/plugins/i18next' },\n { name: 'import-zod-js', specifier: '@comment-labs/oxlint-config/plugins/import-zod' },\n { name: 'playwright-js', specifier: '@comment-labs/oxlint-config/plugins/playwright' },\n { name: 'react-hooks-js', specifier: '@comment-labs/oxlint-config/plugins/react-hooks' },\n { name: 'react-native-js', specifier: '@comment-labs/oxlint-config/plugins/react-native' },\n { name: 'react-refresh-js', specifier: '@comment-labs/oxlint-config/plugins/react-refresh' },\n { name: 'security-js', specifier: '@comment-labs/oxlint-config/plugins/security' },\n { name: 'unicorn-js', specifier: '@comment-labs/oxlint-config/plugins/unicorn' },\n { name: 'stylistic-js', specifier: '@comment-labs/oxlint-config/plugins/stylistic' },\n { name: 'jsdoc-js', specifier: '@comment-labs/oxlint-config/plugins/jsdoc' },\n { name: 'e18e-js', specifier: '@comment-labs/oxlint-config/plugins/e18e' },\n { name: 'regexp-js', specifier: '@comment-labs/oxlint-config/plugins/regexp' }\n]\n","import { enableMode } from '#/utils'\nimport type { OxlintOverride } from 'oxlint'\n\n\nconst i18next = await enableMode([], [ 'i18next' ])\n\nexport const i18nextOverrides: OxlintOverride = {\n files: [ i18next ? '**/*' : '___disabled' ],\n rules: {\n 'i18next-js/no-literal-string': 'warn'\n }\n}\n","import type { OxlintOverride } from 'oxlint'\n\n\nexport const playwrightOverrides: OxlintOverride = {\n files: [ '**/e2e/**/*' ],\n rules: {\n 'playwright-js/consistent-spacing-between-blocks': 'warn',\n 'playwright-js/expect-expect': 'warn',\n 'playwright-js/max-nested-describe': 'warn',\n 'playwright-js/missing-playwright-await': 'error',\n 'playwright-js/no-conditional-expect': 'warn',\n 'playwright-js/no-conditional-in-test': 'warn',\n 'playwright-js/no-duplicate-hooks': 'warn',\n 'playwright-js/no-duplicate-slow': 'warn',\n 'playwright-js/no-element-handle': 'warn',\n 'playwright-js/no-eval': 'warn',\n 'playwright-js/no-focused-test': 'error',\n 'playwright-js/no-force-option': 'warn',\n 'playwright-js/no-nested-step': 'warn',\n 'playwright-js/no-networkidle': 'error',\n 'playwright-js/no-page-pause': 'warn',\n 'playwright-js/no-skipped-test': 'warn',\n 'playwright-js/no-standalone-expect': 'error',\n 'playwright-js/no-unsafe-references': 'error',\n 'playwright-js/no-unused-locators': 'error',\n 'playwright-js/no-useless-await': 'warn',\n 'playwright-js/no-useless-not': 'warn',\n 'playwright-js/no-wait-for-navigation': 'error',\n 'playwright-js/no-wait-for-selector': 'warn',\n 'playwright-js/no-wait-for-timeout': 'warn',\n 'playwright-js/prefer-hooks-in-order': 'warn',\n 'playwright-js/prefer-hooks-on-top': 'warn',\n 'playwright-js/prefer-locator': 'warn',\n 'playwright-js/prefer-to-have-count': 'warn',\n 'playwright-js/prefer-to-have-length': 'warn',\n 'playwright-js/prefer-web-first-assertions': 'error',\n 'playwright-js/valid-describe-callback': 'error',\n 'playwright-js/valid-expect': 'error',\n 'playwright-js/valid-expect-in-promise': 'error',\n 'playwright-js/valid-test-tags': 'error',\n 'playwright-js/valid-title': 'error'\n }\n}\n","import type { OxlintOverride } from 'oxlint'\n\n\nexport const reactOverrides: OxlintOverride = {\n files: [ '**/*.?(c|m)@(j|t)sx' ],\n rules: {\n 'react-hooks-js/exhaustive-deps': 'error',\n 'react-hooks-js/rules-of-hooks': 'warn',\n\n 'react-refresh-js/only-export-components': 'warn'\n }\n}\n","import { enableMode } from '#/utils'\nimport type { OxlintOverride } from 'oxlint'\n\n\nconst reactNative = await enableMode([], [ 'react-native' ])\n\nexport const reactNativeOverrides: OxlintOverride = {\n files: [ reactNative ? '**/*.?(m)@(j|t)sx' : '___disabled' ],\n rules: {\n 'react-native-js/no-color-literals': 'warn',\n 'react-native-js/no-inline-styles': 'warn',\n 'react-native-js/no-raw-text': 'off',\n 'react-native-js/no-single-element-style-arrays': 'warn',\n 'react-native-js/no-unused-styles': 'warn',\n 'react-native-js/sort-styles': 'off',\n 'react-native-js/split-platform-components': 'error'\n }\n}\n","import type { OxlintOverride } from 'oxlint'\n\n\nexport const scriptsOverrides: OxlintOverride = {\n files: [ 'scripts/**/*.?(m)@(j|t)s' ],\n rules: {\n 'unicorn/no-process-exit': 'warn'\n }\n}\n","import type { OxlintOverride } from 'oxlint'\n\n\nexport const declarationsOverrides: OxlintOverride = {\n files: [ '**/*.d.ts' ],\n rules: {\n 'typescript/no-empty-interface': 'off',\n 'typescript/no-empty-object-type': 'off'\n }\n}\n","import type { OxlintOverride } from 'oxlint'\n\n\nexport const ambientOverrides: OxlintOverride = {\n files: [ '**/src/env.d.ts', '**/src/environment.d.ts' ],\n rules: {\n 'no-redeclare': 'off'\n }\n}\n","import type { OxlintConfig } from 'oxlint'\nimport { categories } from './categories'\nimport { baseRules } from './base-rules'\nimport { stylisticRules } from './stylistic-rules'\nimport { plugins } from './plugins'\nimport { globals } from './globals'\nimport { jsPlugins } from './js-plugins'\nimport { i18nextOverrides } from './overrides/i18next'\nimport { playwrightOverrides } from './overrides/playwright'\nimport { reactOverrides } from './overrides/react'\nimport { reactNativeOverrides } from './overrides/react-native'\nimport { scriptsOverrides } from './overrides/scripts'\nimport { declarationsOverrides } from './overrides/declarations'\nimport { ambientOverrides } from './overrides/ambient'\n\n\nexport const config: OxlintConfig = {\n options: {\n reportUnusedDisableDirectives: 'warn',\n typeAware: true,\n typeCheck: true\n },\n plugins,\n jsPlugins,\n rules: {\n ...baseRules,\n ...stylisticRules\n },\n globals,\n categories,\n settings: {\n vitest: {\n typecheck: true\n }\n },\n overrides: [\n declarationsOverrides,\n ambientOverrides,\n i18nextOverrides,\n playwrightOverrides,\n reactOverrides,\n reactNativeOverrides,\n scriptsOverrides\n ],\n ignorePatterns: [ 'coverage/**', 'public/**', '.expo/**', '.output/**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E,KAAK,GAAI;IACtB,YAAY;GACd;EACF;CACF;CACA,uCAAuC,CACrC,QACA,OACF;CACA,qCAAqC;CACrC,sCAAsC,CACpC,QACA,EACE,aAAa,KACf,CACF;CACA,sCAAsC;EACpC;EACA;EACA;GACE,kBAAkB;GAClB,mBAAmB;EACrB;CACF;CACA,6BAA6B,CAC3B,QACA,WACF;CACA,8BAA8B;CAC9B,8BAA8B,CAC5B,QACA,QACF;CACA,4BAA4B,CAC1B,QACA,MACF;CACA,6BAA6B,CAC3B,QACA,OACF;CACA,8BAA8B,CAC5B,QACA;EACE,SAAS;EACT,UAAU;CACZ,CACF;CACA,4BAA4B,CAC1B,QACA,MACF;CACA,6BAA6B,CAC3B,QACA,UACF;CACA,yBAAyB,CACvB,QACA,QACF;CACA,+CAA+C,CAC7C,QACA,YACF;CACA,uCAAuC,CACrC,QACA,qBACF;CACA,uBAAuB;EACrB;EACA;EACA,EACE,cAAc,EAChB;CACF;CACA,4BAA4B,CAC1B,QACA;EACE,cAAc;EACd,eAAe;EACf,QAAQ;CACV,CACF;CACA,gCAAgC,CAC9B,QACA;EACE,SAAS;EACT,UAAU;CACZ,CACF;CACA,gCAAgC,CAC9B,SACA,MACF;CACA,4CAA4C;EAC1C;EACA;EACA,EACE,yBAAyB,KAC3B;CACF;CACA,wBAAwB,CACtB,QACA;EACE,QAAQ;EACR,YAAY;EACZ,wBAAwB;EACxB,iBAAiB;EACjB,0BAA0B;EAC1B,0BAA0B;EAC1B,cAAc;CAChB,CACF;CACA,wCAAwC;CACxC,2BAA2B;CAC3B,mCAAmC;CACnC,gCAAgC,CAC9B,QACA,WACF;CACA,8BAA8B;CAC9B,oCAAoC;CACpC,mCAAmC,CACjC,QAAQ,EACN,UAAU;EACR;GAAE;GAAK;GAAK;GAAK;GAAK;GAAM;GAAM;EAAM;EACxC;GAAE;GAAM;GAAM;GAAO;GAAO;GAAK;GAAM;GAAK;EAAK;EACjD,CAAE,MAAM,IAAK;EACb,CAAE,MAAM,YAAa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oCAAoC;EACpC,kCAAkC;EAClC,gCAAgC;EAChC,wCAAwC;EACxC,sCAAsC;EACtC,qCAAqC;EACrC,uCAAuC;EACvC,qCAAqC;EACrC,gCAAgC;EAChC,sCAAsC;EACtC,uCAAuC;EACvC,6CAA6C;EAC7C,yCAAyC;EACzC,8BAA8B;EAC9B,yCAAyC;EACzC,iCAAiC;EACjC,6BAA6B;CAC/B;AACF;;;ACvCA,MAAa,iBAAiC;CAC5C,OAAO,CAAE,qBAAsB;CAC/B,OAAO;EACL,kCAAkC;EAClC,iCAAiC;EAEjC,2CAA2C;CAC7C;AACF;ACLA,MAAa,uBAAuC;CAClD,OAAO,CAAE,MAHe,WAAW,CAAC,GAAG,CAAE,cAAe,CAAC,IAGlC,sBAAsB,aAAc;CAC3D,OAAO;EACL,qCAAqC;EACrC,oCAAoC;EACpC,+BAA+B;EAC/B,kDAAkD;EAClD,oCAAoC;EACpC,+BAA+B;EAC/B,6CAA6C;CAC/C;AACF;;;ACdA,MAAa,mBAAmC;CAC9C,OAAO,CAAE,0BAA2B;CACpC,OAAO,EACL,2BAA2B,OAC7B;AACF;;;ACLA,MAAa,wBAAwC;CACnD,OAAO,CAAE,WAAY;CACrB,OAAO;EACL,iCAAiC;EACjC,mCAAmC;CACrC;AACF;;;ACNA,MAAa,mBAAmC;CAC9C,OAAO,CAAE,mBAAmB,yBAA0B;CACtD,OAAO,EACL,gBAAgB,MAClB;AACF;;;ACQA,MAAa,SAAuB;CAClC,SAAS;EACP,+BAA+B;EAC/B,WAAW;EACX,WAAW;CACb;CACA;CACA;CACA,OAAO;EACL,GAAG;EACH,GAAG;CACL;CACA;CACA;CACA,UAAU,EACR,QAAQ,EACN,WAAW,KACb,EACF;CACA,WAAW;EACT;EACA;EACA;EACA;EACA;EACA;EACA;CACF;CACA,gBAAgB;EAAE;EAAe;EAAa;EAAY;EAAc;EAAc;CAAsB;AAC9G"}
1
+ {"version":3,"file":"index.mjs","names":[],"sources":["../src/categories.ts","../src/base-rules.ts","../src/stylistic-rules.ts","../src/plugins.ts","../src/utils.ts","../src/globals.ts","../src/js-plugins.ts","../src/overrides/i18next.ts","../src/overrides/playwright.ts","../src/overrides/react.ts","../src/overrides/react-native.ts","../src/overrides/scripts.ts","../src/overrides/declarations.ts","../src/overrides/ambient.ts","../src/overrides/vitest.ts","../src/index.ts"],"sourcesContent":["import type { RuleCategories } from 'oxlint'\n\n\nexport const categories: RuleCategories = {\n correctness: 'error',\n nursery: 'warn',\n pedantic: 'warn',\n perf: 'warn',\n restriction: 'warn',\n style: 'warn',\n suspicious: 'error'\n}\n","import type { DummyRuleMap } from 'oxlint'\n\n\nexport const baseRules: DummyRuleMap = {\n 'array-type': 'off',\n 'capitalized-comments': 'off',\n 'class-methods-use-this': 'off',\n 'consistent-indexed-object-style': 'off',\n 'consistent-type-definitions': 'off',\n 'complexity': [ 'warn', { max: 50 }],\n 'default-case': 'off',\n 'exports-last': 'off',\n 'explicit-function-return-type': 'off',\n 'explicit-module-boundary-types': 'off',\n 'func-style': 'off',\n 'group-exports': 'off',\n 'id-length': 'off',\n 'init-declarations': 'off',\n 'max-dependencies': 'off',\n 'max-depth': [ 'warn', 7 ],\n 'max-lines': [\n 'warn',\n {\n max: 500,\n skipBlankLines: true,\n skipComments: true\n }\n ],\n 'max-lines-per-function': [\n 'warn',\n {\n max: 300,\n skipBlankLines: true,\n skipComments: true\n }\n ],\n 'max-params': 'off',\n 'max-statements': [ 'warn', { max: 50 }],\n 'no-array-for-each': 'off',\n 'no-array-method-this-argument': 'off',\n 'no-array-reduce': 'off',\n 'no-array-sort': 'off',\n 'no-async-await': 'off',\n 'no-await-expression-member': 'off',\n 'no-await-in-loop': 'off',\n 'no-bitwise': 'off',\n 'new-cap': 'off',\n 'no-console': 'off',\n 'no-continue': 'off',\n 'no-default-export': 'off',\n 'no-extraneous-class': 'off',\n 'no-inline-comments': 'off',\n 'no-magic-numbers': 'off',\n 'no-map-spread': 'off',\n 'no-named-export': 'off',\n 'no-namespace': 'off',\n 'no-nested-ternary': 'off',\n 'no-null': 'off',\n 'no-negated-condition': 'off',\n 'no-optional-chaining': 'off',\n 'no-plusplus': 'off',\n 'no-relative-parent-imports': 'off',\n 'no-rest-spread-properties': 'off',\n 'no-shadow': 'warn',\n 'no-ternary': 'off',\n 'no-undefined': 'off',\n 'no-unassigned-import': 'off',\n 'no-use-before-define': [ 'warn', { functions: false }],\n 'no-warning-comments': 'off',\n 'one-var': 'off',\n 'prefer-default-export': 'off',\n 'prefer-destructuring': 'off',\n 'require-await': 'off',\n 'sort-imports': 'off',\n 'sort-keys': 'off',\n\n 'typescript/consistent-type-imports': [\n 'warn',\n {\n disallowTypeAnnotations: false,\n fixStyle: 'inline-type-imports'\n }\n ],\n 'typescript/no-import-type-side-effects': 'error',\n 'typescript/parameter-properties': [ 'warn', { prefer: 'parameter-property' }],\n 'typescript/prefer-readonly-parameter-types': 'off',\n 'typescript/require-await': 'warn',\n 'typescript/non-nullable-type-assertion-style': 'warn',\n 'typescript/explicit-member-accessibility': 'off',\n 'typescript/method-signature-style': 'off',\n 'typescript/return-await': [ 'warn', 'always' ],\n 'typescript/no-confusing-void-expression': [ 'warn', { ignoreArrowShorthand: true }],\n\n 'import/no-unassigned-import': 'warn',\n 'import/consistent-type-specifier-style': 'off',\n 'import/no-anonymous-default-export': 'off',\n 'import/no-cycle': 'off',\n 'import/no-nodejs-modules': 'off',\n 'import/unambiguous': 'off',\n\n 'node/no-top-level-await': 'off',\n 'node/no-sync': 'off',\n\n 'react/react-in-jsx-scope': 'off',\n 'react/jsx-filename-extension': [ 'error', { extensions: [ 'jsx', 'tsx' ] }],\n\n // TODO enable jest rules for vitest\n 'jest/require-hook': 'off',\n 'jest/no-conditional-in-test': 'off',\n 'jest/prefer-expect-assertions': 'off',\n\n 'vitest/prefer-called-times': 'off',\n 'vitest/prefer-expect-assertions': 'off',\n 'vitest/prefer-strict-boolean-matchers': 'off',\n 'vitest/require-hook': 'off',\n 'vitest/require-test-timeout': 'off',\n 'vitest/no-importing-vitest-globals': 'off',\n 'vitest/no-conditional-in-test': 'off',\n 'vitest/no-hooks': 'off',\n\n 'jsdoc/require-param-type': 'off',\n 'jsdoc/require-returns': 'off',\n 'jsdoc/require-param': 'off',\n\n 'unicorn/no-nested-ternary': 'off',\n 'unicorn/switch-case-braces': [ 'warn', 'avoid' ],\n 'unicorn/no-array-method-this-argument': 'warn',\n 'unicorn/no-await-expression-member': 'warn',\n 'unicorn/no-invalid-fetch-options': 'off',\n 'unicorn/import-style': [\n 'warn', {\n extendDefaultStyles: false,\n styles: {\n 'path': { named: true, default: false },\n 'util': { named: true, default: false }\n }\n }\n ],\n 'unicorn/max-nested-calls': [\n 'warn', {\n max: 5\n }\n ],\n\n // custom rules\n 'comment-labs-js/no-self-assign': 'error',\n\n // js plugin rules\n 'brettz9-js/arrow-parens': 'off',\n 'brettz9-js/block-scoped-var': 'off',\n 'brettz9-js/no-instanceof-wrapper': 'error',\n 'brettz9-js/no-literal-call': 'error',\n 'brettz9-js/no-this-in-static': 'error',\n 'brettz9-js/no-use-ignored-vars': 'warn',\n 'brettz9-js/no-useless-rest-spread': 'warn',\n 'brettz9-js/prefer-for-of': 'off',\n\n 'import-zod-js/prefer-zod-namespace': 'warn',\n\n 'security-js/detect-unsafe-regex': 'error',\n 'security-js/detect-non-literal-regexp': 'error',\n 'security-js/detect-non-literal-require': 'off',\n 'security-js/detect-non-literal-fs-filename': 'off',\n 'security-js/detect-eval-with-expression': 'error',\n 'security-js/detect-pseudoRandomBytes': 'error',\n 'security-js/detect-possible-timing-attacks': 'error',\n 'security-js/detect-no-csrf-before-method-override': 'error',\n 'security-js/detect-buffer-noassert': 'error',\n 'security-js/detect-child-process': 'error',\n 'security-js/detect-disable-mustache-escape': 'error',\n 'security-js/detect-object-injection': 'off',\n 'security-js/detect-new-buffer': 'error',\n 'security-js/detect-bidi-characters': 'error',\n\n 'unicorn-js/class-reference-in-static-methods': 'warn',\n 'unicorn-js/consistent-conditional-object-spread': 'warn',\n 'unicorn-js/consistent-destructuring': 'warn',\n 'unicorn-js/consistent-json-file-read': 'warn',\n 'unicorn-js/consistent-template-literal-escape': 'warn',\n 'unicorn-js/consistent-tuple-labels': 'warn',\n 'unicorn-js/default-export-style': 'warn',\n 'unicorn-js/no-array-concat-in-loop': 'warn',\n 'unicorn-js/no-array-splice': 'warn',\n 'unicorn-js/no-computed-property-existence-check': 'warn',\n 'unicorn-js/no-confusing-array-splice': 'warn',\n 'unicorn-js/no-duplicate-if-branches': 'warn',\n 'unicorn-js/no-duplicate-loops': 'warn',\n 'unicorn-js/no-duplicate-set-values': 'warn',\n 'unicorn-js/no-for-loop': 'warn',\n 'unicorn-js/no-incorrect-query-selector': 'warn',\n 'unicorn-js/no-incorrect-template-string-interpolation': 'warn',\n 'unicorn-js/no-late-current-target-access': 'warn',\n 'unicorn-js/no-late-event-control': 'warn',\n 'unicorn-js/no-loop-iterable-mutation': 'warn',\n 'unicorn-js/no-mismatched-map-key': 'warn',\n 'unicorn-js/no-non-function-verb-prefix': 'warn',\n 'unicorn-js/no-object-methods-with-collections': 'warn',\n 'unicorn-js/no-optional-chaining-on-undeclared-variable': 'warn',\n 'unicorn-js/no-return-array-push': 'warn',\n 'unicorn-js/no-selector-as-dom-name': 'warn',\n 'unicorn-js/no-this-outside-of-class': 'warn',\n 'unicorn-js/no-top-level-assignment-in-function': 'warn',\n 'unicorn-js/no-uncalled-method': 'warn',\n 'unicorn-js/no-undeclared-class-members': 'warn',\n 'unicorn-js/no-unnecessary-array-flat-map': 'warn',\n 'unicorn-js/no-unnecessary-boolean-comparison': 'warn',\n 'unicorn-js/no-unnecessary-splice': 'warn',\n 'unicorn-js/no-unsafe-property-key': 'warn',\n 'unicorn-js/no-useless-else': 'warn',\n 'unicorn-js/no-useless-iterator-to-array': 'warn',\n 'unicorn-js/prefer-abort-signal-any': 'warn',\n 'unicorn-js/prefer-abort-signal-timeout': 'warn',\n 'unicorn-js/prefer-array-from-async': 'warn',\n 'unicorn-js/prefer-array-iterable-methods': 'warn',\n 'unicorn-js/prefer-array-slice': 'warn',\n 'unicorn-js/prefer-continue': 'warn',\n 'unicorn-js/prefer-dom-node-html-methods': 'warn',\n 'unicorn-js/prefer-else-if': 'warn',\n 'unicorn-js/prefer-export-from': 'warn',\n 'unicorn-js/prefer-get-or-insert-computed': 'warn',\n 'unicorn-js/prefer-group-by': 'warn',\n 'unicorn-js/prefer-hoisting-branch-code': 'warn',\n 'unicorn-js/prefer-includes-over-repeated-comparisons': 'warn',\n 'unicorn-js/prefer-iterator-to-array': 'warn',\n 'unicorn-js/prefer-location-assign': 'warn',\n 'unicorn-js/prefer-number-is-safe-integer': 'warn',\n 'unicorn-js/prefer-object-destructuring-defaults': 'warn',\n 'unicorn-js/prefer-observer-apis': 'warn',\n 'unicorn-js/prefer-private-class-fields': 'warn',\n 'unicorn-js/prefer-promise-try': 'warn',\n 'unicorn-js/prefer-scoped-selector': 'warn',\n 'unicorn-js/prefer-set-methods': 'warn',\n 'unicorn-js/prefer-simple-condition-first': 'warn',\n 'unicorn-js/prefer-single-call': 'warn',\n 'unicorn-js/prefer-single-object-destructuring': 'warn',\n 'unicorn-js/prefer-smaller-scope': 'warn',\n 'unicorn-js/prefer-switch': 'warn',\n 'unicorn-js/prefer-then-catch': 'warn',\n 'unicorn-js/prefer-type-literal-last': 'warn',\n 'unicorn-js/switch-case-break-position': 'warn',\n\n 'jsdoc-js/check-alignment': 'warn',\n 'jsdoc-js/check-indentation': 'warn',\n 'jsdoc-js/check-line-alignment': 'warn',\n 'jsdoc-js/check-param-names': 'warn',\n 'jsdoc-js/check-types': 'warn',\n 'jsdoc-js/check-values': 'warn',\n 'jsdoc-js/multiline-blocks': 'warn',\n 'jsdoc-js/no-multi-asterisks': 'warn',\n 'jsdoc-js/no-undefined-types': 'warn',\n 'jsdoc-js/require-returns-check': 'warn',\n 'jsdoc-js/require-yields-check': 'warn',\n 'jsdoc-js/tag-lines': 'warn',\n 'jsdoc-js/valid-types': 'warn',\n\n 'e18e-js/prefer-array-at': 'error',\n 'e18e-js/prefer-array-fill': 'error',\n 'e18e-js/prefer-includes': 'error',\n 'e18e-js/prefer-array-to-reversed': 'error',\n 'e18e-js/prefer-array-to-sorted': 'error',\n 'e18e-js/prefer-array-to-spliced': 'error',\n 'e18e-js/prefer-nullish-coalescing': 'error',\n 'e18e-js/prefer-object-has-own': 'error',\n 'e18e-js/prefer-spread-syntax': 'error',\n 'e18e-js/prefer-url-canparse': 'error',\n 'e18e-js/ban-dependencies': 'error',\n 'e18e-js/prefer-array-from-map': 'error',\n 'e18e-js/prefer-timer-args': 'error',\n 'e18e-js/prefer-date-now': 'error',\n 'e18e-js/prefer-regex-test': 'error',\n 'e18e-js/prefer-array-some': 'error',\n 'e18e-js/prefer-static-regex': 'error',\n\n 'no-control-regex': 'error',\n 'no-misleading-character-class': 'error',\n 'no-regex-spaces': 'error',\n // TODO add when supported\n // 'prefer-regex-literals': 'error',\n 'no-invalid-regexp': 'off',\n 'no-useless-backreference': 'off',\n 'no-empty-character-class': 'off',\n\n 'regexp-js/confusing-quantifier': 'warn',\n 'regexp-js/control-character-escape': 'error',\n 'regexp-js/match-any': 'error',\n 'regexp-js/negation': 'error',\n 'regexp-js/no-contradiction-with-assertion': 'error',\n 'regexp-js/no-dupe-characters-character-class': 'error',\n 'regexp-js/no-dupe-disjunctions': 'error',\n 'regexp-js/no-empty-alternative': 'warn',\n 'regexp-js/no-empty-capturing-group': 'error',\n 'regexp-js/no-empty-character-class': 'error',\n 'regexp-js/no-empty-group': 'error',\n 'regexp-js/no-empty-lookarounds-assertion': 'error',\n 'regexp-js/no-empty-string-literal': 'error',\n 'regexp-js/no-escape-backspace': 'error',\n 'regexp-js/no-extra-lookaround-assertions': 'error',\n 'regexp-js/no-invalid-regexp': 'error',\n 'regexp-js/no-invisible-character': 'error',\n 'regexp-js/no-lazy-ends': 'warn',\n 'regexp-js/no-legacy-features': 'error',\n 'regexp-js/no-misleading-capturing-group': 'error',\n 'regexp-js/no-misleading-unicode-character': 'error',\n 'regexp-js/no-missing-g-flag': 'error',\n 'regexp-js/no-non-standard-flag': 'error',\n 'regexp-js/no-obscure-range': 'error',\n 'regexp-js/no-optional-assertion': 'error',\n 'regexp-js/no-potentially-useless-backreference': 'warn',\n 'regexp-js/no-super-linear-backtracking': 'error',\n 'regexp-js/no-trivially-nested-assertion': 'error',\n 'regexp-js/no-trivially-nested-quantifier': 'error',\n 'regexp-js/no-unused-capturing-group': 'error',\n 'regexp-js/no-useless-assertions': 'error',\n 'regexp-js/no-useless-backreference': 'error',\n 'regexp-js/no-useless-character-class': 'error',\n 'regexp-js/no-useless-dollar-replacements': 'error',\n 'regexp-js/no-useless-escape': 'error',\n 'regexp-js/no-useless-flag': 'warn',\n 'regexp-js/no-useless-lazy': 'error',\n 'regexp-js/no-useless-non-capturing-group': 'error',\n 'regexp-js/no-useless-quantifier': 'error',\n 'regexp-js/no-useless-range': 'error',\n 'regexp-js/no-useless-set-operand': 'error',\n 'regexp-js/no-useless-string-literal': 'error',\n 'regexp-js/no-useless-two-nums-quantifier': 'error',\n 'regexp-js/no-zero-quantifier': 'error',\n 'regexp-js/optimal-lookaround-quantifier': 'warn',\n 'regexp-js/optimal-quantifier-concatenation': 'error',\n 'regexp-js/prefer-character-class': 'error',\n 'regexp-js/prefer-d': 'error',\n 'regexp-js/prefer-plus-quantifier': 'error',\n 'regexp-js/prefer-predefined-assertion': 'error',\n 'regexp-js/prefer-question-quantifier': 'error',\n 'regexp-js/prefer-range': 'error',\n 'regexp-js/prefer-set-operation': 'error',\n 'regexp-js/prefer-star-quantifier': 'error',\n 'regexp-js/prefer-unicode-codepoint-escapes': 'error',\n 'regexp-js/prefer-w': 'error',\n 'regexp-js/simplify-set-operations': 'error',\n 'regexp-js/sort-flags': 'error',\n 'regexp-js/strict': 'error',\n 'regexp-js/use-ignore-case': 'error'\n}\n","import type { DummyRuleMap } from 'oxlint'\n\n\nexport const stylisticRules: DummyRuleMap = {\n 'stylistic-js/type-generic-spacing': 'warn',\n 'stylistic-js/type-named-tuple-spacing': 'warn',\n 'stylistic-js/function-call-spacing': [\n 'warn',\n 'never'\n ],\n 'stylistic-js/semi': [\n 'warn',\n 'never'\n ],\n 'stylistic-js/space-before-blocks': 'warn',\n 'stylistic-js/space-before-function-paren': [\n 'warn',\n {\n 'anonymous': 'never',\n 'asyncArrow': 'always',\n 'named': 'never'\n }\n ],\n 'stylistic-js/space-infix-ops': [ 'warn', { int32Hint: false }],\n 'stylistic-js/semi-spacing': 'warn',\n 'stylistic-js/type-annotation-spacing': [\n 'warn', {\n after: true, before: true,\n overrides: { colon: { after: true, before: false } }\n }\n ],\n 'stylistic-js/member-delimiter-style': [\n 'warn', {\n multiline: { delimiter: 'none', requireLast: true },\n singleline: { delimiter: 'semi', requireLast: false }\n }\n ],\n 'stylistic-js/quotes': [ 'warn', 'single' ],\n 'stylistic-js/rest-spread-spacing': 'warn',\n 'stylistic-js/space-in-parens': [\n 'warn',\n 'never'\n ],\n 'stylistic-js/spaced-comment': [\n 'warn',\n 'always',\n {\n 'line': {\n 'markers': [ '/' ]\n },\n 'block': {\n 'markers': [ '!', '*' ],\n 'balanced': true\n }\n }\n ],\n 'stylistic-js/template-curly-spacing': [\n 'warn',\n 'never'\n ],\n 'stylistic-js/template-tag-spacing': 'warn',\n 'stylistic-js/array-bracket-newline': [\n 'warn',\n {\n 'multiline': true\n }\n ],\n 'stylistic-js/array-bracket-spacing': [\n 'warn',\n 'always',\n {\n 'arraysInArrays': false,\n 'objectsInArrays': false\n }\n ],\n 'stylistic-js/arrow-parens': [\n 'warn',\n 'as-needed'\n ],\n 'stylistic-js/arrow-spacing': 'warn',\n 'stylistic-js/block-spacing': [\n 'warn',\n 'always'\n ],\n 'stylistic-js/brace-style': [\n 'warn',\n '1tbs'\n ],\n 'stylistic-js/comma-dangle': [\n 'warn',\n 'never'\n ],\n 'stylistic-js/comma-spacing': [\n 'warn',\n {\n 'after': true,\n 'before': false\n }\n ],\n 'stylistic-js/comma-style': [\n 'warn',\n 'last'\n ],\n 'stylistic-js/dot-location': [\n 'warn',\n 'property'\n ],\n 'stylistic-js/eol-last': [\n 'warn',\n 'always'\n ],\n 'stylistic-js/function-call-argument-newline': [\n 'warn',\n 'consistent'\n ],\n 'stylistic-js/function-paren-newline': [\n 'warn',\n 'multiline-arguments'\n ],\n 'stylistic-js/indent': [\n 'warn',\n 2,\n {\n 'SwitchCase': 1\n }\n ],\n 'stylistic-js/key-spacing': [\n 'warn',\n {\n 'afterColon': true,\n 'beforeColon': false,\n 'mode': 'strict'\n }\n ],\n 'stylistic-js/keyword-spacing': [\n 'warn',\n {\n 'after': true,\n 'before': true\n }\n ],\n 'stylistic-js/linebreak-style': [\n 'error',\n 'unix'\n ],\n 'stylistic-js/lines-between-class-members': [\n 'warn',\n 'always',\n {\n 'exceptAfterSingleLine': true\n }\n ],\n 'stylistic-js/max-len': [\n 'warn',\n {\n 'code': 120,\n 'comments': 180,\n 'ignoreRegExpLiterals': true,\n 'ignoreStrings': true,\n 'ignoreTemplateLiterals': true,\n 'ignoreTrailingComments': true,\n 'ignoreUrls': true\n }\n ],\n 'stylistic-js/max-statements-per-line': 'warn',\n 'stylistic-js/new-parens': 'warn',\n 'stylistic-js/no-confusing-arrow': 'off',\n 'stylistic-js/no-extra-parens': [\n 'warn',\n 'functions'\n ],\n 'stylistic-js/no-extra-semi': 'warn',\n 'stylistic-js/no-floating-decimal': 'warn',\n 'stylistic-js/no-mixed-operators': [\n 'warn', {\n 'groups': [\n [ '&', '|', '^', '~', '<<', '>>', '>>>' ],\n [ '==', '!=', '===', '!==', '>', '>=', '<', '<=' ],\n [ '&&', '||' ],\n [ 'in', 'instanceof' ]\n ]\n }\n ],\n 'stylistic-js/no-mixed-spaces-and-tabs': 'warn',\n 'stylistic-js/no-multi-spaces': 'warn',\n 'stylistic-js/no-multiple-empty-lines': [\n 'warn',\n {\n 'max': 2,\n 'maxEOF': 0\n }\n ],\n 'stylistic-js/no-tabs': 'warn',\n 'stylistic-js/no-trailing-spaces': 'warn',\n 'stylistic-js/no-whitespace-before-property': 'warn',\n 'stylistic-js/object-curly-newline': [\n 'warn',\n {\n 'ExportDeclaration': {\n 'multiline': true\n },\n 'ImportDeclaration': {\n 'multiline': true\n }\n }\n ],\n 'stylistic-js/object-curly-spacing': [\n 'warn',\n 'always'\n ],\n 'stylistic-js/operator-linebreak': [\n 'warn',\n 'before'\n ],\n 'stylistic-js/padding-line-between-statements': [\n 'warn',\n { blankLine: 'always', prev: '*', next: 'return' },\n { blankLine: 'always', prev: '*', next: 'function' },\n { blankLine: 'always', prev: '*', next: 'iife' },\n { blankLine: 'always', prev: '*', next: 'class' },\n { blankLine: 'always', prev: '*', next: 'do' },\n { blankLine: 'always', prev: '*', next: 'for' },\n { blankLine: 'always', prev: '*', next: 'throw' },\n { blankLine: 'always', prev: '*', next: 'try' },\n { blankLine: 'always', prev: '*', next: 'while' },\n { blankLine: 'always', prev: '*', next: 'switch' },\n\n { blankLine: 'always', prev: '*', next: 'const' },\n { blankLine: 'any', prev: 'const', next: 'const' },\n { blankLine: 'any', prev: 'let', next: 'const' },\n { blankLine: 'always', prev: '*', next: 'let' },\n { blankLine: 'any', prev: 'let', next: 'let' },\n { blankLine: 'any', prev: 'const', next: 'let' },\n\n { blankLine: 'always', prev: '*', next: 'export' },\n { blankLine: 'any', prev: 'export', next: 'export' },\n { blankLine: 'always', prev: 'block-like', next: '*' },\n { blankLine: 'always', prev: 'multiline-block-like', next: '*' }\n ]\n}\n","import type { OxlintConfig } from 'oxlint'\n\n\nexport const plugins: NonNullable<OxlintConfig['plugins']> = [\n 'eslint',\n 'oxc',\n 'typescript',\n 'unicorn',\n 'import',\n 'jsdoc',\n 'react',\n 'react-perf',\n 'vitest',\n 'jsx-a11y',\n 'promise',\n 'node',\n 'vue'\n]\n","import { access, readFile } from 'node:fs/promises'\nimport { join } from 'node:path'\nimport { cwd } from 'node:process'\nimport { up } from 'empathic/find'\n\n\nexport async function enableMode(configFiles: string[], dependencies?: string[]): Promise<boolean> {\n\n const hasConfigFile = await Promise.all(configFiles.map(async file => await access(join(cwd(), file))\n .then(() => true)\n .catch(() => false)))\n\n if (hasConfigFile.some(Boolean)) {\n return true\n }\n\n const packageJson = up('package.json', { cwd: cwd() })\n if (typeof packageJson === 'string') {\n // oxlint-disable-next-line typescript/no-unsafe-type-assertion\n const json = JSON.parse(await readFile(packageJson, 'utf8')) as { dependencies?: Record<string, string>; devDependencies?: Record<string, string> }\n\n return dependencies?.some(dependency =>\n json.dependencies?.[dependency] !== undefined || json.devDependencies?.[dependency] !== undefined) ?? false\n }\n\n return false\n}\n","import globalsPkg from 'globals'\nimport type { OxlintGlobals } from 'oxlint'\nimport { enableMode } from './utils'\n\n\nconst convertGlobals = (input: Record<string, boolean>): OxlintGlobals => {\n const result: Record<string, 'readonly' | 'writable'> = {}\n\n for (const [ key, value ] of Object.entries(input)) {\n result[key] = value ? 'writable' : 'readonly'\n }\n\n return result\n}\n\nconst base: OxlintGlobals = convertGlobals(globalsPkg['shared-node-browser'])\n\nconst cloudflareSpecificGlobals: OxlintGlobals = {\n Cloudflare: 'readonly',\n URLPattern: 'readonly',\n FixedLengthStream: 'readonly',\n IdentityTransformStream: 'readonly',\n HTMLRewriter: 'readonly',\n WebSocketPair: 'readonly',\n WebSocketRequestResponsePair: 'readonly',\n scheduler: 'readonly',\n caches: 'readonly'\n}\n\nconst cloudflare: OxlintGlobals = {\n ...base,\n ...cloudflareSpecificGlobals\n}\n\nconst { Cloudflare: _, ...cloudflareWithoutCF } = cloudflare\nconst astro: OxlintGlobals = {\n ...cloudflareWithoutCF,\n Astro: 'readonly'\n}\n\nasync function getGlobals(): Promise<OxlintGlobals> {\n const isAstro = await enableMode(\n [ 'astro.config.ts', 'astro.config.mjs', 'astro.config.js' ],\n [ 'astro' ]\n )\n\n if (isAstro) {\n return astro\n }\n\n const isCloudflare = await enableMode(\n [ 'wrangler.toml', 'wrangler.json', 'wrangler.jsonc', 'cloudflare.config.ts' ],\n [ '@cloudflare/workers-types', 'wrangler', '@cloudflare/vite-plugin', '@cloudflare/vitest-plugin' ]\n )\n\n if (isCloudflare) {\n return cloudflare\n }\n\n return base\n}\n\nexport const globals = await getGlobals()\n","export const jsPlugins = [\n { name: 'comment-labs-js', specifier: '@comment-labs/oxlint-config/plugins/labs' },\n { name: 'brettz9-js', specifier: '@comment-labs/oxlint-config/plugins/brettz9' },\n { name: 'i18next-js', specifier: '@comment-labs/oxlint-config/plugins/i18next' },\n { name: 'import-zod-js', specifier: '@comment-labs/oxlint-config/plugins/import-zod' },\n { name: 'playwright-js', specifier: '@comment-labs/oxlint-config/plugins/playwright' },\n { name: 'react-hooks-js', specifier: '@comment-labs/oxlint-config/plugins/react-hooks' },\n { name: 'react-native-js', specifier: '@comment-labs/oxlint-config/plugins/react-native' },\n { name: 'react-refresh-js', specifier: '@comment-labs/oxlint-config/plugins/react-refresh' },\n { name: 'security-js', specifier: '@comment-labs/oxlint-config/plugins/security' },\n { name: 'unicorn-js', specifier: '@comment-labs/oxlint-config/plugins/unicorn' },\n { name: 'stylistic-js', specifier: '@comment-labs/oxlint-config/plugins/stylistic' },\n { name: 'jsdoc-js', specifier: '@comment-labs/oxlint-config/plugins/jsdoc' },\n { name: 'e18e-js', specifier: '@comment-labs/oxlint-config/plugins/e18e' },\n { name: 'regexp-js', specifier: '@comment-labs/oxlint-config/plugins/regexp' }\n]\n","import { enableMode } from '#/utils'\nimport type { OxlintOverride } from 'oxlint'\n\n\nconst i18next = await enableMode([], [ 'i18next' ])\n\nexport const i18nextOverrides: OxlintOverride = {\n files: [ i18next ? '**/*' : '___disabled' ],\n rules: {\n 'i18next-js/no-literal-string': 'warn'\n }\n}\n","import type { OxlintOverride } from 'oxlint'\n\n\nexport const playwrightOverrides: OxlintOverride = {\n files: [ '**/e2e/**/*' ],\n rules: {\n 'playwright-js/consistent-spacing-between-blocks': 'warn',\n 'playwright-js/expect-expect': 'warn',\n 'playwright-js/max-nested-describe': 'warn',\n 'playwright-js/missing-playwright-await': 'error',\n 'playwright-js/no-conditional-expect': 'warn',\n 'playwright-js/no-conditional-in-test': 'warn',\n 'playwright-js/no-duplicate-hooks': 'warn',\n 'playwright-js/no-duplicate-slow': 'warn',\n 'playwright-js/no-element-handle': 'warn',\n 'playwright-js/no-eval': 'warn',\n 'playwright-js/no-focused-test': 'error',\n 'playwright-js/no-force-option': 'warn',\n 'playwright-js/no-nested-step': 'warn',\n 'playwright-js/no-networkidle': 'error',\n 'playwright-js/no-page-pause': 'warn',\n 'playwright-js/no-skipped-test': 'warn',\n 'playwright-js/no-standalone-expect': 'error',\n 'playwright-js/no-unsafe-references': 'error',\n 'playwright-js/no-unused-locators': 'error',\n 'playwright-js/no-useless-await': 'warn',\n 'playwright-js/no-useless-not': 'warn',\n 'playwright-js/no-wait-for-navigation': 'error',\n 'playwright-js/no-wait-for-selector': 'warn',\n 'playwright-js/no-wait-for-timeout': 'warn',\n 'playwright-js/prefer-hooks-in-order': 'warn',\n 'playwright-js/prefer-hooks-on-top': 'warn',\n 'playwright-js/prefer-locator': 'warn',\n 'playwright-js/prefer-to-have-count': 'warn',\n 'playwright-js/prefer-to-have-length': 'warn',\n 'playwright-js/prefer-web-first-assertions': 'error',\n 'playwright-js/valid-describe-callback': 'error',\n 'playwright-js/valid-expect': 'error',\n 'playwright-js/valid-expect-in-promise': 'error',\n 'playwright-js/valid-test-tags': 'error',\n 'playwright-js/valid-title': 'error'\n }\n}\n","import type { OxlintOverride } from 'oxlint'\n\n\nexport const reactOverrides: OxlintOverride = {\n files: [ '**/*.?(c|m)@(j|t)sx' ],\n rules: {\n 'react-hooks-js/exhaustive-deps': 'error',\n 'react-hooks-js/rules-of-hooks': 'warn',\n\n 'react-refresh-js/only-export-components': 'warn'\n }\n}\n","import { enableMode } from '#/utils'\nimport type { OxlintOverride } from 'oxlint'\n\n\nconst reactNative = await enableMode([], [ 'react-native' ])\n\nexport const reactNativeOverrides: OxlintOverride = {\n files: [ reactNative ? '**/*.?(m)@(j|t)sx' : '___disabled' ],\n rules: {\n 'react-native-js/no-color-literals': 'warn',\n 'react-native-js/no-inline-styles': 'warn',\n 'react-native-js/no-raw-text': 'off',\n 'react-native-js/no-single-element-style-arrays': 'warn',\n 'react-native-js/no-unused-styles': 'warn',\n 'react-native-js/sort-styles': 'off',\n 'react-native-js/split-platform-components': 'error'\n }\n}\n","import type { OxlintOverride } from 'oxlint'\n\n\nexport const scriptsOverrides: OxlintOverride = {\n files: [ 'scripts/**/*.?(m)@(j|t)s' ],\n rules: {\n 'unicorn/no-process-exit': 'warn'\n }\n}\n","import type { OxlintOverride } from 'oxlint'\n\n\nexport const declarationsOverrides: OxlintOverride = {\n files: [ '**/*.d.ts' ],\n rules: {\n 'typescript/no-empty-interface': 'off',\n 'typescript/no-empty-object-type': 'off'\n }\n}\n","import type { OxlintOverride } from 'oxlint'\n\n\nexport const ambientOverrides: OxlintOverride = {\n files: [ '**/src/env.d.ts', '**/src/environment.d.ts' ],\n rules: {\n 'no-redeclare': 'off'\n }\n}\n","import type { OxlintOverride } from 'oxlint'\n\n\nexport const vitestOverrides: OxlintOverride = {\n files: [\n '**/{test,tests}/**/*.{js,jsx,ts,tsx,mjs,cjs,mts,cts}',\n '**/*.{test,spec}.{js,jsx,ts,tsx,mjs,cjs,mts,cts}'\n ],\n rules: {\n 'vitest/prefer-expect-assertions': [\n 'warn', {\n onlyFunctionsWithExpectInCallback: true,\n onlyFunctionsWithExpectInLoop: true\n }\n ],\n 'vitest/require-hook': 'warn'\n }\n}\n","import type { OxlintConfig } from 'oxlint'\nimport { categories } from './categories'\nimport { baseRules } from './base-rules'\nimport { stylisticRules } from './stylistic-rules'\nimport { plugins } from './plugins'\nimport { globals } from './globals'\nimport { jsPlugins } from './js-plugins'\nimport { i18nextOverrides } from './overrides/i18next'\nimport { playwrightOverrides } from './overrides/playwright'\nimport { reactOverrides } from './overrides/react'\nimport { reactNativeOverrides } from './overrides/react-native'\nimport { scriptsOverrides } from './overrides/scripts'\nimport { declarationsOverrides } from './overrides/declarations'\nimport { ambientOverrides } from './overrides/ambient'\nimport { vitestOverrides } from './overrides/vitest'\n\n\nexport const config: OxlintConfig = {\n options: {\n reportUnusedDisableDirectives: 'warn',\n typeAware: true,\n typeCheck: true\n },\n plugins,\n jsPlugins,\n rules: {\n ...baseRules,\n ...stylisticRules\n },\n globals,\n categories,\n settings: {\n vitest: {\n typecheck: true\n }\n },\n overrides: [\n declarationsOverrides,\n ambientOverrides,\n i18nextOverrides,\n playwrightOverrides,\n reactOverrides,\n reactNativeOverrides,\n scriptsOverrides,\n vitestOverrides\n ],\n ignorePatterns: [ 'coverage/**', 'public/**', '.expo/**', '.output/**', '**/dist/**', '**/*wasm-bindgen/**' ]\n}\n"],"mappings":";;;;;;AAGA,MAAa,aAA6B;CACxC,aAAa;CACb,SAAS;CACT,UAAU;CACV,MAAM;CACN,aAAa;CACb,OAAO;CACP,YAAY;AACd;;;ACRA,MAAa,YAA0B;CACrC,cAAc;CACd,wBAAwB;CACxB,0BAA0B;CAC1B,mCAAmC;CACnC,+BAA+B;CAC/B,cAAc,CAAE,QAAQ,EAAE,KAAK,GAAG,CAAC;CACnC,gBAAgB;CAChB,gBAAgB;CAChB,iCAAiC;CACjC,kCAAkC;CAClC,cAAc;CACd,iBAAiB;CACjB,aAAa;CACb,qBAAqB;CACrB,oBAAoB;CACpB,aAAa,CAAE,QAAQ,CAAE;CACzB,aAAa,CACX,QACA;EACE,KAAK;EACL,gBAAgB;EAChB,cAAc;CAChB,CACF;CACA,0BAA0B,CACxB,QACA;EACE,KAAK;EACL,gBAAgB;EAChB,cAAc;CAChB,CACF;CACA,cAAc;CACd,kBAAkB,CAAE,QAAQ,EAAE,KAAK,GAAG,CAAC;CACvC,qBAAqB;CACrB,iCAAiC;CACjC,mBAAmB;CACnB,iBAAiB;CACjB,kBAAkB;CAClB,8BAA8B;CAC9B,oBAAoB;CACpB,cAAc;CACd,WAAW;CACX,cAAc;CACd,eAAe;CACf,qBAAqB;CACrB,uBAAuB;CACvB,s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ACrC,sCAAsC,CACpC,QACA,EACE,aAAa,KACf,CACF;CACA,sCAAsC;EACpC;EACA;EACA;GACE,kBAAkB;GAClB,mBAAmB;EACrB;CACF;CACA,6BAA6B,CAC3B,QACA,WACF;CACA,8BAA8B;CAC9B,8BAA8B,CAC5B,QACA,QACF;CACA,4BAA4B,CAC1B,QACA,MACF;CACA,6BAA6B,CAC3B,QACA,OACF;CACA,8BAA8B,CAC5B,QACA;EACE,SAAS;EACT,UAAU;CACZ,CACF;CACA,4BAA4B,CAC1B,QACA,MACF;CACA,6BAA6B,CAC3B,QACA,UACF;CACA,yBAAyB,CACvB,QACA,QACF;CACA,+CAA+C,CAC7C,QACA,YACF;CACA,uCAAuC,CACrC,QACA,qBACF;CACA,uBAAuB;EACrB;EACA;EACA,EACE,cAAc,EAChB;CACF;CACA,4BAA4B,CAC1B,QACA;EACE,cAAc;EACd,eAAe;EACf,QAAQ;CACV,CACF;CACA,gCAAgC,CAC9B,QACA;EACE,SAAS;EACT,UAAU;CACZ,CACF;CACA,gCAAgC,CAC9B,SACA,MACF;CACA,4CAA4C;EAC1C;EACA;EACA,EACE,yBAAyB,KAC3B;CACF;CACA,wBAAwB,CACtB,QACA;EACE,QAAQ;EACR,YAAY;EACZ,wBAAwB;EACxB,iBAAiB;EACjB,0BAA0B;EAC1B,0BAA0B;EAC1B,cAAc;CAChB,CACF;CACA,wCAAwC;CACxC,2BAA2B;CAC3B,mCAAmC;CACnC,gCAAgC,CAC9B,QACA,WACF;CACA,8BAA8B;CAC9B,oCAAoC;CACpC,mCAAmC,CACjC,QAAQ,EACN,UAAU;EACR;GAAE;GAAK;GAAK;GAAK;GAAK;GAAM;GAAM;EAAM;EACxC;GAAE;GAAM;GAAM;GAAO;GAAO;GAAK;GAAM;GAAK;EAAK;EACjD,CAAE,MAAM,IAAK;EACb,CAAE,MAAM,YAAa;CACvB,EACF,CACF;CACA,yCAAyC;CACzC,gCAAgC;CAChC,wCAAwC,CACtC,QACA;EACE,OAAO;EACP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a;EAAY;EAAc;EAAc;CAAsB;AAC9G"}
@@ -204,36 +204,36 @@ function isNativeDOMTag(str) {
204
204
  function isSvgTag(str) {
205
205
  return SVG_TAGS.includes(str);
206
206
  }
207
- const BLACKLIST_ATTRS = [
207
+ const BLACKLIST_ATTRS = /* @__PURE__ */ new Set([
208
208
  "placeholder",
209
209
  "alt",
210
210
  "aria-label",
211
211
  "value",
212
212
  "title"
213
- ];
213
+ ]);
214
214
  function isAllowedDOMAttr(tag, attr) {
215
215
  if (isSvgTag(tag)) return true;
216
- if (isNativeDOMTag(tag)) return !BLACKLIST_ATTRS.includes(attr);
216
+ if (isNativeDOMTag(tag)) return !BLACKLIST_ATTRS.has(attr);
217
217
  return false;
218
218
  }
219
219
  function generateFullMatchRegExp(source) {
220
220
  if (source instanceof RegExp) return source;
221
221
  if (typeof source !== "string") throw new TypeError(`generateFullMatchRegExp: expected string but got ${String(source)}`);
222
- return new RegExp(`^${source}${source.endsWith("$") ? "" : "$"}`);
222
+ return new RegExp(`^${source}${source.endsWith("$") ? "" : "$"}`, "u");
223
223
  }
224
224
  const patternCache = /* @__PURE__ */ new WeakMap();
225
225
  function matchPatterns(patterns, text) {
226
226
  let handler = patternCache.get(patterns);
227
227
  if (!handler) {
228
- handler = (str) => patterns.map(generateFullMatchRegExp).some((item) => item.test(str));
228
+ handler = (str) => patterns.map((pattern) => generateFullMatchRegExp(pattern)).some((item) => item.test(str));
229
229
  patternCache.set(patterns, handler);
230
230
  }
231
231
  return handler(text);
232
232
  }
233
233
  function shouldSkip({ exclude = [], include = [] }, text) {
234
- if (!include.length && !exclude.length) return false;
235
- if (include.length && matchPatterns(include, text)) return false;
236
- if (exclude.length && !matchPatterns(exclude, text)) return false;
234
+ if (include.length === 0 && exclude.length === 0) return false;
235
+ if (include.length > 0 && matchPatterns(include, text)) return false;
236
+ if (exclude.length > 0 && !matchPatterns(exclude, text)) return false;
237
237
  return true;
238
238
  }
239
239
  function getNearestAncestor(node, type) {
@@ -644,7 +644,7 @@ function isValidLiteral(options, { value }) {
644
644
  function getAttributeName(node) {
645
645
  if (!node.directive) return node.key.rawName;
646
646
  const directiveKey = node.key;
647
- if ((directiveKey.name.name === "bind" || directiveKey.name.name === "model") && directiveKey.argument && directiveKey.argument.type === "VIdentifier") return directiveKey.argument.rawName;
647
+ if ((directiveKey.name.name === "bind" || directiveKey.name.name === "model") && directiveKey.argument) return directiveKey.argument.rawName;
648
648
  return null;
649
649
  }
650
650
  function resolveCallee(node) {
@@ -686,7 +686,7 @@ const i18next = {
686
686
  indicatorStack.pop();
687
687
  }
688
688
  function isValidScope() {
689
- return indicatorStack.some((item) => item);
689
+ return indicatorStack.some(Boolean);
690
690
  }
691
691
  function report(node) {
692
692
  context.report({
@@ -706,7 +706,7 @@ const i18next = {
706
706
  if (isValidLiteral(options, node)) return;
707
707
  if (typeChecker) {
708
708
  const tsNode = esTreeNodeToTSNodeMap?.get(node);
709
- if (tsNode) {
709
+ if (tsNode !== void 0) {
710
710
  const typeObj = typeChecker.getContextualType(tsNode);
711
711
  if (typeObj) {
712
712
  if (typeObj.isStringLiteral()) return;
@@ -797,13 +797,13 @@ const i18next = {
797
797
  PropertyDefinition(node) {
798
798
  const property = node;
799
799
  const classProperties = options["class-properties"] ?? {};
800
- indicatorStack.push(!!(property.key.name && shouldSkip(classProperties, property.key.name)));
800
+ indicatorStack.push(property.key.name !== void 0 && shouldSkip(classProperties, property.key.name));
801
801
  },
802
802
  "PropertyDefinition:exit": endIndicator,
803
803
  ClassProperty(node) {
804
804
  const property = node;
805
805
  const classProperties = options["class-properties"] ?? {};
806
- indicatorStack.push(!!(property.key.name && shouldSkip(classProperties, property.key.name)));
806
+ indicatorStack.push(property.key.name !== void 0 && shouldSkip(classProperties, property.key.name));
807
807
  },
808
808
  "ClassProperty:exit": endIndicator,
809
809
  VariableDeclarator(node) {
@@ -860,7 +860,7 @@ const i18next = {
860
860
  if (framework === "react" && filterOutJSX(node)) return;
861
861
  if (onlyValidateVueTemplate) {
862
862
  const parents = getAncestors(context, node);
863
- if (parents.length && parents.every((item) => ![
863
+ if (parents.length > 0 && parents.every((item) => ![
864
864
  "VElement",
865
865
  "VAttribute",
866
866
  "VText",
@@ -1 +1 @@
1
- {"version":3,"file":"i18next.mjs","names":["element","attribute"],"sources":["../../src/plugin/i18next/constants.ts","../../src/plugin/i18next/helpers.ts","../../src/plugin/i18next/html-entities.ts","../../src/plugin/i18next/options.ts","../../src/plugin/i18next/no-literal-string.ts","../../src/plugin/i18next/index.ts"],"sourcesContent":["/*\n * Derived from eslint-plugin-i18next\n * https://github.com/edvardchen/eslint-plugin-i18next\n *\n * Copyright (c) 2019 edvardchen\n *\n * Permission to use, copy, modify, and/or distribute this software for any\n * purpose with or without fee is hereby granted, provided that the above\n * copyright notice and this permission notice appear in all copies.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES\n * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF\n * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY\n * SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES\n * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN\n * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF\n * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.\n */\n\nexport const DOM_TAGS = [\n 'a',\n 'abbr',\n 'acronym',\n 'applet',\n 'area',\n 'article',\n 'aside',\n 'audio',\n 'b',\n 'base',\n 'basefont',\n 'bdi',\n 'bdo',\n 'big',\n 'blockquote',\n 'body',\n 'br',\n 'button',\n 'canvas',\n 'caption',\n 'center',\n 'cite',\n 'code',\n 'col',\n 'colgroup',\n 'data',\n 'datalist',\n 'dd',\n 'del',\n 'details',\n 'dfn',\n 'dialog',\n 'dir',\n 'div',\n 'dl',\n 'dt',\n 'em',\n 'embed',\n 'fieldset',\n 'figcaption',\n 'figure',\n 'font',\n 'footer',\n 'form',\n 'frame',\n 'frameset',\n 'h1 to h6',\n 'head',\n 'header',\n 'hr',\n 'html',\n 'i',\n 'iframe',\n 'img',\n 'input',\n 'ins',\n 'kbd',\n 'label',\n 'legend',\n 'li',\n 'link',\n 'main',\n 'map',\n 'mark',\n 'meta',\n 'meter',\n 'nav',\n 'noframes',\n 'noscript',\n 'object',\n 'ol',\n 'optgroup',\n 'option',\n 'output',\n 'p',\n 'param',\n 'picture',\n 'pre',\n 'progress',\n 'q',\n 'rp',\n 'rt',\n 'ruby',\n 's',\n 'samp',\n 'script',\n 'section',\n 'select',\n 'small',\n 'source',\n 'span',\n 'strike',\n 'strong',\n 'style',\n 'sub',\n 'summary',\n 'sup',\n 'svg',\n 'table',\n 'tbody',\n 'td',\n 'template',\n 'textarea',\n 'tfoot',\n 'th',\n 'thead',\n 'time',\n 'title',\n 'tr',\n 'track',\n 'tt',\n 'u',\n 'ul',\n 'var',\n 'video',\n 'wbr'\n]\n\nexport const SVG_TAGS = [\n 'a',\n 'animate',\n 'animateMotion',\n 'animateTransform',\n 'circle',\n 'clipPath',\n 'color-profile',\n 'defs',\n 'desc',\n 'discard',\n 'ellipse',\n 'feBlend',\n 'feColorMatrix',\n 'feComponentTransfer',\n 'feComposite',\n 'feConvolveMatrix',\n 'feDiffuseLighting',\n 'feDisplacementMap',\n 'feDistantLight',\n 'feDropShadow',\n 'feFlood',\n 'feFuncA',\n 'feFuncB',\n 'feFuncG',\n 'feFuncR',\n 'feGaussianBlur',\n 'feImage',\n 'feMerge',\n 'feMergeNode',\n 'feMorphology',\n 'feOffset',\n 'fePointLight',\n 'feSpecularLighting',\n 'feSpotLight',\n 'feTile',\n 'feTurbulence',\n 'filter',\n 'foreignObject',\n 'g',\n 'hatch',\n 'hatchpath',\n 'image',\n 'line',\n 'linearGradient',\n 'marker',\n 'mask',\n 'mesh',\n 'meshgradient',\n 'meshpatch',\n 'meshrow',\n 'metadata',\n 'mpath',\n 'path',\n 'pattern',\n 'polygon',\n 'polyline',\n 'radialGradient',\n 'rect',\n 'script',\n 'set',\n 'solidcolor',\n 'stop',\n 'style',\n 'svg',\n 'switch',\n 'symbol',\n 'text',\n 'textPath',\n 'title',\n 'tspan',\n 'unknown',\n 'use',\n 'view'\n]\n","/*\n * Derived from eslint-plugin-i18next\n * https://github.com/edvardchen/eslint-plugin-i18next\n *\n * Copyright (c) 2019 edvardchen\n *\n * Permission to use, copy, modify, and/or distribute this software for any\n * purpose with or without fee is hereby granted, provided that the above\n * copyright notice and this permission notice appear in all copies.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES\n * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF\n * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY\n * SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES\n * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN\n * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF\n * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.\n */\n\nimport { DOM_TAGS, SVG_TAGS } from './constants'\n\nconst UPPERCASE_REGEX = /^[A-Z_-]+$/u\n\nexport function isUpperCase(str: string): boolean {\n return UPPERCASE_REGEX.test(str)\n}\n\nfunction isNativeDOMTag(str: string): boolean {\n return DOM_TAGS.includes(str)\n}\n\nfunction isSvgTag(str: string): boolean {\n return SVG_TAGS.includes(str)\n}\n\nconst BLACKLIST_ATTRS = ['placeholder', 'alt', 'aria-label', 'value', 'title']\n\nexport function isAllowedDOMAttr(tag: string, attr: string): boolean {\n if (isSvgTag(tag)) return true\n if (isNativeDOMTag(tag)) {\n return !BLACKLIST_ATTRS.includes(attr)\n }\n return false\n}\n\nexport function generateFullMatchRegExp(source: unknown): RegExp {\n if (source instanceof RegExp) {\n return source\n }\n\n if (typeof source !== 'string') {\n throw new TypeError(`generateFullMatchRegExp: expected string but got ${String(source)}`)\n }\n\n // oxlint-disable-next-line security-js/detect-non-literal-regexp\n return new RegExp(`^${source}${source.endsWith('$') ? '' : '$'}`)\n}\n\nconst patternCache = new WeakMap<readonly unknown[], (text: string) => boolean>()\n\nexport function matchPatterns(patterns: readonly unknown[], text: string): boolean {\n let handler = patternCache.get(patterns)\n\n if (!handler) {\n handler = (str: string) => patterns.map(generateFullMatchRegExp).some(item => item.test(str))\n patternCache.set(patterns, handler)\n }\n\n return handler(text)\n}\n\nexport interface SkipPatterns {\n include?: readonly unknown[]\n exclude?: readonly unknown[]\n}\n\nexport function shouldSkip({ exclude = [], include = [] }: SkipPatterns, text: string): boolean {\n if (!include.length && !exclude.length) return false\n\n if (include.length && matchPatterns(include, text)) return false\n\n if (exclude.length && !matchPatterns(exclude, text)) return false\n\n return true\n}\n\nexport interface AncestorNode {\n type: string\n parent?: (AncestorNode | undefined | null)\n}\n\nexport function getNearestAncestor(node: AncestorNode, type: string): AncestorNode | null {\n let temp: AncestorNode | undefined | null = node.parent\n\n while (temp) {\n if (temp.type === type) {\n return temp\n }\n\n temp = temp.parent\n }\n\n return null\n}\n","/*\n * Derived from eslint-plugin-i18next\n * https://github.com/edvardchen/eslint-plugin-i18next\n *\n * Copyright (c) 2019 edvardchen\n *\n * Permission to use, copy, modify, and/or distribute this software for any\n * purpose with or without fee is hereby granted, provided that the above\n * copyright notice and this permission notice appear in all copies.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES\n * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF\n * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY\n * SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES\n * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN\n * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF\n * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.\n */\n\nconst entities: Record<string, string> = {\n quot: '\\u0022',\n amp: '&',\n apos: '\\u0027',\n lt: '<',\n gt: '>',\n nbsp: '\\u00A0',\n iexcl: '\\u00A1',\n cent: '\\u00A2',\n pound: '\\u00A3',\n curren: '\\u00A4',\n yen: '\\u00A5',\n brvbar: '\\u00A6',\n sect: '\\u00A7',\n uml: '\\u00A8',\n copy: '\\u00A9',\n ordf: '\\u00AA',\n laquo: '\\u00AB',\n not: '\\u00AC',\n shy: '\\u00AD',\n reg: '\\u00AE',\n macr: '\\u00AF',\n deg: '\\u00B0',\n plusmn: '\\u00B1',\n sup2: '\\u00B2',\n sup3: '\\u00B3',\n acute: '\\u00B4',\n micro: '\\u00B5',\n para: '\\u00B6',\n middot: '\\u00B7',\n cedil: '\\u00B8',\n sup1: '\\u00B9',\n ordm: '\\u00BA',\n raquo: '\\u00BB',\n frac14: '\\u00BC',\n frac12: '\\u00BD',\n frac34: '\\u00BE',\n iquest: '\\u00BF',\n Agrave: '\\u00C0',\n Aacute: '\\u00C1',\n Acirc: '\\u00C2',\n Atilde: '\\u00C3',\n Auml: '\\u00C4',\n Aring: '\\u00C5',\n AElig: '\\u00C6',\n Ccedil: '\\u00C7',\n Egrave: '\\u00C8',\n Eacute: '\\u00C9',\n Ecirc: '\\u00CA',\n Euml: '\\u00CB',\n Igrave: '\\u00CC',\n Iacute: '\\u00CD',\n Icirc: '\\u00CE',\n Iuml: '\\u00CF',\n ETH: '\\u00D0',\n Ntilde: '\\u00D1',\n Ograve: '\\u00D2',\n Oacute: '\\u00D3',\n Ocirc: '\\u00D4',\n Otilde: '\\u00D5',\n Ouml: '\\u00D6',\n times: '\\u00D7',\n Oslash: '\\u00D8',\n Ugrave: '\\u00D9',\n Uacute: '\\u00DA',\n Ucirc: '\\u00DB',\n Uuml: '\\u00DC',\n Yacute: '\\u00DD',\n THORN: '\\u00DE',\n szlig: '\\u00DF',\n agrave: '\\u00E0',\n aacute: '\\u00E1',\n acirc: '\\u00E2',\n atilde: '\\u00E3',\n auml: '\\u00E4',\n aring: '\\u00E5',\n aelig: '\\u00E6',\n ccedil: '\\u00E7',\n egrave: '\\u00E8',\n eacute: '\\u00E9',\n ecirc: '\\u00EA',\n euml: '\\u00EB',\n igrave: '\\u00EC',\n iacute: '\\u00ED',\n icirc: '\\u00EE',\n iuml: '\\u00EF',\n eth: '\\u00F0',\n ntilde: '\\u00F1',\n ograve: '\\u00F2',\n oacute: '\\u00F3',\n ocirc: '\\u00F4',\n otilde: '\\u00F5',\n ouml: '\\u00F6',\n divide: '\\u00F7',\n oslash: '\\u00F8',\n ugrave: '\\u00F9',\n uacute: '\\u00FA',\n ucirc: '\\u00FB',\n uuml: '\\u00FC',\n yacute: '\\u00FD',\n thorn: '\\u00FE',\n yuml: '\\u00FF',\n OElig: '\\u0152',\n oelig: '\\u0153',\n Scaron: '\\u0160',\n scaron: '\\u0161',\n Yuml: '\\u0178',\n fnof: '\\u0192',\n circ: '\\u02C6',\n tilde: '\\u02DC',\n Alpha: '\\u0391',\n Beta: '\\u0392',\n Gamma: '\\u0393',\n Delta: '\\u0394',\n Epsilon: '\\u0395',\n Zeta: '\\u0396',\n Eta: '\\u0397',\n Theta: '\\u0398',\n Iota: '\\u0399',\n Kappa: '\\u03A0',\n Lambda: '\\u039B',\n Mu: '\\u039C',\n Nu: '\\u039D',\n Xi: '\\u039E',\n Omicron: '\\u039F',\n Pi: '\\u03A0',\n Rho: '\\u03A1',\n Sigma: '\\u03A3',\n Tau: '\\u03A4',\n Upsilon: '\\u03A5',\n Phi: '\\u03A6',\n Chi: '\\u03A7',\n Psi: '\\u03A8',\n Omega: '\\u03A9',\n alpha: '\\u03B1',\n beta: '\\u03B2',\n gamma: '\\u03B3',\n delta: '\\u03B4',\n epsilon: '\\u03B5',\n zeta: '\\u03B6',\n eta: '\\u03B7',\n theta: '\\u03B8',\n iota: '\\u03B9',\n kappa: '\\u03BA',\n lambda: '\\u03BB',\n mu: '\\u03BC',\n nu: '\\u03BD',\n xi: '\\u03BE',\n omicron: '\\u03BF',\n pi: '\\u03C0',\n rho: '\\u03C1',\n sigmaf: '\\u03C2',\n sigma: '\\u03C3',\n tau: '\\u03C4',\n upsilon: '\\u03C5',\n phi: '\\u03C6',\n chi: '\\u03C7',\n psi: '\\u03C8',\n omega: '\\u03C9',\n thetasym: '\\u03D1',\n upsih: '\\u03D2',\n piv: '\\u03D6',\n ensp: '\\u2002',\n emsp: '\\u2003',\n thinsp: '\\u2009',\n zwnj: '\\u200C',\n zwj: '\\u200D',\n lrm: '\\u200E',\n rlm: '\\u200F',\n ndash: '\\u2013',\n mdash: '\\u2014',\n lsquo: '\\u2018',\n rsquo: '\\u2019',\n sbquo: '\\u201A',\n ldquo: '\\u201C',\n rdquo: '\\u201D',\n bdquo: '\\u201E',\n dagger: '\\u2020',\n Dagger: '\\u2021',\n bull: '\\u2022',\n hellip: '\\u2026',\n permil: '\\u2030',\n prime: '\\u2032',\n Prime: '\\u2033',\n lsaquo: '\\u2039',\n rsaquo: '\\u203A',\n oline: '\\u203E',\n frasl: '\\u2044',\n euro: '\\u20AC',\n image: '\\u2111',\n weierp: '\\u2118',\n real: '\\u211C',\n trade: '\\u2122',\n alefsym: '\\u2135',\n larr: '\\u2190',\n uarr: '\\u2191',\n rarr: '\\u2192',\n darr: '\\u2193',\n harr: '\\u2194',\n crarr: '\\u21B5',\n lArr: '\\u21D0',\n uArr: '\\u21D1',\n rArr: '\\u21D2',\n dArr: '\\u21D3',\n hArr: '\\u21D4',\n forall: '\\u2200',\n part: '\\u2202',\n exist: '\\u2203',\n empty: '\\u2205',\n nabla: '\\u2207',\n isin: '\\u2208',\n notin: '\\u2209',\n ni: '\\u220B',\n prod: '\\u220F',\n sum: '\\u2211',\n minus: '\\u2212',\n lowast: '\\u2217',\n radic: '\\u221A',\n prop: '\\u221D',\n infin: '\\u221E',\n ang: '\\u2220',\n and: '\\u2227',\n or: '\\u2228',\n cap: '\\u2229',\n cup: '\\u222A',\n int: '\\u222B',\n there4: '\\u2234',\n sim: '\\u223C',\n cong: '\\u2245',\n asymp: '\\u2248',\n ne: '\\u2260',\n equiv: '\\u2261',\n le: '\\u2264',\n ge: '\\u2265',\n sub: '\\u2282',\n sup: '\\u2283',\n nsub: '\\u2284',\n sube: '\\u2286',\n supe: '\\u2287',\n oplus: '\\u2295',\n otimes: '\\u2297',\n perp: '\\u22A5',\n sdot: '\\u22C5',\n lceil: '\\u2308',\n rceil: '\\u2309',\n lfloor: '\\u230A',\n rfloor: '\\u230B',\n lang: '\\u2329',\n rang: '\\u232A',\n loz: '\\u25CA',\n spades: '\\u2660',\n clubs: '\\u2663',\n hearts: '\\u2665',\n diams: '\\u2666'\n}\n\n// oxlint-disable-next-line regexp-js/no-dupe-disjunctions, regexp-js/prefer-character-class, security-js/detect-non-literal-regexp\nexport const htmlEntities = new RegExp(`^(${Object.values(entities).join('|')})+$`, 'u')\n","/*\n * Derived from eslint-plugin-i18next\n * https://github.com/edvardchen/eslint-plugin-i18next\n *\n * Copyright (c) 2019 edvardchen\n *\n * Permission to use, copy, modify, and/or distribute this software for any\n * purpose with or without fee is hereby granted, provided that the above\n * copyright notice and this permission notice appear in all copies.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES\n * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF\n * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY\n * SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES\n * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN\n * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF\n * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.\n */\n\n// oxlint-disable stylistic-js/array-bracket-spacing\n\nimport { htmlEntities } from './html-entities'\n\nexport const defaults = {\n framework: 'react' as const,\n mode: 'jsx-text-only' as const,\n 'jsx-components': {\n include: [] as readonly string[],\n exclude: ['Trans'] as readonly string[]\n },\n 'jsx-attributes': {\n include: [] as readonly string[],\n exclude: [\n 'className',\n 'styleName',\n 'style',\n 'type',\n 'key',\n 'id',\n 'width',\n 'height'\n ] as readonly string[]\n },\n words: {\n exclude: [\n '[0-9!-/:-@[-`{-~]+',\n '[A-Z_-]+',\n htmlEntities,\n /^\\p{Emoji}+$/u\n ] as readonly (string | RegExp)[]\n },\n callees: {\n exclude: [\n 'i18n(ext)?',\n 't',\n 'require',\n 'addEventListener',\n 'removeEventListener',\n 'postMessage',\n 'getElementById',\n 'dispatch',\n 'commit',\n 'includes',\n 'indexOf',\n 'endsWith',\n 'startsWith'\n ] as readonly string[]\n },\n 'object-properties': {\n include: [] as readonly string[],\n exclude: ['[A-Z_-]+'] as readonly string[]\n },\n 'class-properties': {\n include: [] as readonly string[],\n exclude: ['displayName'] as readonly string[]\n },\n message: 'disallow literal string',\n 'should-validate-template': false\n}\n\nexport type RuleOptions = typeof defaults\n\nexport const schema = {\n $schema: 'http://json-schema.org/draft-07/schema#',\n type: 'object',\n properties: {\n framework: {\n type: 'string',\n enum: ['react', 'vue']\n },\n mode: {\n type: 'string',\n enum: ['jsx-text-only', 'jsx-only', 'all', 'vue-template-only']\n },\n 'jsx-components': {\n type: 'object',\n properties: {\n include: { type: 'array' },\n exclude: { type: 'array' }\n }\n },\n 'jsx-attributes': {\n type: 'object',\n properties: {\n include: { type: 'array' },\n exclude: { type: 'array' }\n }\n },\n words: {\n type: 'object',\n properties: {\n exclude: { type: 'array' }\n }\n },\n callees: {\n type: 'object',\n properties: {\n include: { type: 'array' },\n exclude: { type: 'array' }\n }\n },\n 'object-properties': {\n type: 'object',\n properties: {\n include: { type: 'array' },\n exclude: { type: 'array' }\n }\n },\n 'class-properties': {\n type: 'object',\n properties: {\n include: { type: 'array' },\n exclude: { type: 'array' }\n }\n },\n message: { type: 'string' },\n 'should-validate-template': { type: 'boolean' }\n }\n}\n","/*\n * Derived from eslint-plugin-i18next\n * https://github.com/edvardchen/eslint-plugin-i18next\n *\n * Copyright (c) 2019 edvardchen\n *\n * Permission to use, copy, modify, and/or distribute this software for any\n * purpose with or without fee is hereby granted, provided that the above\n * copyright notice and this permission notice appear in all copies.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES\n * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF\n * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY\n * SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES\n * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN\n * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF\n * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.\n */\n\n// oxlint-disable typescript/no-unsafe-type-assertion\n// oxlint-disable typescript/no-unnecessary-type-assertion\n\nimport type { Rule, SourceCode } from 'eslint'\nimport { getNearestAncestor, isAllowedDOMAttr, isUpperCase, shouldSkip, type SkipPatterns } from './helpers'\nimport { defaults, schema } from './options'\n\n\ntype Context = Rule.RuleContext\n\ntype Node = Rule.Node\n\ntype Options = Record<string, unknown>\n\ntype LooseNode = {\n type: string\n parent?: LooseNode | null\n [key: string]: unknown\n}\n\ntype JSXMemberExpressionNode = LooseNode & {\n type: 'JSXMemberExpression'\n object: JSXMemberExpressionNode | JSXIdentifierNode\n property: JSXIdentifierNode\n}\n\ntype JSXIdentifierNode = LooseNode & {\n type: 'JSXIdentifier'\n name: string\n}\n\ntype JSXOpeningElementNode = LooseNode & {\n type: 'JSXOpeningElement'\n name: JSXIdentifierNode | JSXMemberExpressionNode\n}\n\ntype JSXElementNode = LooseNode & {\n type: 'JSXElement'\n openingElement: JSXOpeningElementNode\n}\n\ntype JSXAttributeNode = LooseNode & {\n type: 'JSXAttribute'\n name: JSXIdentifierNode\n value: Node | null\n}\n\ntype VIdentifierNode = LooseNode & {\n type: 'VIdentifier'\n name: string\n rawName: string\n}\n\ntype VDirectiveKeyNode = LooseNode & {\n type: 'VDirectiveKey'\n name: VIdentifierNode\n argument: VIdentifierNode | null\n}\n\ntype VAttributeNode = LooseNode & {\n type: 'VAttribute'\n key: VDirectiveKeyNode | VIdentifierNode\n directive: boolean\n}\n\ntype VElementNode = LooseNode & {\n type: 'VElement'\n rawName: string\n}\n\nfunction getSourceCode(context: Context): SourceCode {\n // oxlint-disable-next-line typescript/no-unnecessary-condition\n return context.sourceCode\n ?? (context as unknown as { getSourceCode(): SourceCode }).getSourceCode()\n}\n\nfunction getText(context: Context, node: Node): string {\n return getSourceCode(context).getText(node as Parameters<SourceCode['getText']>[0])\n}\n\nfunction getAncestors(context: Context, node: Node): Node[] {\n return getSourceCode(context).getAncestors(node as Parameters<SourceCode['getAncestors']>[0]) as Node[]\n}\n\nfunction withDottedPrefix(patterns: readonly unknown[] = []): readonly unknown[] {\n return patterns.map(item =>\n typeof item === 'string' ? `(?:.*\\\\.)?${item}` : item\n )\n}\n\nfunction isValidFunctionCall(context: Context, options: Options, { callee }: { callee: Node }): boolean {\n if ((callee as { type: string }).type === 'Import') return true\n\n const sourceText = getText(context, callee)\n const callees = (options.callees as SkipPatterns | undefined) ?? {}\n\n return shouldSkip(\n {\n include: withDottedPrefix(callees.include),\n exclude: withDottedPrefix(callees.exclude)\n },\n sourceText\n )\n}\n\nfunction isValidLiteral(options: Options, { value }: { value: unknown }): boolean {\n if (typeof value !== 'string') {\n return true\n }\n\n const trimmed = value.trim()\n if (!trimmed) return true\n\n const words = (options.words as SkipPatterns | undefined) ?? {}\n return shouldSkip(words, trimmed)\n}\n\nfunction getAttributeName(node: VAttributeNode): string | null {\n if (!node.directive) {\n return (node.key as VIdentifierNode).rawName\n }\n\n const directiveKey = node.key as VDirectiveKeyNode\n if (\n (directiveKey.name.name === 'bind' || directiveKey.name.name === 'model')\n && directiveKey.argument\n && directiveKey.argument.type === 'VIdentifier'\n ) {\n return directiveKey.argument.rawName\n }\n\n return null\n}\n\nfunction resolveCallee(node: Node): Node {\n if (node.type === 'CallExpression' || node.type === 'NewExpression') {\n return node.callee as Node\n }\n\n if (node.type === 'TaggedTemplateExpression') {\n return node.tag as Node\n }\n\n return node\n}\n\nexport const noLiteralString: Rule.RuleModule = {\n meta: {\n type: 'suggestion',\n docs: {\n description: 'disallow literal string',\n recommended: true\n },\n schema: [schema],\n messages: {\n literal: '{{message}}: {{parent}}'\n }\n },\n\n create(context) {\n const parserServices = (context as unknown as { parserServices?: unknown }).parserServices\n ?? ((context as unknown as { sourceCode?: { parserServices?: unknown } }).sourceCode?.parserServices)\n const userOptions = (context.options[0] as Options | undefined) ?? {}\n const options = { ...defaults, ...userOptions }\n\n const {\n mode: rawMode,\n 'should-validate-template': validateTemplate,\n message,\n framework: rawFramework\n } = options as typeof defaults\n\n const mode = rawMode as string\n const framework = rawFramework as string\n\n const onlyValidateJSX = ['jsx-only', 'jsx-text-only'].includes(mode)\n const onlyValidateVueTemplate = framework === 'vue' && mode === 'vue-template-only'\n\n const indicatorStack: boolean[] = []\n\n function endIndicator(): void {\n indicatorStack.pop()\n }\n\n function isValidScope(): boolean {\n return indicatorStack.some(item => item)\n }\n\n function report(node: Node): void {\n context.report({\n node,\n messageId: 'literal',\n data: {\n message,\n parent: getText(context, node.parent ?? node)\n }\n })\n }\n\n const { esTreeNodeToTSNodeMap, program } = (parserServices as {\n esTreeNodeToTSNodeMap?: Map<Node, unknown>\n program?: { getTypeChecker(): { getContextualType(node: unknown): ContextualType | null } }\n } | undefined) ?? {}\n\n interface ContextualType {\n isStringLiteral(): boolean\n isUnion(): boolean\n types: Array<{ isStringLiteral(): boolean; value: unknown }>\n }\n\n let typeChecker: ReturnType<NonNullable<typeof program>['getTypeChecker']> | undefined\n if (program && esTreeNodeToTSNodeMap) {\n typeChecker = program.getTypeChecker()\n }\n\n function validateBeforeReport(node: Node & { value: unknown }): void {\n if (isValidScope()) return\n if (isValidLiteral(options as Options, node)) return\n\n if (typeChecker) {\n const tsNode = esTreeNodeToTSNodeMap?.get(node)\n if (tsNode) {\n const typeObj = typeChecker.getContextualType(tsNode)\n if (typeObj) {\n if (typeObj.isStringLiteral()) {\n return\n }\n\n if (typeObj.isUnion()) {\n const found = typeObj.types.some(item =>\n item.isStringLiteral() && item.value === node.value\n )\n if (found) return\n }\n }\n }\n }\n\n report(node)\n }\n\n function filterOutJSX(node: Node): boolean {\n if (!onlyValidateJSX) return false\n\n const isInsideJSX = getAncestors(context, node).some(item =>\n ['JSXElement', 'JSXFragment'].includes(item.type)\n )\n\n if (!isInsideJSX) return true\n\n if (\n mode === 'jsx-text-only'\n && !['JSXElement', 'JSXFragment'].includes(node.parent?.type ?? '')\n ) {\n return true\n }\n\n return false\n }\n\n const scriptVisitor: Rule.RuleListener = {\n ImportExpression() {\n indicatorStack.push(true)\n },\n 'ImportExpression:exit': endIndicator,\n\n ImportDeclaration() {\n indicatorStack.push(true)\n },\n 'ImportDeclaration:exit': endIndicator,\n\n ExportAllDeclaration() {\n indicatorStack.push(true)\n },\n 'ExportAllDeclaration:exit': endIndicator,\n\n 'ExportNamedDeclaration[source]'() {\n indicatorStack.push(true)\n },\n 'ExportNamedDeclaration[source]:exit': endIndicator,\n\n JSXElement(node: Node) {\n const element = node as unknown as JSXElementNode\n const fullComponentName = getText(context, element.openingElement.name as unknown as Node)\n const componentOptions = (options['jsx-components'] as SkipPatterns | undefined) ?? {}\n indicatorStack.push(\n shouldSkip(\n {\n include: withDottedPrefix(componentOptions.include),\n exclude: withDottedPrefix(componentOptions.exclude)\n },\n fullComponentName\n )\n )\n },\n 'JSXElement:exit': endIndicator,\n\n JSXAttribute(node: Node) {\n const attribute = node as unknown as JSXAttributeNode\n const attrName = attribute.name.name\n\n const jsxAttributes = (options['jsx-attributes'] as SkipPatterns | undefined) ?? {}\n if (shouldSkip(jsxAttributes, attrName)) {\n indicatorStack.push(true)\n return\n }\n\n const jsxElement = getNearestAncestor(node, 'JSXOpeningElement') as unknown as JSXOpeningElementNode\n const tagName = (jsxElement.name as JSXIdentifierNode).name\n if (isAllowedDOMAttr(tagName, attrName)) {\n indicatorStack.push(true)\n return\n }\n\n indicatorStack.push(false)\n },\n 'JSXAttribute:exit': endIndicator,\n\n JSXText(node: Node) {\n validateBeforeReport(node as Node & { value: unknown })\n },\n\n VElement(node: Node) {\n const element = node as unknown as VElementNode\n const componentOptions = (options['jsx-components'] as SkipPatterns | undefined) ?? {}\n indicatorStack.push(\n shouldSkip(\n {\n include: withDottedPrefix(componentOptions.include),\n exclude: withDottedPrefix(componentOptions.exclude)\n },\n element.rawName\n )\n )\n },\n 'VElement:exit': endIndicator,\n\n VAttribute(node: Node) {\n const attribute = node as unknown as VAttributeNode\n const attrName = getAttributeName(attribute)\n const jsxAttributes = (options['jsx-attributes'] as SkipPatterns | undefined) ?? {}\n indicatorStack.push(shouldSkip(jsxAttributes, attrName ?? ''))\n },\n 'VAttribute:exit': endIndicator,\n\n TSModuleDeclaration() {\n indicatorStack.push(true)\n },\n 'TSModuleDeclaration:exit': endIndicator,\n\n TSLiteralType() {\n indicatorStack.push(true)\n },\n 'TSLiteralType:exit': endIndicator,\n\n TSEnumMember() {\n indicatorStack.push(true)\n },\n 'TSEnumMember:exit': endIndicator,\n\n PropertyDefinition(node: Node) {\n const property = node as unknown as { key: { name?: string } }\n const classProperties = (options['class-properties'] as SkipPatterns | undefined) ?? {}\n indicatorStack.push(!!(property.key.name && shouldSkip(classProperties, property.key.name)))\n },\n 'PropertyDefinition:exit': endIndicator,\n\n ClassProperty(node: Node) {\n const property = node as unknown as { key: { name?: string } }\n const classProperties = (options['class-properties'] as SkipPatterns | undefined) ?? {}\n indicatorStack.push(!!(property.key.name && shouldSkip(classProperties, property.key.name)))\n },\n 'ClassProperty:exit': endIndicator,\n\n VariableDeclarator(node: Node) {\n const declarator = node as unknown as { id: { name?: string; type: string } }\n indicatorStack.push(declarator.id.type === 'Identifier' && isUpperCase(declarator.id.name ?? ''))\n },\n 'VariableDeclarator:exit': endIndicator,\n\n Property(node: Node) {\n const property = node as unknown as { key: { name?: string; value?: unknown } }\n const objectProperties = (options['object-properties'] as SkipPatterns | undefined) ?? {}\n indicatorStack.push(shouldSkip(objectProperties, property.key.name ?? (property.key.value as string) ?? ''))\n },\n 'Property:exit': endIndicator,\n\n BinaryExpression(node: Node) {\n const expression = node as unknown as { operator: string }\n indicatorStack.push(expression.operator !== '+')\n },\n 'BinaryExpression:exit': endIndicator,\n\n AssignmentPattern() {\n indicatorStack.push(true)\n },\n 'AssignmentPattern:exit': endIndicator,\n\n NewExpression(node: Node) {\n indicatorStack.push(isValidFunctionCall(context, options as Options, { callee: resolveCallee(node) }))\n },\n 'NewExpression:exit': endIndicator,\n\n CallExpression(node: Node) {\n indicatorStack.push(isValidFunctionCall(context, options as Options, { callee: resolveCallee(node) }))\n },\n 'CallExpression:exit': endIndicator,\n\n TaggedTemplateExpression(node: Node) {\n indicatorStack.push(isValidFunctionCall(context, options as Options, { callee: resolveCallee(node) }))\n },\n 'TaggedTemplateExpression:exit': endIndicator,\n\n 'AssignmentExpression[left.type=\"MemberExpression\"]'(node: Node) {\n const expression = node as unknown as { left: { property: { name?: string } } }\n const objectProperties = (options['object-properties'] as SkipPatterns | undefined) ?? {}\n indicatorStack.push(shouldSkip(objectProperties, expression.left.property.name ?? ''))\n },\n 'AssignmentExpression[left.type=\"MemberExpression\"]:exit': endIndicator,\n\n TemplateLiteral(node: Node) {\n if (!validateTemplate) return\n\n if (framework === 'react' && filterOutJSX(node)) return\n\n if (isValidScope()) return\n\n const literal = node as unknown as { quasis: Array<{ value: { raw: string } }> }\n literal.quasis.some(({ value: { raw } }) => {\n if (isValidLiteral(options as Options, { value: raw })) return false\n report(node)\n return true\n })\n },\n\n Literal(node: Node) {\n const literal = node as unknown as { value: unknown; parent: { type: string; key?: Node } }\n\n if (['MemberExpression', 'SwitchCase'].includes(literal.parent.type)) {\n return\n }\n\n if (framework === 'react' && filterOutJSX(node)) {\n return\n }\n\n if (onlyValidateVueTemplate) {\n const parents = getAncestors(context, node)\n if (\n parents.length\n && parents.every(\n item => !['VElement', 'VAttribute', 'VText', 'VExpressionContainer'].includes(item.type)\n )\n ) {\n return\n }\n }\n\n if (literal.parent.key === node) {\n return\n }\n\n validateBeforeReport(node as unknown as Node & { value: unknown })\n }\n }\n\n const defineTemplateBodyVisitor = (parserServices as { defineTemplateBodyVisitor?: DefineTemplateBodyVisitor } | undefined)\n ?.defineTemplateBodyVisitor\n\n if (defineTemplateBodyVisitor) {\n const invoke = (name: string) => (node: Node) => {\n const handler = (scriptVisitor as unknown as Record<string, (node: Node) => void>)[name]\n handler?.(node)\n }\n\n return defineTemplateBodyVisitor(\n {\n VText: invoke('JSXText'),\n VLiteral: invoke('JSXText'),\n VElement: invoke('VElement'),\n 'VElement:exit': invoke('VElement:exit'),\n VAttribute: invoke('VAttribute'),\n 'VAttribute:exit': invoke('VAttribute:exit'),\n 'VExpressionContainer CallExpression': invoke('CallExpression'),\n 'VExpressionContainer CallExpression:exit': invoke('CallExpression:exit'),\n 'VExpressionContainer Literal': invoke('Literal')\n },\n scriptVisitor\n )\n }\n\n return scriptVisitor\n }\n}\n\ntype DefineTemplateBodyVisitor = (\n templateBodyVisitor: Record<string, (node: Node) => void>,\n scriptVisitor: Rule.RuleListener\n) => Rule.RuleListener\n","/*\n * Derived from eslint-plugin-i18next\n * https://github.com/edvardchen/eslint-plugin-i18next\n *\n * Copyright (c) 2019 edvardchen\n *\n * Permission to use, copy, modify, and/or distribute this software for any\n * purpose with or without fee is hereby granted, provided that the above\n * copyright notice and this permission notice appear in all copies.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES\n * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF\n * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY\n * SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES\n * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN\n * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF\n * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.\n */\n\nimport { noLiteralString } from './no-literal-string'\n\n\nexport const i18next = {\n meta: {\n name: 'i18next',\n version: '1.0.0'\n },\n rules: {\n 'no-literal-string': noLiteralString\n }\n}\n"],"mappings":";AAmBA,MAAa,WAAW;CACtB;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACF;AAEA,MAAa,WAAW;CACtB;CACA;CACA;CACA;C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EA,IAAI,QAAQ,OAAO,QAAQ,MACzB;KAGF,qBAAqB,IAA4C;IACnE;GACF;GAEA,MAAM,4BAA6B,gBAC/B;GAEJ,IAAI,2BAA2B;IAC7B,MAAM,UAAU,UAAkB,SAAe;KAC/C,MAAM,UAAW,cAAkE;KACnF,UAAU,IAAI;IAChB;IAEA,OAAO,0BACL;KACE,OAAO,OAAO,SAAS;KACvB,UAAU,OAAO,SAAS;KAC1B,UAAU,OAAO,UAAU;KAC3B,iBAAiB,OAAO,eAAe;KACvC,YAAY,OAAO,YAAY;KAC/B,mBAAmB,OAAO,iBAAiB;KAC3C,uCAAuC,OAAO,gBAAgB;KAC9D,4CAA4C,OAAO,qBAAqB;KACxE,gCAAgC,OAAO,SAAS;IAClD,GACA,aACF;GACF;GAEA,OAAO;EACT;CCneuB,EACvB;AACF"}
1
+ {"version":3,"file":"i18next.mjs","names":["element","attribute"],"sources":["../../src/plugin/i18next/constants.ts","../../src/plugin/i18next/helpers.ts","../../src/plugin/i18next/html-entities.ts","../../src/plugin/i18next/options.ts","../../src/plugin/i18next/no-literal-string.ts","../../src/plugin/i18next/index.ts"],"sourcesContent":["/*\n * Derived from eslint-plugin-i18next\n * https://github.com/edvardchen/eslint-plugin-i18next\n *\n * Copyright (c) 2019 edvardchen\n *\n * Permission to use, copy, modify, and/or distribute this software for any\n * purpose with or without fee is hereby granted, provided that the above\n * copyright notice and this permission notice appear in all copies.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES\n * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF\n * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY\n * SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES\n * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN\n * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF\n * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.\n */\n\nexport const DOM_TAGS = [\n 'a',\n 'abbr',\n 'acronym',\n 'applet',\n 'area',\n 'article',\n 'aside',\n 'audio',\n 'b',\n 'base',\n 'basefont',\n 'bdi',\n 'bdo',\n 'big',\n 'blockquote',\n 'body',\n 'br',\n 'button',\n 'canvas',\n 'caption',\n 'center',\n 'cite',\n 'code',\n 'col',\n 'colgroup',\n 'data',\n 'datalist',\n 'dd',\n 'del',\n 'details',\n 'dfn',\n 'dialog',\n 'dir',\n 'div',\n 'dl',\n 'dt',\n 'em',\n 'embed',\n 'fieldset',\n 'figcaption',\n 'figure',\n 'font',\n 'footer',\n 'form',\n 'frame',\n 'frameset',\n 'h1 to h6',\n 'head',\n 'header',\n 'hr',\n 'html',\n 'i',\n 'iframe',\n 'img',\n 'input',\n 'ins',\n 'kbd',\n 'label',\n 'legend',\n 'li',\n 'link',\n 'main',\n 'map',\n 'mark',\n 'meta',\n 'meter',\n 'nav',\n 'noframes',\n 'noscript',\n 'object',\n 'ol',\n 'optgroup',\n 'option',\n 'output',\n 'p',\n 'param',\n 'picture',\n 'pre',\n 'progress',\n 'q',\n 'rp',\n 'rt',\n 'ruby',\n 's',\n 'samp',\n 'script',\n 'section',\n 'select',\n 'small',\n 'source',\n 'span',\n 'strike',\n 'strong',\n 'style',\n 'sub',\n 'summary',\n 'sup',\n 'svg',\n 'table',\n 'tbody',\n 'td',\n 'template',\n 'textarea',\n 'tfoot',\n 'th',\n 'thead',\n 'time',\n 'title',\n 'tr',\n 'track',\n 'tt',\n 'u',\n 'ul',\n 'var',\n 'video',\n 'wbr'\n]\n\nexport const SVG_TAGS = [\n 'a',\n 'animate',\n 'animateMotion',\n 'animateTransform',\n 'circle',\n 'clipPath',\n 'color-profile',\n 'defs',\n 'desc',\n 'discard',\n 'ellipse',\n 'feBlend',\n 'feColorMatrix',\n 'feComponentTransfer',\n 'feComposite',\n 'feConvolveMatrix',\n 'feDiffuseLighting',\n 'feDisplacementMap',\n 'feDistantLight',\n 'feDropShadow',\n 'feFlood',\n 'feFuncA',\n 'feFuncB',\n 'feFuncG',\n 'feFuncR',\n 'feGaussianBlur',\n 'feImage',\n 'feMerge',\n 'feMergeNode',\n 'feMorphology',\n 'feOffset',\n 'fePointLight',\n 'feSpecularLighting',\n 'feSpotLight',\n 'feTile',\n 'feTurbulence',\n 'filter',\n 'foreignObject',\n 'g',\n 'hatch',\n 'hatchpath',\n 'image',\n 'line',\n 'linearGradient',\n 'marker',\n 'mask',\n 'mesh',\n 'meshgradient',\n 'meshpatch',\n 'meshrow',\n 'metadata',\n 'mpath',\n 'path',\n 'pattern',\n 'polygon',\n 'polyline',\n 'radialGradient',\n 'rect',\n 'script',\n 'set',\n 'solidcolor',\n 'stop',\n 'style',\n 'svg',\n 'switch',\n 'symbol',\n 'text',\n 'textPath',\n 'title',\n 'tspan',\n 'unknown',\n 'use',\n 'view'\n]\n","/*\n * Derived from eslint-plugin-i18next\n * https://github.com/edvardchen/eslint-plugin-i18next\n *\n * Copyright (c) 2019 edvardchen\n *\n * Permission to use, copy, modify, and/or distribute this software for any\n * purpose with or without fee is hereby granted, provided that the above\n * copyright notice and this permission notice appear in all copies.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES\n * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF\n * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY\n * SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES\n * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN\n * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF\n * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.\n */\n\nimport { DOM_TAGS, SVG_TAGS } from './constants'\n\nconst UPPERCASE_REGEX = /^[A-Z_-]+$/u\n\nexport function isUpperCase(str: string): boolean {\n return UPPERCASE_REGEX.test(str)\n}\n\nfunction isNativeDOMTag(str: string): boolean {\n return DOM_TAGS.includes(str)\n}\n\nfunction isSvgTag(str: string): boolean {\n return SVG_TAGS.includes(str)\n}\n\nconst BLACKLIST_ATTRS = new Set([ 'placeholder', 'alt', 'aria-label', 'value', 'title' ])\n\nexport function isAllowedDOMAttr(tag: string, attr: string): boolean {\n if (isSvgTag(tag)) {\n return true\n }\n\n if (isNativeDOMTag(tag)) {\n return !BLACKLIST_ATTRS.has(attr)\n }\n\n return false\n}\n\nexport function generateFullMatchRegExp(source: unknown): RegExp {\n if (source instanceof RegExp) {\n return source\n }\n\n if (typeof source !== 'string') {\n throw new TypeError(`generateFullMatchRegExp: expected string but got ${String(source)}`)\n }\n\n // oxlint-disable-next-line security-js/detect-non-literal-regexp\n return new RegExp(`^${source}${source.endsWith('$') ? '' : '$'}`, 'u')\n}\n\nconst patternCache = new WeakMap<readonly unknown[], (text: string) => boolean>()\n\nexport function matchPatterns(patterns: readonly unknown[], text: string): boolean {\n let handler = patternCache.get(patterns)\n\n if (!handler) {\n handler = (str: string) => patterns.map(pattern => generateFullMatchRegExp(pattern)).some(item => item.test(str))\n patternCache.set(patterns, handler)\n }\n\n return handler(text)\n}\n\nexport interface SkipPatterns {\n include?: readonly unknown[]\n exclude?: readonly unknown[]\n}\n\nexport function shouldSkip({ exclude = [], include = [] }: SkipPatterns, text: string): boolean {\n if (include.length === 0 && exclude.length === 0) {\n return false\n }\n\n if (include.length > 0 && matchPatterns(include, text)) {\n return false\n }\n\n if (exclude.length > 0 && !matchPatterns(exclude, text)) {\n return false\n }\n\n return true\n}\n\nexport interface AncestorNode {\n type: string\n parent?: (AncestorNode | undefined | null)\n}\n\nexport function getNearestAncestor(node: AncestorNode, type: string): AncestorNode | null {\n let temp: AncestorNode | undefined | null = node.parent\n\n while (temp) {\n if (temp.type === type) {\n return temp\n }\n\n temp = temp.parent\n }\n\n return null\n}\n","/*\n * Derived from eslint-plugin-i18next\n * https://github.com/edvardchen/eslint-plugin-i18next\n *\n * Copyright (c) 2019 edvardchen\n *\n * Permission to use, copy, modify, and/or distribute this software for any\n * purpose with or without fee is hereby granted, provided that the above\n * copyright notice and this permission notice appear in all copies.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES\n * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF\n * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY\n * SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES\n * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN\n * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF\n * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.\n */\n\nconst entities: Record<string, string> = {\n quot: '\\u0022',\n amp: '&',\n apos: '\\u0027',\n lt: '<',\n gt: '>',\n nbsp: '\\u00A0',\n iexcl: '\\u00A1',\n cent: '\\u00A2',\n pound: '\\u00A3',\n curren: '\\u00A4',\n yen: '\\u00A5',\n brvbar: '\\u00A6',\n sect: '\\u00A7',\n uml: '\\u00A8',\n copy: '\\u00A9',\n ordf: '\\u00AA',\n laquo: '\\u00AB',\n not: '\\u00AC',\n shy: '\\u00AD',\n reg: '\\u00AE',\n macr: '\\u00AF',\n deg: '\\u00B0',\n plusmn: '\\u00B1',\n sup2: '\\u00B2',\n sup3: '\\u00B3',\n acute: '\\u00B4',\n micro: '\\u00B5',\n para: '\\u00B6',\n middot: '\\u00B7',\n cedil: '\\u00B8',\n sup1: '\\u00B9',\n ordm: '\\u00BA',\n raquo: '\\u00BB',\n frac14: '\\u00BC',\n frac12: '\\u00BD',\n frac34: '\\u00BE',\n iquest: '\\u00BF',\n Agrave: '\\u00C0',\n Aacute: '\\u00C1',\n Acirc: '\\u00C2',\n Atilde: '\\u00C3',\n Auml: '\\u00C4',\n Aring: '\\u00C5',\n AElig: '\\u00C6',\n Ccedil: '\\u00C7',\n Egrave: '\\u00C8',\n Eacute: '\\u00C9',\n Ecirc: '\\u00CA',\n Euml: '\\u00CB',\n Igrave: '\\u00CC',\n Iacute: '\\u00CD',\n Icirc: '\\u00CE',\n Iuml: '\\u00CF',\n ETH: '\\u00D0',\n Ntilde: '\\u00D1',\n Ograve: '\\u00D2',\n Oacute: '\\u00D3',\n Ocirc: '\\u00D4',\n Otilde: '\\u00D5',\n Ouml: '\\u00D6',\n times: '\\u00D7',\n Oslash: '\\u00D8',\n Ugrave: '\\u00D9',\n Uacute: '\\u00DA',\n Ucirc: '\\u00DB',\n Uuml: '\\u00DC',\n Yacute: '\\u00DD',\n THORN: '\\u00DE',\n szlig: '\\u00DF',\n agrave: '\\u00E0',\n aacute: '\\u00E1',\n acirc: '\\u00E2',\n atilde: '\\u00E3',\n auml: '\\u00E4',\n aring: '\\u00E5',\n aelig: '\\u00E6',\n ccedil: '\\u00E7',\n egrave: '\\u00E8',\n eacute: '\\u00E9',\n ecirc: '\\u00EA',\n euml: '\\u00EB',\n igrave: '\\u00EC',\n iacute: '\\u00ED',\n icirc: '\\u00EE',\n iuml: '\\u00EF',\n eth: '\\u00F0',\n ntilde: '\\u00F1',\n ograve: '\\u00F2',\n oacute: '\\u00F3',\n ocirc: '\\u00F4',\n otilde: '\\u00F5',\n ouml: '\\u00F6',\n divide: '\\u00F7',\n oslash: '\\u00F8',\n ugrave: '\\u00F9',\n uacute: '\\u00FA',\n ucirc: '\\u00FB',\n uuml: '\\u00FC',\n yacute: '\\u00FD',\n thorn: '\\u00FE',\n yuml: '\\u00FF',\n OElig: '\\u0152',\n oelig: '\\u0153',\n Scaron: '\\u0160',\n scaron: '\\u0161',\n Yuml: '\\u0178',\n fnof: '\\u0192',\n circ: '\\u02C6',\n tilde: '\\u02DC',\n Alpha: '\\u0391',\n Beta: '\\u0392',\n Gamma: '\\u0393',\n Delta: '\\u0394',\n Epsilon: '\\u0395',\n Zeta: '\\u0396',\n Eta: '\\u0397',\n Theta: '\\u0398',\n Iota: '\\u0399',\n Kappa: '\\u03A0',\n Lambda: '\\u039B',\n Mu: '\\u039C',\n Nu: '\\u039D',\n Xi: '\\u039E',\n Omicron: '\\u039F',\n Pi: '\\u03A0',\n Rho: '\\u03A1',\n Sigma: '\\u03A3',\n Tau: '\\u03A4',\n Upsilon: '\\u03A5',\n Phi: '\\u03A6',\n Chi: '\\u03A7',\n Psi: '\\u03A8',\n Omega: '\\u03A9',\n alpha: '\\u03B1',\n beta: '\\u03B2',\n gamma: '\\u03B3',\n delta: '\\u03B4',\n epsilon: '\\u03B5',\n zeta: '\\u03B6',\n eta: '\\u03B7',\n theta: '\\u03B8',\n iota: '\\u03B9',\n kappa: '\\u03BA',\n lambda: '\\u03BB',\n mu: '\\u03BC',\n nu: '\\u03BD',\n xi: '\\u03BE',\n omicron: '\\u03BF',\n pi: '\\u03C0',\n rho: '\\u03C1',\n sigmaf: '\\u03C2',\n sigma: '\\u03C3',\n tau: '\\u03C4',\n upsilon: '\\u03C5',\n phi: '\\u03C6',\n chi: '\\u03C7',\n psi: '\\u03C8',\n omega: '\\u03C9',\n thetasym: '\\u03D1',\n upsih: '\\u03D2',\n piv: '\\u03D6',\n ensp: '\\u2002',\n emsp: '\\u2003',\n thinsp: '\\u2009',\n zwnj: '\\u200C',\n zwj: '\\u200D',\n lrm: '\\u200E',\n rlm: '\\u200F',\n ndash: '\\u2013',\n mdash: '\\u2014',\n lsquo: '\\u2018',\n rsquo: '\\u2019',\n sbquo: '\\u201A',\n ldquo: '\\u201C',\n rdquo: '\\u201D',\n bdquo: '\\u201E',\n dagger: '\\u2020',\n Dagger: '\\u2021',\n bull: '\\u2022',\n hellip: '\\u2026',\n permil: '\\u2030',\n prime: '\\u2032',\n Prime: '\\u2033',\n lsaquo: '\\u2039',\n rsaquo: '\\u203A',\n oline: '\\u203E',\n frasl: '\\u2044',\n euro: '\\u20AC',\n image: '\\u2111',\n weierp: '\\u2118',\n real: '\\u211C',\n trade: '\\u2122',\n alefsym: '\\u2135',\n larr: '\\u2190',\n uarr: '\\u2191',\n rarr: '\\u2192',\n darr: '\\u2193',\n harr: '\\u2194',\n crarr: '\\u21B5',\n lArr: '\\u21D0',\n uArr: '\\u21D1',\n rArr: '\\u21D2',\n dArr: '\\u21D3',\n hArr: '\\u21D4',\n forall: '\\u2200',\n part: '\\u2202',\n exist: '\\u2203',\n empty: '\\u2205',\n nabla: '\\u2207',\n isin: '\\u2208',\n notin: '\\u2209',\n ni: '\\u220B',\n prod: '\\u220F',\n sum: '\\u2211',\n minus: '\\u2212',\n lowast: '\\u2217',\n radic: '\\u221A',\n prop: '\\u221D',\n infin: '\\u221E',\n ang: '\\u2220',\n and: '\\u2227',\n or: '\\u2228',\n cap: '\\u2229',\n cup: '\\u222A',\n int: '\\u222B',\n there4: '\\u2234',\n sim: '\\u223C',\n cong: '\\u2245',\n asymp: '\\u2248',\n ne: '\\u2260',\n equiv: '\\u2261',\n le: '\\u2264',\n ge: '\\u2265',\n sub: '\\u2282',\n sup: '\\u2283',\n nsub: '\\u2284',\n sube: '\\u2286',\n supe: '\\u2287',\n oplus: '\\u2295',\n otimes: '\\u2297',\n perp: '\\u22A5',\n sdot: '\\u22C5',\n lceil: '\\u2308',\n rceil: '\\u2309',\n lfloor: '\\u230A',\n rfloor: '\\u230B',\n lang: '\\u2329',\n rang: '\\u232A',\n loz: '\\u25CA',\n spades: '\\u2660',\n clubs: '\\u2663',\n hearts: '\\u2665',\n diams: '\\u2666'\n}\n\n// oxlint-disable-next-line regexp-js/no-dupe-disjunctions, regexp-js/prefer-character-class, security-js/detect-non-literal-regexp\nexport const htmlEntities = new RegExp(`^(${Object.values(entities).join('|')})+$`, 'u')\n","/*\n * Derived from eslint-plugin-i18next\n * https://github.com/edvardchen/eslint-plugin-i18next\n *\n * Copyright (c) 2019 edvardchen\n *\n * Permission to use, copy, modify, and/or distribute this software for any\n * purpose with or without fee is hereby granted, provided that the above\n * copyright notice and this permission notice appear in all copies.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES\n * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF\n * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY\n * SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES\n * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN\n * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF\n * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.\n */\n\n// oxlint-disable stylistic-js/array-bracket-spacing\n\nimport { htmlEntities } from './html-entities'\n\nexport const defaults = {\n framework: 'react' as const,\n mode: 'jsx-text-only' as const,\n 'jsx-components': {\n include: [] as readonly string[],\n exclude: ['Trans'] as readonly string[]\n },\n 'jsx-attributes': {\n include: [] as readonly string[],\n exclude: [\n 'className',\n 'styleName',\n 'style',\n 'type',\n 'key',\n 'id',\n 'width',\n 'height'\n ] as readonly string[]\n },\n words: {\n exclude: [\n '[0-9!-/:-@[-`{-~]+',\n '[A-Z_-]+',\n htmlEntities,\n /^\\p{Emoji}+$/u\n ] as readonly (string | RegExp)[]\n },\n callees: {\n exclude: [\n 'i18n(ext)?',\n 't',\n 'require',\n 'addEventListener',\n 'removeEventListener',\n 'postMessage',\n 'getElementById',\n 'dispatch',\n 'commit',\n 'includes',\n 'indexOf',\n 'endsWith',\n 'startsWith'\n ] as readonly string[]\n },\n 'object-properties': {\n include: [] as readonly string[],\n exclude: ['[A-Z_-]+'] as readonly string[]\n },\n 'class-properties': {\n include: [] as readonly string[],\n exclude: ['displayName'] as readonly string[]\n },\n message: 'disallow literal string',\n 'should-validate-template': false\n}\n\nexport type RuleOptions = typeof defaults\n\nexport const schema = {\n $schema: 'http://json-schema.org/draft-07/schema#',\n type: 'object',\n properties: {\n framework: {\n type: 'string',\n enum: ['react', 'vue']\n },\n mode: {\n type: 'string',\n enum: ['jsx-text-only', 'jsx-only', 'all', 'vue-template-only']\n },\n 'jsx-components': {\n type: 'object',\n properties: {\n include: { type: 'array' },\n exclude: { type: 'array' }\n }\n },\n 'jsx-attributes': {\n type: 'object',\n properties: {\n include: { type: 'array' },\n exclude: { type: 'array' }\n }\n },\n words: {\n type: 'object',\n properties: {\n exclude: { type: 'array' }\n }\n },\n callees: {\n type: 'object',\n properties: {\n include: { type: 'array' },\n exclude: { type: 'array' }\n }\n },\n 'object-properties': {\n type: 'object',\n properties: {\n include: { type: 'array' },\n exclude: { type: 'array' }\n }\n },\n 'class-properties': {\n type: 'object',\n properties: {\n include: { type: 'array' },\n exclude: { type: 'array' }\n }\n },\n message: { type: 'string' },\n 'should-validate-template': { type: 'boolean' }\n }\n}\n","/*\n * Derived from eslint-plugin-i18next\n * https://github.com/edvardchen/eslint-plugin-i18next\n *\n * Copyright (c) 2019 edvardchen\n *\n * Permission to use, copy, modify, and/or distribute this software for any\n * purpose with or without fee is hereby granted, provided that the above\n * copyright notice and this permission notice appear in all copies.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES\n * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF\n * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY\n * SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES\n * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN\n * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF\n * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.\n */\n\n// oxlint-disable typescript/no-unsafe-type-assertion\n// oxlint-disable typescript/no-unnecessary-type-assertion\n\nimport type { Rule, SourceCode } from 'eslint'\nimport { getNearestAncestor, isAllowedDOMAttr, isUpperCase, shouldSkip, type SkipPatterns } from './helpers'\nimport { defaults, schema } from './options'\n\n\ntype Context = Rule.RuleContext\n\ntype Node = Rule.Node\n\ntype Options = Record<string, unknown>\n\ntype LooseNode = {\n type: string\n parent?: LooseNode | null\n [key: string]: unknown\n}\n\ntype JSXMemberExpressionNode = LooseNode & {\n type: 'JSXMemberExpression'\n object: JSXMemberExpressionNode | JSXIdentifierNode\n property: JSXIdentifierNode\n}\n\ntype JSXIdentifierNode = LooseNode & {\n type: 'JSXIdentifier'\n name: string\n}\n\ntype JSXOpeningElementNode = LooseNode & {\n type: 'JSXOpeningElement'\n name: JSXIdentifierNode | JSXMemberExpressionNode\n}\n\ntype JSXElementNode = LooseNode & {\n type: 'JSXElement'\n openingElement: JSXOpeningElementNode\n}\n\ntype JSXAttributeNode = LooseNode & {\n type: 'JSXAttribute'\n name: JSXIdentifierNode\n value: Node | null\n}\n\ntype VIdentifierNode = LooseNode & {\n type: 'VIdentifier'\n name: string\n rawName: string\n}\n\ntype VDirectiveKeyNode = LooseNode & {\n type: 'VDirectiveKey'\n name: VIdentifierNode\n argument: VIdentifierNode | null\n}\n\ntype VAttributeNode = LooseNode & {\n type: 'VAttribute'\n key: VDirectiveKeyNode | VIdentifierNode\n directive: boolean\n}\n\ntype VElementNode = LooseNode & {\n type: 'VElement'\n rawName: string\n}\n\nfunction getSourceCode(context: Context): SourceCode {\n // oxlint-disable-next-line typescript/no-unnecessary-condition\n return context.sourceCode\n ?? (context as unknown as { getSourceCode(): SourceCode }).getSourceCode()\n}\n\nfunction getText(context: Context, node: Node): string {\n return getSourceCode(context).getText(node as Parameters<SourceCode['getText']>[0])\n}\n\nfunction getAncestors(context: Context, node: Node): Node[] {\n return getSourceCode(context).getAncestors(node as Parameters<SourceCode['getAncestors']>[0]) as Node[]\n}\n\nfunction withDottedPrefix(patterns: readonly unknown[] = []): readonly unknown[] {\n return patterns.map(item => typeof item === 'string' ? `(?:.*\\\\.)?${item}` : item)\n}\n\nfunction isValidFunctionCall(context: Context, options: Options, { callee }: { callee: Node }): boolean {\n if ((callee as { type: string }).type === 'Import') {\n return true\n }\n\n const sourceText = getText(context, callee)\n const callees = (options.callees as SkipPatterns | undefined) ?? {}\n\n return shouldSkip(\n {\n include: withDottedPrefix(callees.include),\n exclude: withDottedPrefix(callees.exclude)\n },\n sourceText\n )\n}\n\nfunction isValidLiteral(options: Options, { value }: { value: unknown }): boolean {\n if (typeof value !== 'string') {\n return true\n }\n\n const trimmed = value.trim()\n if (!trimmed) {\n return true\n }\n\n const words = (options.words as SkipPatterns | undefined) ?? {}\n\n return shouldSkip(words, trimmed)\n}\n\nfunction getAttributeName(node: VAttributeNode): string | null {\n if (!node.directive) {\n return (node.key as VIdentifierNode).rawName\n }\n\n const directiveKey = node.key as VDirectiveKeyNode\n if (\n (directiveKey.name.name === 'bind' || directiveKey.name.name === 'model')\n && directiveKey.argument\n ) {\n return directiveKey.argument.rawName\n }\n\n return null\n}\n\nfunction resolveCallee(node: Node): Node {\n if (node.type === 'CallExpression' || node.type === 'NewExpression') {\n return node.callee as Node\n }\n\n if (node.type === 'TaggedTemplateExpression') {\n return node.tag as Node\n }\n\n return node\n}\n\nexport const noLiteralString: Rule.RuleModule = {\n meta: {\n type: 'suggestion',\n docs: {\n description: 'disallow literal string',\n recommended: true\n },\n schema: [ schema ],\n messages: {\n literal: '{{message}}: {{parent}}'\n }\n },\n\n create(context) {\n const parserServices = (context as unknown as { parserServices?: unknown }).parserServices\n ?? ((context as unknown as { sourceCode?: { parserServices?: unknown } }).sourceCode?.parserServices)\n const userOptions = (context.options[0] as Options | undefined) ?? {}\n const options = { ...defaults, ...userOptions }\n\n const {\n mode: rawMode,\n 'should-validate-template': validateTemplate,\n message,\n framework: rawFramework\n } = options as typeof defaults\n\n const mode = rawMode as string\n const framework = rawFramework as string\n\n const onlyValidateJSX = [ 'jsx-only', 'jsx-text-only' ].includes(mode)\n const onlyValidateVueTemplate = framework === 'vue' && mode === 'vue-template-only'\n\n const indicatorStack: boolean[] = []\n\n function endIndicator(): void {\n indicatorStack.pop()\n }\n\n function isValidScope(): boolean {\n return indicatorStack.some(Boolean)\n }\n\n function report(node: Node): void {\n context.report({\n node,\n messageId: 'literal',\n data: {\n message,\n parent: getText(context, node.parent ?? node)\n }\n })\n }\n\n const { esTreeNodeToTSNodeMap, program } = (parserServices as {\n esTreeNodeToTSNodeMap?: Map<Node, unknown>\n program?: { getTypeChecker(): { getContextualType(node: unknown): ContextualType | null } }\n } | undefined) ?? {}\n\n interface ContextualType {\n isStringLiteral(): boolean\n isUnion(): boolean\n types: Array<{ isStringLiteral(): boolean; value: unknown }>\n }\n\n let typeChecker: ReturnType<NonNullable<typeof program>['getTypeChecker']> | undefined\n if (program && esTreeNodeToTSNodeMap) {\n typeChecker = program.getTypeChecker()\n }\n\n function validateBeforeReport(node: Node & { value: unknown }): void {\n if (isValidScope()) {\n return\n }\n\n if (isValidLiteral(options as Options, node)) {\n return\n }\n\n if (typeChecker) {\n const tsNode = esTreeNodeToTSNodeMap?.get(node)\n if (tsNode !== undefined) {\n const typeObj = typeChecker.getContextualType(tsNode)\n if (typeObj) {\n if (typeObj.isStringLiteral()) {\n return\n }\n\n if (typeObj.isUnion()) {\n const found = typeObj.types.some(item => item.isStringLiteral() && item.value === node.value)\n if (found) {\n return\n }\n }\n }\n }\n }\n\n report(node)\n }\n\n function filterOutJSX(node: Node): boolean {\n if (!onlyValidateJSX) {\n return false\n }\n\n const isInsideJSX = getAncestors(context, node).some(item => [ 'JSXElement', 'JSXFragment' ].includes(item.type))\n\n if (!isInsideJSX) {\n return true\n }\n\n if (\n mode === 'jsx-text-only'\n && ![ 'JSXElement', 'JSXFragment' ].includes(node.parent?.type ?? '')\n ) {\n return true\n }\n\n return false\n }\n\n const scriptVisitor: Rule.RuleListener = {\n ImportExpression() {\n indicatorStack.push(true)\n },\n 'ImportExpression:exit': endIndicator,\n\n ImportDeclaration() {\n indicatorStack.push(true)\n },\n 'ImportDeclaration:exit': endIndicator,\n\n ExportAllDeclaration() {\n indicatorStack.push(true)\n },\n 'ExportAllDeclaration:exit': endIndicator,\n\n 'ExportNamedDeclaration[source]'() {\n indicatorStack.push(true)\n },\n 'ExportNamedDeclaration[source]:exit': endIndicator,\n\n JSXElement(node: Node) {\n const element = node as unknown as JSXElementNode\n const fullComponentName = getText(context, element.openingElement.name as unknown as Node)\n const componentOptions = (options['jsx-components'] as SkipPatterns | undefined) ?? {}\n indicatorStack.push(\n shouldSkip(\n {\n include: withDottedPrefix(componentOptions.include),\n exclude: withDottedPrefix(componentOptions.exclude)\n },\n fullComponentName\n )\n )\n },\n 'JSXElement:exit': endIndicator,\n\n JSXAttribute(node: Node) {\n const attribute = node as unknown as JSXAttributeNode\n const attrName = attribute.name.name\n\n const jsxAttributes = (options['jsx-attributes'] as SkipPatterns | undefined) ?? {}\n if (shouldSkip(jsxAttributes, attrName)) {\n indicatorStack.push(true)\n\n return\n }\n\n const jsxElement = getNearestAncestor(node, 'JSXOpeningElement') as unknown as JSXOpeningElementNode\n const tagName = (jsxElement.name as JSXIdentifierNode).name\n if (isAllowedDOMAttr(tagName, attrName)) {\n indicatorStack.push(true)\n\n return\n }\n\n indicatorStack.push(false)\n },\n 'JSXAttribute:exit': endIndicator,\n\n JSXText(node: Node) {\n validateBeforeReport(node as Node & { value: unknown })\n },\n\n VElement(node: Node) {\n const element = node as unknown as VElementNode\n const componentOptions = (options['jsx-components'] as SkipPatterns | undefined) ?? {}\n indicatorStack.push(\n shouldSkip(\n {\n include: withDottedPrefix(componentOptions.include),\n exclude: withDottedPrefix(componentOptions.exclude)\n },\n element.rawName\n )\n )\n },\n 'VElement:exit': endIndicator,\n\n VAttribute(node: Node) {\n const attribute = node as unknown as VAttributeNode\n const attrName = getAttributeName(attribute)\n const jsxAttributes = (options['jsx-attributes'] as SkipPatterns | undefined) ?? {}\n indicatorStack.push(shouldSkip(jsxAttributes, attrName ?? ''))\n },\n 'VAttribute:exit': endIndicator,\n\n TSModuleDeclaration() {\n indicatorStack.push(true)\n },\n 'TSModuleDeclaration:exit': endIndicator,\n\n TSLiteralType() {\n indicatorStack.push(true)\n },\n 'TSLiteralType:exit': endIndicator,\n\n TSEnumMember() {\n indicatorStack.push(true)\n },\n 'TSEnumMember:exit': endIndicator,\n\n PropertyDefinition(node: Node) {\n const property = node as unknown as { key: { name?: string } }\n const classProperties = (options['class-properties'] as SkipPatterns | undefined) ?? {}\n indicatorStack.push(property.key.name !== undefined && shouldSkip(classProperties, property.key.name))\n },\n 'PropertyDefinition:exit': endIndicator,\n\n ClassProperty(node: Node) {\n const property = node as unknown as { key: { name?: string } }\n const classProperties = (options['class-properties'] as SkipPatterns | undefined) ?? {}\n indicatorStack.push(property.key.name !== undefined && shouldSkip(classProperties, property.key.name))\n },\n 'ClassProperty:exit': endIndicator,\n\n VariableDeclarator(node: Node) {\n const declarator = node as unknown as { id: { name?: string; type: string } }\n indicatorStack.push(declarator.id.type === 'Identifier' && isUpperCase(declarator.id.name ?? ''))\n },\n 'VariableDeclarator:exit': endIndicator,\n\n Property(node: Node) {\n const property = node as unknown as { key: { name?: string; value?: unknown } }\n const objectProperties = (options['object-properties'] as SkipPatterns | undefined) ?? {}\n indicatorStack.push(\n shouldSkip(objectProperties, property.key.name ?? (property.key.value as string | undefined) ?? '')\n )\n },\n 'Property:exit': endIndicator,\n\n BinaryExpression(node: Node) {\n const expression = node as unknown as { operator: string }\n indicatorStack.push(expression.operator !== '+')\n },\n 'BinaryExpression:exit': endIndicator,\n\n AssignmentPattern() {\n indicatorStack.push(true)\n },\n 'AssignmentPattern:exit': endIndicator,\n\n NewExpression(node: Node) {\n indicatorStack.push(isValidFunctionCall(context, options as Options, { callee: resolveCallee(node) }))\n },\n 'NewExpression:exit': endIndicator,\n\n CallExpression(node: Node) {\n indicatorStack.push(isValidFunctionCall(context, options as Options, { callee: resolveCallee(node) }))\n },\n 'CallExpression:exit': endIndicator,\n\n TaggedTemplateExpression(node: Node) {\n indicatorStack.push(isValidFunctionCall(context, options as Options, { callee: resolveCallee(node) }))\n },\n 'TaggedTemplateExpression:exit': endIndicator,\n\n 'AssignmentExpression[left.type=\"MemberExpression\"]'(node: Node) {\n const expression = node as unknown as { left: { property: { name?: string } } }\n const objectProperties = (options['object-properties'] as SkipPatterns | undefined) ?? {}\n indicatorStack.push(shouldSkip(objectProperties, expression.left.property.name ?? ''))\n },\n 'AssignmentExpression[left.type=\"MemberExpression\"]:exit': endIndicator,\n\n TemplateLiteral(node: Node) {\n if (!validateTemplate) {\n return\n }\n\n if (framework === 'react' && filterOutJSX(node)) {\n return\n }\n\n if (isValidScope()) {\n return\n }\n\n const literal = node as unknown as { quasis: Array<{ value: { raw: string } }> }\n literal.quasis.some(({ value: { raw } }) => {\n if (isValidLiteral(options as Options, { value: raw })) {\n return false\n }\n\n report(node)\n\n return true\n })\n },\n\n Literal(node: Node) {\n const literal = node as unknown as { value: unknown; parent: { type: string; key?: Node } }\n\n if ([ 'MemberExpression', 'SwitchCase' ].includes(literal.parent.type)) {\n return\n }\n\n if (framework === 'react' && filterOutJSX(node)) {\n return\n }\n\n if (onlyValidateVueTemplate) {\n const parents = getAncestors(context, node)\n if (\n parents.length > 0\n && parents.every(\n item => ![ 'VElement', 'VAttribute', 'VText', 'VExpressionContainer' ].includes(item.type)\n )\n ) {\n return\n }\n }\n\n if (literal.parent.key === node) {\n return\n }\n\n validateBeforeReport(node as unknown as Node & { value: unknown })\n }\n }\n\n const defineTemplateBodyVisitor = (parserServices as {\n defineTemplateBodyVisitor?: DefineTemplateBodyVisitor\n } | undefined)?.defineTemplateBodyVisitor\n\n if (defineTemplateBodyVisitor) {\n const invoke = (name: string) => (node: Node) => {\n const handler = (scriptVisitor as unknown as Record<string, (node: Node) => void>)[name]\n handler?.(node)\n }\n\n return defineTemplateBodyVisitor(\n {\n VText: invoke('JSXText'),\n VLiteral: invoke('JSXText'),\n VElement: invoke('VElement'),\n 'VElement:exit': invoke('VElement:exit'),\n VAttribute: invoke('VAttribute'),\n 'VAttribute:exit': invoke('VAttribute:exit'),\n 'VExpressionContainer CallExpression': invoke('CallExpression'),\n 'VExpressionContainer CallExpression:exit': invoke('CallExpression:exit'),\n 'VExpressionContainer Literal': invoke('Literal')\n },\n scriptVisitor\n )\n }\n\n return scriptVisitor\n }\n}\n\ntype DefineTemplateBodyVisitor = (\n templateBodyVisitor: Record<string, (node: Node) => void>,\n scriptVisitor: Rule.RuleListener\n) => Rule.RuleListener\n","/*\n * Derived from eslint-plugin-i18next\n * https://github.com/edvardchen/eslint-plugin-i18next\n *\n * Copyright (c) 2019 edvardchen\n *\n * Permission to use, copy, modify, and/or distribute this software for any\n * purpose with or without fee is hereby granted, provided that the above\n * copyright notice and this permission notice appear in all copies.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES\n * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF\n * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY\n * SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES\n * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN\n * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF\n * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.\n */\n\nimport { noLiteralString } from './no-literal-string'\n\n\nexport const i18next = {\n meta: {\n name: 'i18next',\n version: '1.0.0'\n },\n rules: {\n 'no-literal-string': noLiteralString\n }\n}\n"],"mappings":";AAmBA,MAAa,WAAW;CACtB;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACF;AAEA,MAAa,WAAW;CACtB;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACF;;;AC/LA,MAAM,kBAAkB;AAExB,SAAgB,YAAY,KAAsB;CAChD,OAAO,gBAAgB,KAAK,GAAG;AACjC;AAEA,SAAS,eAAe,KAAsB;CAC5C,OAAO,SAAS,SAAS,GAAG;AAC9B;AAEA,SAAS,SAAS,KAAsB;CACtC,OAAO,SAAS,SAAS,GAAG;AAC9B;AAEA,MAAM,kCAAkB,IAAI,IAAI;CAAE;CAAe;CAAO;CAAc;CAAS;AAAQ,CAAC;AAExF,SAAgB,iBAAiB,KAAa,MAAuB;CACnE,IAAI,SAA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,IAAI,cAAc,WAAW,aAAa,IAAI,GAC5C;KAGF,IAAI,aAAa,GACf;KAIF,KAAQ,OAAO,MAAM,EAAE,OAAO,EAAE,YAAY;MAC1C,IAAI,eAAe,SAAoB,EAAE,OAAO,IAAI,CAAC,GACnD,OAAO;MAGT,OAAO,IAAI;MAEX,OAAO;KACT,CAAC;IACH;IAEA,QAAQ,MAAY;KAClB,MAAM,UAAU;KAEhB,IAAI,CAAE,oBAAoB,YAAa,CAAC,CAAC,SAAS,QAAQ,OAAO,IAAI,GACnE;KAGF,IAAI,cAAc,WAAW,aAAa,IAAI,GAC5C;KAGF,IAAI,yBAAyB;MAC3B,MAAM,UAAU,aAAa,SAAS,IAAI;MAC1C,IACE,QAAQ,SAAS,KACd,QAAQ,OACT,SAAQ,CAAC;OAAE;OAAY;OAAc;OAAS;MAAuB,CAAC,CAAC,SAAS,KAAK,IAAI,CAC3F,GAEA;KAEJ;KAEA,IAAI,QAAQ,OAAO,QAAQ,MACzB;KAGF,qBAAqB,IAA4C;IACnE;GACF;GAEA,MAAM,4BAA6B,gBAEnB;GAEhB,IAAI,2BAA2B;IAC7B,MAAM,UAAU,UAAkB,SAAe;KAC/C,MAAM,UAAW,cAAkE;KACnF,UAAU,IAAI;IAChB;IAEA,OAAO,0BACL;KACE,OAAO,OAAO,SAAS;KACvB,UAAU,OAAO,SAAS;KAC1B,UAAU,OAAO,UAAU;KAC3B,iBAAiB,OAAO,eAAe;KACvC,YAAY,OAAO,YAAY;KAC/B,mBAAmB,OAAO,iBAAiB;KAC3C,uCAAuC,OAAO,gBAAgB;KAC9D,4CAA4C,OAAO,qBAAqB;KACxE,gCAAgC,OAAO,SAAS;IAClD,GACA,aACF;GACF;GAEA,OAAO;EACT;CC3fuB,EACvB;AACF"}
@@ -6,7 +6,11 @@ function isAssignmentPattern(node) {
6
6
  return node.type === "AssignmentPattern";
7
7
  }
8
8
  function isFunctionLike(node) {
9
- return node.type === "FunctionExpression" || node.type === "FunctionDeclaration" || node.type === "ArrowFunctionExpression";
9
+ return [
10
+ "FunctionExpression",
11
+ "FunctionDeclaration",
12
+ "ArrowFunctionExpression"
13
+ ].includes(node.type);
10
14
  }
11
15
  function isNode(value) {
12
16
  return typeof value === "object" && value !== null && typeof Reflect.get(value, "type") === "string";
@@ -35,7 +39,11 @@ function isReferenceIdentifier(identifier, sourceCode) {
35
39
  if (parent.type === "Property" && parent.key === identifier) return parent.computed || parent.shorthand;
36
40
  if (parent.type === "MemberExpression" && parent.property === identifier) return parent.computed;
37
41
  if ((parent.type === "MethodDefinition" || parent.type === "PropertyDefinition") && parent.key === identifier && !parent.computed) return false;
38
- if (parent.type === "ImportSpecifier" || parent.type === "ImportDefaultSpecifier" || parent.type === "ImportNamespaceSpecifier") return false;
42
+ if ([
43
+ "ImportSpecifier",
44
+ "ImportDefaultSpecifier",
45
+ "ImportNamespaceSpecifier"
46
+ ].includes(parent.type)) return false;
39
47
  if (parent.type === "ExportSpecifier" && parent.exported === identifier) return false;
40
48
  if (parent.type === "LabeledStatement" && parent.label === identifier) return false;
41
49
  return true;
@@ -1 +1 @@
1
- {"version":3,"file":"labs.mjs","names":[],"sources":["../../src/plugin/no-self-assign.ts","../../src/plugin/index.ts"],"sourcesContent":["import type { Rule, Scope, SourceCode } from 'eslint'\n\n\n/*\n * Ported from:\n * https://github.com/DaniFoldi/bundled-lint-config/blob/main/packages/bundled-eslint-config/src/rules/no-self-assign.ts\n *\n * Includes code derived from MIT-licensed source.\n * Copyright (c) 2026 Dániel Földi\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in all\n * copies or substantial portions of the Software.\n */\n\ntype ScopeNode = Parameters<SourceCode['getScope']>[0]\ntype IdentifierNode = ScopeNode & { type: 'Identifier'; name: string }\ntype AssignmentPatternNode = ScopeNode & {\n type: 'AssignmentPattern'\n left: ScopeNode\n right: ScopeNode\n}\ntype FunctionLikeNode = ScopeNode & {\n type: 'ArrowFunctionExpression' | 'FunctionDeclaration' | 'FunctionExpression'\n params: readonly ScopeNode[]\n}\n\nfunction isIdentifier(node: { type: string } | ScopeNode): node is IdentifierNode {\n return node.type === 'Identifier'\n}\n\nfunction isAssignmentPattern(node: ScopeNode): node is AssignmentPatternNode {\n return node.type === 'AssignmentPattern'\n}\n\nfunction isFunctionLike(node: ScopeNode): node is FunctionLikeNode {\n return node.type === 'FunctionExpression'\n || node.type === 'FunctionDeclaration'\n || node.type === 'ArrowFunctionExpression'\n}\n\nfunction isNode(value: unknown): value is ScopeNode {\n return typeof value === 'object'\n && value !== null\n && typeof Reflect.get(value, 'type') === 'string'\n}\n\nfunction getProperty(value: object, key: PropertyKey): unknown {\n return Reflect.get(value, key)\n}\n\nfunction getParent(node: ScopeNode, sourceCode: SourceCode) {\n return sourceCode.getAncestors(node).at(-1)\n}\n\nfunction traverseNodes(\n node: ScopeNode,\n sourceCode: SourceCode,\n visitor: (child: ScopeNode) => void,\n shouldSkipChildren?: (child: ScopeNode) => boolean\n): void {\n visitor(node)\n\n if (shouldSkipChildren?.(node) === true) {\n return\n }\n\n const keys = sourceCode.visitorKeys[node.type] ?? []\n\n for (const key of keys) {\n const value = getProperty(node, key)\n\n if (Array.isArray(value)) {\n for (const child of value) {\n if (isNode(child)) {\n traverseNodes(child, sourceCode, visitor, shouldSkipChildren)\n }\n }\n } else if (isNode(value)) {\n traverseNodes(value, sourceCode, visitor, shouldSkipChildren)\n }\n }\n}\n\nfunction isReferenceIdentifier(identifier: IdentifierNode, sourceCode: SourceCode): boolean {\n const parent = getParent(identifier, sourceCode)\n if (!parent) {\n return true\n }\n\n if (parent.type.startsWith('TS')) {\n return false\n }\n\n if (parent.type === 'Property' && parent.key === identifier) {\n return parent.computed || parent.shorthand\n }\n\n if (parent.type === 'MemberExpression' && parent.property === identifier) {\n return parent.computed\n }\n\n if (\n (parent.type === 'MethodDefinition' || parent.type === 'PropertyDefinition')\n && parent.key === identifier\n && !parent.computed\n ) {\n return false\n }\n\n if (\n parent.type === 'ImportSpecifier'\n || parent.type === 'ImportDefaultSpecifier'\n || parent.type === 'ImportNamespaceSpecifier'\n ) {\n return false\n }\n\n if (parent.type === 'ExportSpecifier' && parent.exported === identifier) {\n return false\n }\n\n if (parent.type === 'LabeledStatement' && parent.label === identifier) {\n return false\n }\n\n return true\n}\n\nfunction findVariable(node: ScopeNode, name: string, sourceCode: SourceCode): Scope.Variable | null {\n let scope: Scope.Scope | null = sourceCode.getScope(node)\n\n while (scope) {\n const variable = scope.set.get(name)\n if (variable) {\n return variable\n }\n\n scope = scope.upper\n }\n\n return null\n}\n\nfunction isSelfReference(identifier: IdentifierNode, variable: Scope.Variable, sourceCode: SourceCode): boolean {\n if (variable.references.some(reference => reference.identifier === identifier)) {\n return true\n }\n\n let scope: Scope.Scope | null = sourceCode.getScope(identifier)\n\n while (scope) {\n const reference = scope.references.find(candidate => candidate.identifier === identifier)\n if (reference) {\n return reference.resolved === variable\n }\n\n scope = scope.upper\n }\n\n scope = sourceCode.getScope(identifier)\n\n while (scope) {\n const candidate = scope.set.get(identifier.name)\n if (candidate) {\n return candidate === variable\n }\n\n scope = scope.upper\n }\n\n for (const ancestor of sourceCode.getAncestors(identifier).toReversed()) {\n if (!isAssignmentPattern(ancestor)) {\n continue\n }\n\n if (\n isIdentifier(ancestor.left)\n && ancestor.left.name === variable.name\n && variable.defs.some(definition => definition.name === ancestor.left)\n ) {\n return true\n }\n }\n\n return false\n}\n\nfunction isUnresolvedSelfReference(identifier: IdentifierNode, name: string, sourceCode: SourceCode): boolean {\n if (identifier.name !== name) {\n return false\n }\n\n return findVariable(identifier, name, sourceCode) === null\n}\n\nfunction reportSelfReferences(\n context: Rule.RuleContext,\n sourceCode: SourceCode,\n node: ScopeNode,\n variable: Scope.Variable\n): void {\n traverseNodes(node, sourceCode, child => {\n if (!isIdentifier(child)) {\n return\n }\n\n if (!isReferenceIdentifier(child, sourceCode)) {\n return\n }\n\n if (isSelfReference(child, variable, sourceCode)) {\n context.report({\n node: child,\n messageId: 'selfRef',\n data: { name: variable.name }\n })\n }\n }, isFunctionLike)\n}\n\nfunction reportSelfReferencesByName(\n context: Rule.RuleContext,\n sourceCode: SourceCode,\n node: ScopeNode,\n name: string\n): void {\n traverseNodes(node, sourceCode, child => {\n if (!isIdentifier(child)) {\n return\n }\n\n if (!isReferenceIdentifier(child, sourceCode)) {\n return\n }\n\n if (isUnresolvedSelfReference(child, name, sourceCode)) {\n context.report({\n node: child,\n messageId: 'selfRef',\n data: { name }\n })\n }\n }, isFunctionLike)\n}\n\nfunction reportDefaultParameterSelfReferences(\n context: Rule.RuleContext,\n sourceCode: SourceCode,\n node: FunctionLikeNode\n): void {\n for (const param of node.params) {\n if (!isAssignmentPattern(param) || !isIdentifier(param.left)) {\n continue\n }\n\n const variable = findVariable(param.left, param.left.name, sourceCode)\n if (!variable) {\n continue\n }\n\n reportSelfReferences(context, sourceCode, param.right, variable)\n }\n}\n\nexport const noSelfAssign: Rule.RuleModule = {\n meta: {\n type: 'problem',\n docs: {\n description: 'Disallow self-references inside variable initializers and parameter default values'\n },\n schema: [],\n messages: {\n selfRef: 'Variable {{name}} is referenced within its own initializer.'\n }\n },\n\n create(context) {\n const sourceCode = context.sourceCode\n\n return {\n VariableDeclarator(node) {\n if (!node.init || !isIdentifier(node.id)) {\n return\n }\n\n const variable = findVariable(node, node.id.name, sourceCode)\n if (!variable) {\n return\n }\n\n reportSelfReferences(context, sourceCode, node.init, variable)\n },\n\n FunctionDeclaration(node) {\n reportDefaultParameterSelfReferences(context, sourceCode, node)\n },\n\n FunctionExpression(node) {\n reportDefaultParameterSelfReferences(context, sourceCode, node)\n },\n\n ArrowFunctionExpression(node) {\n reportDefaultParameterSelfReferences(context, sourceCode, node)\n },\n\n PropertyDefinition(node) {\n if (!node.value || !isIdentifier(node.key)) {\n return\n }\n\n reportSelfReferencesByName(context, sourceCode, node.value, node.key.name)\n }\n }\n }\n}\n","import { noSelfAssign } from './no-self-assign'\n\n\nexport const commentLabsJs = {\n meta: {\n name: 'comment-labs-js',\n version: '1.0.0'\n },\n rules: {\n 'no-self-assign': noSelfAssign\n }\n}\n"],"mappings":";AAiCA,SAAS,aAAa,MAA4D;CAChF,OAAO,KAAK,SAAS;AACvB;AAEA,SAAS,oBAAoB,MAAgD;CAC3E,OAAO,KAAK,SAAS;AACvB;AAEA,SAAS,eAAe,MAA2C;CACjE,OAAO,KAAK,SAAS,wBAChB,KAAK,SAAS,yBACd,KAAK,SAAS;AACrB;AAEA,SAAS,OAAO,OAAoC;CAClD,OAAO,OAAO,UAAU,YACnB,UAAU,QACV,OAAO,QAAQ,IAAI,OAAO,MAAM,MAAM;AAC7C;AAEA,SAAS,YAAY,OAAe,KAA2B;CAC7D,OAAO,QAAQ,IAAI,OAAO,GAAG;AAC/B;AAEA,SAAS,UAAU,MAAiB,YAAwB;CAC1D,OAAO,WAAW,aAAa,IAAI,CAAC,CAAC,GAAG,EAAE;AAC5C;AAEA,SAAS,cACP,MACA,YACA,SACA,oBACM;CACN,QAAQ,IAAI;CAEZ,IAAI,qBAAqB,IAAI,MAAM,MACjC;CAGF,MAAM,OAAO,WAAW,YAAY,KAAK,SAAS,CAAC;CAEnD,KAAK,MAAM,OAAO,MAAM;EACtB,MAAM,QAAQ,YAAY,MAAM,GAAG;EAEnC,IAAI,MAAM,QAAQ,KAAK,GAChB;QAAA,MAAM,SAAS,OAClB,IAAI,OAAO,KAAK,GACd,cAAc,OAAO,YAAY,SAAS,kBAAkB;EAAA,OAG3D,IAAI,OAAO,KAAK,GACrB,cAAc,OAAO,YAAY,SAAS,kBAAkB;CAEhE;AACF;AAEA,SAAS,sBAAsB,YAA4B,YAAiC;CAC1F,MAAM,SAAS,UAAU,YAAY,UAAU;CAC/C,IAAI,CAAC,QACH,OAAO;CAGT,IAAI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,MAAM;GACJ,MAAM;GACN,MAAM,EACJ,aAAa,qFACf;GACA,QAAQ,CAAC;GACT,UAAU,EACR,SAAS,8DACX;EACF;EAEA,OAAO,SAAS;GACd,MAAM,aAAa,QAAQ;GAE3B,OAAO;IACL,mBAAmB,MAAM;KACvB,IAAI,CAAC,KAAK,QAAQ,CAAC,aAAa,KAAK,EAAE,GACrC;KAGF,MAAM,WAAW,aAAa,MAAM,KAAK,GAAG,MAAM,UAAU;KAC5D,IAAI,CAAC,UACH;KAGF,qBAAqB,SAAS,YAAY,KAAK,MAAM,QAAQ;IAC/D;IAEA,oBAAoB,MAAM;KACxB,qCAAqC,SAAS,YAAY,IAAI;IAChE;IAEA,mBAAmB,MAAM;KACvB,qCAAqC,SAAS,YAAY,IAAI;IAChE;IAEA,wBAAwB,MAAM;KAC5B,qCAAqC,SAAS,YAAY,IAAI;IAChE;IAEA,mBAAmB,MAAM;KACvB,IAAI,CAAC,KAAK,SAAS,CAAC,aAAa,KAAK,GAAG,GACvC;KAGF,2BAA2B,SAAS,YAAY,KAAK,OAAO,KAAK,IAAI,IAAI;IAC3E;GACF;EACF;CCvToB,EACpB;AACF"}
1
+ {"version":3,"file":"labs.mjs","names":[],"sources":["../../src/plugin/no-self-assign.ts","../../src/plugin/index.ts"],"sourcesContent":["import type { Rule, Scope, SourceCode } from 'eslint'\n\n\n/*\n * Ported from:\n * https://github.com/DaniFoldi/bundled-lint-config/blob/main/packages/bundled-eslint-config/src/rules/no-self-assign.ts\n *\n * Includes code derived from MIT-licensed source.\n * Copyright (c) 2026 Dániel Földi\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in all\n * copies or substantial portions of the Software.\n */\n\ntype ScopeNode = Parameters<SourceCode['getScope']>[0]\ntype IdentifierNode = ScopeNode & { type: 'Identifier'; name: string }\ntype AssignmentPatternNode = ScopeNode & {\n type: 'AssignmentPattern'\n left: ScopeNode\n right: ScopeNode\n}\ntype FunctionLikeNode = ScopeNode & {\n type: 'ArrowFunctionExpression' | 'FunctionDeclaration' | 'FunctionExpression'\n params: readonly ScopeNode[]\n}\n\nfunction isIdentifier(node: ScopeNode | { type: string }): node is IdentifierNode {\n return node.type === 'Identifier'\n}\n\nfunction isAssignmentPattern(node: ScopeNode): node is AssignmentPatternNode {\n return node.type === 'AssignmentPattern'\n}\n\nfunction isFunctionLike(node: ScopeNode): node is FunctionLikeNode {\n return [ 'FunctionExpression', 'FunctionDeclaration', 'ArrowFunctionExpression' ].includes(node.type)\n}\n\nfunction isNode(value: unknown): value is ScopeNode {\n return typeof value === 'object'\n && value !== null\n && typeof Reflect.get(value, 'type') === 'string'\n}\n\nfunction getProperty(value: object, key: PropertyKey): unknown {\n return Reflect.get(value, key)\n}\n\nfunction getParent(node: ScopeNode, sourceCode: SourceCode) {\n return sourceCode.getAncestors(node).at(-1)\n}\n\nfunction traverseNodes(\n node: ScopeNode,\n sourceCode: SourceCode,\n visitor: (child: ScopeNode) => void,\n shouldSkipChildren?: (child: ScopeNode) => boolean\n): void {\n visitor(node)\n\n if (shouldSkipChildren?.(node) === true) {\n return\n }\n\n const keys = sourceCode.visitorKeys[node.type] ?? []\n\n for (const key of keys) {\n const value = getProperty(node, key)\n\n if (Array.isArray(value)) {\n for (const child of value) {\n if (isNode(child)) {\n traverseNodes(child, sourceCode, visitor, shouldSkipChildren)\n }\n }\n } else if (isNode(value)) {\n traverseNodes(value, sourceCode, visitor, shouldSkipChildren)\n }\n }\n}\n\nfunction isReferenceIdentifier(identifier: IdentifierNode, sourceCode: SourceCode): boolean {\n const parent = getParent(identifier, sourceCode)\n if (!parent) {\n return true\n }\n\n if (parent.type.startsWith('TS')) {\n return false\n }\n\n if (parent.type === 'Property' && parent.key === identifier) {\n return parent.computed || parent.shorthand\n }\n\n if (parent.type === 'MemberExpression' && parent.property === identifier) {\n return parent.computed\n }\n\n if (\n (parent.type === 'MethodDefinition' || parent.type === 'PropertyDefinition')\n && parent.key === identifier\n && !parent.computed\n ) {\n return false\n }\n\n if ([ 'ImportSpecifier', 'ImportDefaultSpecifier', 'ImportNamespaceSpecifier' ].includes(parent.type)) {\n return false\n }\n\n if (parent.type === 'ExportSpecifier' && parent.exported === identifier) {\n return false\n }\n\n if (parent.type === 'LabeledStatement' && parent.label === identifier) {\n return false\n }\n\n return true\n}\n\nfunction findVariable(node: ScopeNode, name: string, sourceCode: SourceCode): Scope.Variable | null {\n let scope: Scope.Scope | null = sourceCode.getScope(node)\n\n while (scope) {\n const variable = scope.set.get(name)\n if (variable) {\n return variable\n }\n\n scope = scope.upper\n }\n\n return null\n}\n\nfunction isSelfReference(identifier: IdentifierNode, variable: Scope.Variable, sourceCode: SourceCode): boolean {\n if (variable.references.some(reference => reference.identifier === identifier)) {\n return true\n }\n\n let scope: Scope.Scope | null = sourceCode.getScope(identifier)\n\n while (scope) {\n const reference = scope.references.find(candidate => candidate.identifier === identifier)\n if (reference) {\n return reference.resolved === variable\n }\n\n scope = scope.upper\n }\n\n scope = sourceCode.getScope(identifier)\n\n while (scope) {\n const candidate = scope.set.get(identifier.name)\n if (candidate) {\n return candidate === variable\n }\n\n scope = scope.upper\n }\n\n for (const ancestor of sourceCode.getAncestors(identifier).toReversed()) {\n if (!isAssignmentPattern(ancestor)) {\n continue\n }\n\n if (\n isIdentifier(ancestor.left)\n && ancestor.left.name === variable.name\n && variable.defs.some(definition => definition.name === ancestor.left)\n ) {\n return true\n }\n }\n\n return false\n}\n\nfunction isUnresolvedSelfReference(identifier: IdentifierNode, name: string, sourceCode: SourceCode): boolean {\n if (identifier.name !== name) {\n return false\n }\n\n return findVariable(identifier, name, sourceCode) === null\n}\n\nfunction reportSelfReferences(\n context: Rule.RuleContext,\n sourceCode: SourceCode,\n node: ScopeNode,\n variable: Scope.Variable\n): void {\n traverseNodes(node, sourceCode, child => {\n if (!isIdentifier(child)) {\n return\n }\n\n if (!isReferenceIdentifier(child, sourceCode)) {\n return\n }\n\n if (isSelfReference(child, variable, sourceCode)) {\n context.report({\n node: child,\n messageId: 'selfRef',\n data: { name: variable.name }\n })\n }\n }, isFunctionLike)\n}\n\nfunction reportSelfReferencesByName(\n context: Rule.RuleContext,\n sourceCode: SourceCode,\n node: ScopeNode,\n name: string\n): void {\n traverseNodes(node, sourceCode, child => {\n if (!isIdentifier(child)) {\n return\n }\n\n if (!isReferenceIdentifier(child, sourceCode)) {\n return\n }\n\n if (isUnresolvedSelfReference(child, name, sourceCode)) {\n context.report({\n node: child,\n messageId: 'selfRef',\n data: { name }\n })\n }\n }, isFunctionLike)\n}\n\nfunction reportDefaultParameterSelfReferences(\n context: Rule.RuleContext,\n sourceCode: SourceCode,\n node: FunctionLikeNode\n): void {\n for (const param of node.params) {\n if (!isAssignmentPattern(param) || !isIdentifier(param.left)) {\n continue\n }\n\n const variable = findVariable(param.left, param.left.name, sourceCode)\n if (!variable) {\n continue\n }\n\n reportSelfReferences(context, sourceCode, param.right, variable)\n }\n}\n\nexport const noSelfAssign: Rule.RuleModule = {\n meta: {\n type: 'problem',\n docs: {\n description: 'Disallow self-references inside variable initializers and parameter default values'\n },\n schema: [],\n messages: {\n selfRef: 'Variable {{name}} is referenced within its own initializer.'\n }\n },\n\n create(context) {\n const sourceCode = context.sourceCode\n\n return {\n VariableDeclarator(node) {\n if (!node.init || !isIdentifier(node.id)) {\n return\n }\n\n const variable = findVariable(node, node.id.name, sourceCode)\n if (!variable) {\n return\n }\n\n reportSelfReferences(context, sourceCode, node.init, variable)\n },\n\n FunctionDeclaration(node) {\n reportDefaultParameterSelfReferences(context, sourceCode, node)\n },\n\n FunctionExpression(node) {\n reportDefaultParameterSelfReferences(context, sourceCode, node)\n },\n\n ArrowFunctionExpression(node) {\n reportDefaultParameterSelfReferences(context, sourceCode, node)\n },\n\n PropertyDefinition(node) {\n if (!node.value || !isIdentifier(node.key)) {\n return\n }\n\n reportSelfReferencesByName(context, sourceCode, node.value, node.key.name)\n }\n }\n }\n}\n","import { noSelfAssign } from './no-self-assign'\n\n\nexport const commentLabsJs = {\n meta: {\n name: 'comment-labs-js',\n version: '1.0.0'\n },\n rules: {\n 'no-self-assign': noSelfAssign\n }\n}\n"],"mappings":";AAiCA,SAAS,aAAa,MAA4D;CAChF,OAAO,KAAK,SAAS;AACvB;AAEA,SAAS,oBAAoB,MAAgD;CAC3E,OAAO,KAAK,SAAS;AACvB;AAEA,SAAS,eAAe,MAA2C;CACjE,OAAO;EAAE;EAAsB;EAAuB;CAA0B,CAAC,CAAC,SAAS,KAAK,IAAI;AACtG;AAEA,SAAS,OAAO,OAAoC;CAClD,OAAO,OAAO,UAAU,YACnB,UAAU,QACV,OAAO,QAAQ,IAAI,OAAO,MAAM,MAAM;AAC7C;AAEA,SAAS,YAAY,OAAe,KAA2B;CAC7D,OAAO,QAAQ,IAAI,OAAO,GAAG;AAC/B;AAEA,SAAS,UAAU,MAAiB,YAAwB;CAC1D,OAAO,WAAW,aAAa,IAAI,CAAC,CAAC,GAAG,EAAE;AAC5C;AAEA,SAAS,cACP,MACA,YACA,SACA,oBACM;CACN,QAAQ,IAAI;CAEZ,IAAI,qBAAqB,IAAI,MAAM,MACjC;CAGF,MAAM,OAAO,WAAW,YAAY,KAAK,SAAS,CAAC;CAEnD,KAAK,MAAM,OAAO,MAAM;EACtB,MAAM,QAAQ,YAAY,MAAM,GAAG;EAEnC,IAAI,MAAM,QAAQ,KAAK,GAChB;QAAA,MAAM,SAAS,OAClB,IAAI,OAAO,KAAK,GACd,cAAc,OAAO,YAAY,SAAS,kBAAkB;EAAA,OAG3D,IAAI,OAAO,KAAK,GACrB,cAAc,OAAO,YAAY,SAAS,kBAAkB;CAEhE;AACF;AAEA,SAAS,sBAAsB,YAA4B,YAAiC;CAC1F,MAAM,SAAS,UAAU,YAAY,UAAU;CAC/C,IAAI,C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X;CACA,OAAO,EACL,kBAAkB;EDiQpB,MAAM;GACJ,MAAM;GACN,MAAM,EACJ,aAAa,qFACf;GACA,QAAQ,CAAC;GACT,UAAU,EACR,SAAS,8DACX;EACF;EAEA,OAAO,SAAS;GACd,MAAM,aAAa,QAAQ;GAE3B,OAAO;IACL,mBAAmB,MAAM;KACvB,IAAI,CAAC,KAAK,QAAQ,CAAC,aAAa,KAAK,EAAE,GACrC;KAGF,MAAM,WAAW,aAAa,MAAM,KAAK,GAAG,MAAM,UAAU;KAC5D,IAAI,CAAC,UACH;KAGF,qBAAqB,SAAS,YAAY,KAAK,MAAM,QAAQ;IAC/D;IAEA,oBAAoB,MAAM;KACxB,qCAAqC,SAAS,YAAY,IAAI;IAChE;IAEA,mBAAmB,MAAM;KACvB,qCAAqC,SAAS,YAAY,IAAI;IAChE;IAEA,wBAAwB,MAAM;KAC5B,qCAAqC,SAAS,YAAY,IAAI;IAChE;IAEA,mBAAmB,MAAM;KACvB,IAAI,CAAC,KAAK,SAAS,CAAC,aAAa,KAAK,GAAG,GACvC;KAGF,2BAA2B,SAAS,YAAY,KAAK,OAAO,KAAK,IAAI,IAAI;IAC3E;GACF;EACF;CCjToB,EACpB;AACF"}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$schema": "https://json.schemastore.org/package.json",
3
3
  "name": "@comment-labs/oxlint-config",
4
- "version": "1.0.0",
4
+ "version": "1.0.2",
5
5
  "description": "Oxlint configuration for comment-labs projects",
6
6
  "license": "Apache-2.0",
7
7
  "type": "module",
@@ -16,34 +16,34 @@
16
16
  },
17
17
  "dependencies": {
18
18
  "@brettz9/eslint-plugin": "^3.0.0",
19
- "@e18e/eslint-plugin": "^0.8.0",
19
+ "@e18e/eslint-plugin": "^0.8.1",
20
20
  "@stylistic/eslint-plugin": "^5.10.0",
21
- "empathic": "^2.0.1",
21
+ "empathic": "^2.1.0",
22
22
  "eslint-plugin-import-zod": "^1.2.1",
23
- "eslint-plugin-jsdoc": "^64.2.1",
24
- "eslint-plugin-playwright": "^2.11.0",
23
+ "eslint-plugin-jsdoc": "^64.5.4",
24
+ "eslint-plugin-playwright": "^2.12.0",
25
25
  "eslint-plugin-react-hooks": "^7.1.1",
26
26
  "eslint-plugin-react-native": "^5.0.0",
27
- "eslint-plugin-react-refresh": "^0.5.4",
28
- "eslint-plugin-regexp": "^3.2.0",
27
+ "eslint-plugin-react-refresh": "^0.5.7",
28
+ "eslint-plugin-regexp": "^3.3.1",
29
29
  "eslint-plugin-security": "^4.0.1",
30
- "eslint-plugin-unicorn": "^64.0.0",
31
- "globals": "^17.11.0"
30
+ "eslint-plugin-unicorn": "^74.0.0",
31
+ "globals": "^17.12.0"
32
32
  },
33
33
  "devDependencies": {
34
+ "@comment-labs/tsconfig": "1.0.0-beta.8",
34
35
  "@types/eslint-plugin-security": "3.0.1",
35
36
  "@types/node": "25.9.5",
36
- "eslint": "10.8.1",
37
- "oxlint": "1.77.0",
38
- "oxlint-tsgolint": "7.0.2001",
37
+ "eslint": "10.11.0",
38
+ "oxlint": "1.83.0",
39
+ "oxlint-tsgolint": "7.0.2002",
39
40
  "tsdown": "0.22.14",
40
41
  "typescript": "npm:typescript-native-bridge@6.0.3-bridge.12.tsgo.7.0.2",
41
- "vitest": "4.1.10",
42
- "@comment-labs/tsconfig": "1.0.0-beta.6"
42
+ "vitest": "4.1.11"
43
43
  },
44
44
  "peerDependencies": {
45
- "oxlint": "^1.78.0",
46
- "oxlint-tsgolint": "^7.0.2001"
45
+ "oxlint": "^1.83.0",
46
+ "oxlint-tsgolint": "^7.0.2002"
47
47
  },
48
48
  "publishConfig": {
49
49
  "access": "public"