@comment-labs/oxlint-config 1.0.7 → 1.0.8
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 +61 -19
- package/dist/index.mjs.map +1 -1
- package/dist/plugins/{import-zod.d.mts → anti-slop.d.mts} +1 -1
- package/dist/plugins/anti-slop.mjs +7 -0
- package/dist/plugins/anti-slop.mjs.map +1 -0
- package/dist/plugins/i18next.mjs +1 -1
- package/dist/plugins/i18next.mjs.map +1 -1
- package/dist/plugins/labs.mjs.map +1 -1
- package/dist/plugins/zod.d.mts +4 -0
- package/dist/plugins/zod.mjs +7 -0
- package/dist/plugins/zod.mjs.map +1 -0
- package/package.json +4 -3
- package/dist/plugins/import-zod.mjs +0 -7
- package/dist/plugins/import-zod.mjs.map +0 -1
package/dist/index.mjs
CHANGED
|
@@ -149,7 +149,49 @@ const baseRules = {
|
|
|
149
149
|
"brettz9-js/no-use-ignored-vars": "warn",
|
|
150
150
|
"brettz9-js/no-useless-rest-spread": "warn",
|
|
151
151
|
"brettz9-js/prefer-for-of": "off",
|
|
152
|
-
"
|
|
152
|
+
"zod/consistent-import": "error",
|
|
153
|
+
"zod/consistent-schema-output-type-style": "warn",
|
|
154
|
+
"zod/consistent-schema-var-name": ["error", {
|
|
155
|
+
before: "z",
|
|
156
|
+
after: ""
|
|
157
|
+
}],
|
|
158
|
+
"zod/no-any-schema": "error",
|
|
159
|
+
"zod/no-coerce-boolean": "error",
|
|
160
|
+
"zod/no-conflicting-checks": "error",
|
|
161
|
+
"zod/no-duplicate-schema-methods": "error",
|
|
162
|
+
"zod/no-empty-custom-schema": "error",
|
|
163
|
+
"zod/no-function-scoped-schema": "error",
|
|
164
|
+
"zod/no-native-enum": "error",
|
|
165
|
+
"zod/no-number-schema-with-finite": "error",
|
|
166
|
+
"zod/no-number-schema-with-int": "error",
|
|
167
|
+
"zod/no-number-schema-with-is-finite": "error",
|
|
168
|
+
"zod/no-number-schema-with-is-int": "error",
|
|
169
|
+
"zod/no-number-schema-with-safe": "error",
|
|
170
|
+
"zod/no-number-schema-with-step": "error",
|
|
171
|
+
"zod/no-optional-and-default-together": "error",
|
|
172
|
+
"zod/no-promise-schema": "error",
|
|
173
|
+
"zod/no-reshape-on-refined-object": "error",
|
|
174
|
+
"zod/no-schema-with-is-nullable": "error",
|
|
175
|
+
"zod/no-schema-with-is-optional": "error",
|
|
176
|
+
"zod/no-throw-in-refine": "error",
|
|
177
|
+
"zod/no-transform-in-record-key": "error",
|
|
178
|
+
"zod/no-unnecessary-readonly": "error",
|
|
179
|
+
"zod/prefer-map-set-size-over-min-max": "error",
|
|
180
|
+
"zod/prefer-meta": "error",
|
|
181
|
+
"zod/prefer-nullish": "error",
|
|
182
|
+
"zod/prefer-string-length-over-min-max": "error",
|
|
183
|
+
"zod/prefer-string-schema-with-trim": "error",
|
|
184
|
+
"zod/prefer-top-level-string-formats": "error",
|
|
185
|
+
"zod/prefer-trim-before-string-length-checks": "error",
|
|
186
|
+
"zod/prefer-tuple-over-array-length": "error",
|
|
187
|
+
"zod/require-brand-type-parameter": "error",
|
|
188
|
+
"zod/require-error-message": "error",
|
|
189
|
+
"anti-slop/no-chained-type-assertions": "error",
|
|
190
|
+
"anti-slop/no-unnecessary-type-widening": "error",
|
|
191
|
+
"anti-slop/no-object-parameters": "error",
|
|
192
|
+
"anti-slop/no-meaningless-unknown-aliases": "error",
|
|
193
|
+
"anti-slop/no-unsafe-dictionary-values": "error",
|
|
194
|
+
"anti-slop/no-narrowing-after-widening": "error",
|
|
153
195
|
"security-js/detect-unsafe-regex": "error",
|
|
154
196
|
"security-js/detect-non-literal-regexp": "error",
|
|
155
197
|
"security-js/detect-non-literal-require": "off",
|
|
@@ -331,6 +373,18 @@ const baseRules = {
|
|
|
331
373
|
const stylisticRules = {
|
|
332
374
|
"stylistic-js/type-generic-spacing": "warn",
|
|
333
375
|
"stylistic-js/type-named-tuple-spacing": "warn",
|
|
376
|
+
"stylistic-js/list-style": ["warn", {
|
|
377
|
+
empty: "never",
|
|
378
|
+
singleLine: { spacing: "never" },
|
|
379
|
+
overrides: {
|
|
380
|
+
ArrayExpression: { singleLine: { spacing: "always" } },
|
|
381
|
+
ArrayPattern: { singleLine: { spacing: "always" } },
|
|
382
|
+
ObjectExpression: { singleLine: { spacing: "always" } },
|
|
383
|
+
ObjectPattern: { singleLine: { spacing: "always" } },
|
|
384
|
+
ImportDeclaration: { singleLine: { spacing: "always" } },
|
|
385
|
+
ExportNamedDeclaration: { singleLine: { spacing: "always" } }
|
|
386
|
+
}
|
|
387
|
+
}],
|
|
334
388
|
"stylistic-js/function-call-spacing": ["warn", "never"],
|
|
335
389
|
"stylistic-js/semi": ["warn", "never"],
|
|
336
390
|
"stylistic-js/space-before-blocks": "warn",
|
|
@@ -375,15 +429,6 @@ const stylisticRules = {
|
|
|
375
429
|
],
|
|
376
430
|
"stylistic-js/template-curly-spacing": ["warn", "never"],
|
|
377
431
|
"stylistic-js/template-tag-spacing": "warn",
|
|
378
|
-
"stylistic-js/array-bracket-newline": ["warn", { "multiline": true }],
|
|
379
|
-
"stylistic-js/array-bracket-spacing": [
|
|
380
|
-
"warn",
|
|
381
|
-
"always",
|
|
382
|
-
{
|
|
383
|
-
"arraysInArrays": false,
|
|
384
|
-
"objectsInArrays": false
|
|
385
|
-
}
|
|
386
|
-
],
|
|
387
432
|
"stylistic-js/arrow-parens": ["warn", "as-needed"],
|
|
388
433
|
"stylistic-js/arrow-spacing": "warn",
|
|
389
434
|
"stylistic-js/block-spacing": ["warn", "always"],
|
|
@@ -396,8 +441,6 @@ const stylisticRules = {
|
|
|
396
441
|
"stylistic-js/comma-style": ["warn", "last"],
|
|
397
442
|
"stylistic-js/dot-location": ["warn", "property"],
|
|
398
443
|
"stylistic-js/eol-last": ["warn", "always"],
|
|
399
|
-
"stylistic-js/function-call-argument-newline": ["warn", "consistent"],
|
|
400
|
-
"stylistic-js/function-paren-newline": ["warn", "multiline-arguments"],
|
|
401
444
|
"stylistic-js/indent": [
|
|
402
445
|
"warn",
|
|
403
446
|
2,
|
|
@@ -465,11 +508,6 @@ const stylisticRules = {
|
|
|
465
508
|
"stylistic-js/no-tabs": "warn",
|
|
466
509
|
"stylistic-js/no-trailing-spaces": "warn",
|
|
467
510
|
"stylistic-js/no-whitespace-before-property": "warn",
|
|
468
|
-
"stylistic-js/object-curly-newline": ["warn", {
|
|
469
|
-
"ExportDeclaration": { "multiline": true },
|
|
470
|
-
"ImportDeclaration": { "multiline": true }
|
|
471
|
-
}],
|
|
472
|
-
"stylistic-js/object-curly-spacing": ["warn", "always"],
|
|
473
511
|
"stylistic-js/operator-linebreak": ["warn", "before"],
|
|
474
512
|
"stylistic-js/padding-line-between-statements": [
|
|
475
513
|
"warn",
|
|
@@ -654,6 +692,10 @@ const jsPlugins = [
|
|
|
654
692
|
name: "comment-labs-js",
|
|
655
693
|
specifier: "@comment-labs/oxlint-config/plugins/labs"
|
|
656
694
|
},
|
|
695
|
+
{
|
|
696
|
+
name: "anti-slop",
|
|
697
|
+
specifier: "@comment-labs/oxlint-config/plugins/anti-slop"
|
|
698
|
+
},
|
|
657
699
|
{
|
|
658
700
|
name: "brettz9-js",
|
|
659
701
|
specifier: "@comment-labs/oxlint-config/plugins/brettz9"
|
|
@@ -663,8 +705,8 @@ const jsPlugins = [
|
|
|
663
705
|
specifier: "@comment-labs/oxlint-config/plugins/i18next"
|
|
664
706
|
},
|
|
665
707
|
{
|
|
666
|
-
name: "
|
|
667
|
-
specifier: "@comment-labs/oxlint-config/plugins/
|
|
708
|
+
name: "zod",
|
|
709
|
+
specifier: "@comment-labs/oxlint-config/plugins/zod"
|
|
668
710
|
},
|
|
669
711
|
{
|
|
670
712
|
name: "playwright-js",
|
package/dist/index.mjs.map
CHANGED
|
@@ -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/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-in-loop': 'off',\n 'no-bitwise': 'off',\n 'new-cap': 'off',\n 'no-async-endpoint-handlers': '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 'react/jsx-no-literals': 'off',\n 'jsx-a11y/label-has-associated-control': [ 'error', { controlComponents: [ 'RadioGroupItem' ] }],\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/no-array-reverse': 'off',\n 'unicorn/switch-case-braces': [ 'warn', 'avoid' ],\n 'unicorn/no-array-method-this-argument': 'warn',\n 'unicorn/no-await-expression-member': 'off',\n 'unicorn/no-invalid-fetch-options': 'off',\n 'unicorn/require-post-message-target-origin': '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': 'off',\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 'react/jsx-no-literals': '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 'no-redeclare': 'off',\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 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/max-expects': 'off',\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 { 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 i18nextOverrides,\n playwrightOverrides,\n reactOverrides,\n reactNativeOverrides,\n scriptsOverrides,\n vitestOverrides\n ],\n ignorePatterns: [ 'coverage/**', 'public/**', '.expo/**', '.output/**', '**/dist/**', '**/*wasm-bindgen/**', '**/tests/fixtures/**/*' ]\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,oBAAoB;CACpB,cAAc;CACd,WAAW;CACX,8BAA8B;CAC9B,cAAc;CACd,eAAe;CACf,qBAAqB;CACrB,uBAAuB;CACvB,sBAAsB;CACtB,oBAAo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WAAW,CAAE,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,M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A,gBAAgB;EAAE;EAAe;EAAa;EAAY;EAAc;EAAc;EAAuB;CAAyB;AACxI"}
|
|
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/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-in-loop': 'off',\n 'no-bitwise': 'off',\n 'new-cap': 'off',\n 'no-async-endpoint-handlers': '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 'react/jsx-no-literals': 'off',\n 'jsx-a11y/label-has-associated-control': [ 'error', { controlComponents: [ 'RadioGroupItem' ] } ],\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/no-array-reverse': 'off',\n 'unicorn/switch-case-braces': [ 'warn', 'avoid' ],\n 'unicorn/no-array-method-this-argument': 'warn',\n 'unicorn/no-await-expression-member': 'off',\n 'unicorn/no-invalid-fetch-options': 'off',\n 'unicorn/require-post-message-target-origin': 'off',\n 'unicorn/import-style': [\n 'warn',\n {\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 {\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 'zod/consistent-import': 'error',\n 'zod/consistent-schema-output-type-style': 'warn',\n 'zod/consistent-schema-var-name': [ 'error', { before: 'z', after: '' } ],\n 'zod/no-any-schema': 'error',\n 'zod/no-coerce-boolean': 'error',\n 'zod/no-conflicting-checks': 'error',\n 'zod/no-duplicate-schema-methods': 'error',\n 'zod/no-empty-custom-schema': 'error',\n 'zod/no-function-scoped-schema': 'error',\n 'zod/no-native-enum': 'error',\n 'zod/no-number-schema-with-finite': 'error',\n 'zod/no-number-schema-with-int': 'error',\n 'zod/no-number-schema-with-is-finite': 'error',\n 'zod/no-number-schema-with-is-int': 'error',\n 'zod/no-number-schema-with-safe': 'error',\n 'zod/no-number-schema-with-step': 'error',\n 'zod/no-optional-and-default-together': 'error',\n 'zod/no-promise-schema': 'error',\n 'zod/no-reshape-on-refined-object': 'error',\n 'zod/no-schema-with-is-nullable': 'error',\n 'zod/no-schema-with-is-optional': 'error',\n 'zod/no-throw-in-refine': 'error',\n 'zod/no-transform-in-record-key': 'error',\n 'zod/no-unnecessary-readonly': 'error',\n 'zod/prefer-map-set-size-over-min-max': 'error',\n 'zod/prefer-meta': 'error',\n 'zod/prefer-nullish': 'error',\n 'zod/prefer-string-length-over-min-max': 'error',\n 'zod/prefer-string-schema-with-trim': 'error',\n 'zod/prefer-top-level-string-formats': 'error',\n 'zod/prefer-trim-before-string-length-checks': 'error',\n 'zod/prefer-tuple-over-array-length': 'error',\n 'zod/require-brand-type-parameter': 'error',\n 'zod/require-error-message': 'error',\n\n 'anti-slop/no-chained-type-assertions': 'error',\n 'anti-slop/no-unnecessary-type-widening': 'error',\n 'anti-slop/no-object-parameters': 'error',\n 'anti-slop/no-meaningless-unknown-aliases': 'error',\n 'anti-slop/no-unsafe-dictionary-values': 'error',\n 'anti-slop/no-narrowing-after-widening': 'error',\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': 'off',\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/list-style': [\n 'warn',\n {\n empty: 'never',\n singleLine: { spacing: 'never' },\n overrides: {\n ArrayExpression: {\n singleLine: { spacing: 'always' }\n },\n ArrayPattern: {\n singleLine: { spacing: 'always' }\n },\n ObjectExpression: {\n singleLine: { spacing: 'always' }\n },\n ObjectPattern: {\n singleLine: { spacing: 'always' }\n },\n ImportDeclaration: {\n singleLine: { spacing: 'always' }\n },\n ExportNamedDeclaration: {\n singleLine: { spacing: 'always' }\n }\n }\n }\n ],\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 {\n after: true,\n before: true,\n overrides: { colon: { after: true, before: false } }\n }\n ],\n 'stylistic-js/member-delimiter-style': [\n 'warn',\n {\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/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/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 {\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/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: 'anti-slop', specifier: '@comment-labs/oxlint-config/plugins/anti-slop' },\n { name: 'brettz9-js', specifier: '@comment-labs/oxlint-config/plugins/brettz9' },\n { name: 'i18next-js', specifier: '@comment-labs/oxlint-config/plugins/i18next' },\n { name: 'zod', specifier: '@comment-labs/oxlint-config/plugins/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 'react/jsx-no-literals': '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 'no-redeclare': 'off',\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 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/max-expects': 'off',\n 'vitest/prefer-expect-assertions': [\n 'warn',\n {\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 { 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 i18nextOverrides,\n playwrightOverrides,\n reactOverrides,\n reactNativeOverrides,\n scriptsOverrides,\n vitestOverrides\n ],\n ignorePatterns: [ 'coverage/**', 'public/**', '.expo/**', '.output/**', '**/dist/**', '**/*wasm-bindgen/**', '**/tests/fixtures/**/*' ]\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,CAAE;CACpC,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,CAAE;CACxC,qBAAqB;CACrB,iCAAiC;CACjC,mBAAmB;CACnB,iBAAiB;CACjB,kBAAkB;CAClB,oBAAoB;CACpB,cAAc;CACd,WAAW;CACX,8BAA8B;CAC9B,cAAc;CACd,eAAe;CACf,qBAAqB;CACrB,uBAA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AAG,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,gBAAgB;EAChB,iCAAiC;EACjC,mCAAmC;CACrC;AACF;;ACPA,MAAa,kBAAkC;CAC7C,OAAO,CACL,wDACA,kDACF;CACA,OAAO;EACL,sBAAsB;EACtB,mCAAmC,CACjC,QACA;GACE,mCAAmC;GACnC,+BAA+B;EACjC,CACF;EACA,uBAAuB;CACzB;AACF;;ACHA,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;EAAuB;CAAyB;AACxI"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { t as sanitizePlugin } from "../sanitize-plugin-DZgftcJx.mjs";
|
|
2
|
+
import antiSlop from "oxlint-anti-slop";
|
|
3
|
+
// src/plugins/anti-slop.ts
|
|
4
|
+
var anti_slop_default = sanitizePlugin(antiSlop);
|
|
5
|
+
export { anti_slop_default as default };
|
|
6
|
+
|
|
7
|
+
//# sourceMappingURL=anti-slop.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"anti-slop.mjs","names":[],"sources":["../../src/plugins/anti-slop.ts"],"sourcesContent":["import antiSlop from 'oxlint-anti-slop'\nimport { sanitizePlugin } from '../sanitize-plugin'\n\n\nexport default sanitizePlugin(antiSlop)\n"],"mappings":";;;AAIA,IAAA,oBAAe,eAAe,QAAQ"}
|
package/dist/plugins/i18next.mjs
CHANGED
|
@@ -871,7 +871,7 @@ const i18next = {
|
|
|
871
871
|
if (defineTemplateBodyVisitor) {
|
|
872
872
|
const invoke = (name) => (node) => {
|
|
873
873
|
const handler = scriptVisitor[name];
|
|
874
|
-
handler
|
|
874
|
+
handler(node);
|
|
875
875
|
};
|
|
876
876
|
return defineTemplateBodyVisitor({
|
|
877
877
|
VText: invoke("JSXText"),
|
|
@@ -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 = 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,SAAS,GAAG,GACd,OAAO;CAGT,IAAI,eAAe,GAAG,GACpB,OAAO,CAAC,gBAAgB,IAAI,IAAI;CAGlC,OAAO;AACT;AAEA,SAAgB,wBAA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I,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"}
|
|
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 = {\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\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 // ESLint 8 exposed getSourceCode() on context; ESLint 9 moved it to sourceCode.\n // oxlint-disable-next-line anti-slop/no-chained-type-assertions\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 // Parser services are supplied by parser integrations, outside ESLint's Context type.\n // oxlint-disable-next-line anti-slop/no-chained-type-assertions\n const parserServices = (context as unknown as { parserServices?: unknown }).parserServices\n // ESLint 9 exposes parser services on sourceCode instead of context.\n // oxlint-disable-next-line anti-slop/no-chained-type-assertions\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, 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 // JSX nodes are added by the parser and are not represented in Rule.Node.\n // oxlint-disable-next-line anti-slop/no-chained-type-assertions\n const element = node as unknown as JSXElementNode\n // oxlint-disable-next-line anti-slop/no-chained-type-assertions\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 // JSX nodes are added by the parser and are not represented in Rule.Node.\n // oxlint-disable-next-line anti-slop/no-chained-type-assertions\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 // The ancestor helper returns generic ESLint nodes; this visitor requires JSX parser nodes.\n // oxlint-disable-next-line anti-slop/no-chained-type-assertions\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 // Vue template nodes are parser extensions to the ESLint node model.\n // oxlint-disable-next-line anti-slop/no-chained-type-assertions\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 // Vue template nodes are parser extensions to the ESLint node model.\n // oxlint-disable-next-line anti-slop/no-chained-type-assertions\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 // Listener nodes are typed as the broad Rule.Node union; narrow to this event's shape.\n // oxlint-disable-next-line anti-slop/no-chained-type-assertions\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 // Listener nodes are typed as the broad Rule.Node union; narrow to this event's shape.\n // oxlint-disable-next-line anti-slop/no-chained-type-assertions\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 // Listener nodes are typed as the broad Rule.Node union; narrow to this event's shape.\n // oxlint-disable-next-line anti-slop/no-chained-type-assertions\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 // Listener nodes are typed as the broad Rule.Node union; narrow to this event's shape.\n // oxlint-disable-next-line anti-slop/no-chained-type-assertions\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 // Listener nodes are typed as the broad Rule.Node union; narrow to this event's shape.\n // oxlint-disable-next-line anti-slop/no-chained-type-assertions\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, { callee: resolveCallee(node) }))\n },\n 'NewExpression:exit': endIndicator,\n\n CallExpression(node: Node) {\n indicatorStack.push(isValidFunctionCall(context, options, { callee: resolveCallee(node) }))\n },\n 'CallExpression:exit': endIndicator,\n\n TaggedTemplateExpression(node: Node) {\n indicatorStack.push(isValidFunctionCall(context, options, { callee: resolveCallee(node) }))\n },\n 'TaggedTemplateExpression:exit': endIndicator,\n\n 'AssignmentExpression[left.type=\"MemberExpression\"]'(node: Node) {\n // The selector guarantees MemberExpression on the left, but Rule.Node omits that selector refinement.\n // oxlint-disable-next-line anti-slop/no-chained-type-assertions\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 // Listener nodes are typed as the broad Rule.Node union; narrow to TemplateLiteral's shape.\n // oxlint-disable-next-line anti-slop/no-chained-type-assertions\n const literal = node as unknown as { quasis: Array<{ value: { raw: string } }> }\n literal.quasis.some(({ value: { raw } }) => {\n if (isValidLiteral(options, { value: raw })) {\n return false\n }\n\n report(node)\n\n return true\n })\n },\n\n Literal(node: Node) {\n // Listener nodes are typed as the broad Rule.Node union; narrow to Literal's shape.\n // oxlint-disable-next-line anti-slop/no-chained-type-assertions\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 // Literal's value field is not present on the base Rule.Node type.\n // oxlint-disable-next-line anti-slop/no-chained-type-assertions\n validateBeforeReport(node as unknown as Node & { value: unknown })\n }\n }\n\n // Parser-specific API is not declared by ESLint's parserServices type.\n const defineTemplateBodyVisitor = (parserServices as ParserServices | undefined)?.defineTemplateBodyVisitor\n\n if (defineTemplateBodyVisitor) {\n const invoke = (name: TemplateVisitorName) => (node: Node) => {\n // Listener entries have event-specific parameter types; the template API supplies the matching node.\n // oxlint-disable-next-line anti-slop/no-chained-type-assertions\n const handler = scriptVisitor[name] as unknown as (node: Node) => void\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\ntype ParserServices = {\n defineTemplateBodyVisitor?: DefineTemplateBodyVisitor\n}\n\ntype TemplateVisitorName =\n | 'JSXText'\n | 'VElement'\n | 'VElement:exit'\n | 'VAttribute'\n | 'VAttribute:exit'\n | 'CallExpression'\n | 'CallExpression:exit'\n | 'Literal'\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;C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OAAE;OAAY;OAAc;OAAS;MAAuB,CAAC,CAAC,SAAS,KAAK,IAAI,CAC3F,GAEA;KAEJ;KAEA,IAAI,QAAQ,OAAO,QAAQ,MACzB;KAKF,qBAAqB,IAA4C;IACnE;GACF;GAGA,MAAM,4BAA6B,gBAA+C;GAElF,IAAI,2BAA2B;IAC7B,MAAM,UAAU,UAA+B,SAAe;KAG5D,MAAM,UAAU,cAAc;KAC9B,QAAQ,IAAI;IACd;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;CC/hBuB,EACvB;AACF"}
|
|
@@ -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: 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,CAAC,QACH,OAAO;CAGT,IAAI,OAAO,KAAK,WAAW,IAAI,GAC7B,OAAO;CAGT,IAAI,OAAO,SA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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"}
|
|
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: ScopeNode, 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,OAAkB,KAA2B;CAChE,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,OAAO,KAAK,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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"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"zod.mjs","names":[],"sources":["../../src/plugins/zod.ts"],"sourcesContent":["import zod from 'eslint-plugin-zod'\nimport { sanitizePlugin } from '../sanitize-plugin'\n\n\nexport default sanitizePlugin(zod)\n"],"mappings":";;;AAIA,IAAA,cAAe,eAAe,GAAG"}
|
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.
|
|
4
|
+
"version": "1.0.8",
|
|
5
5
|
"description": "Oxlint configuration for comment-labs projects",
|
|
6
6
|
"license": "Apache-2.0",
|
|
7
7
|
"author": "CommEnt Team",
|
|
@@ -20,7 +20,6 @@
|
|
|
20
20
|
"@e18e/eslint-plugin": "^0.8.1",
|
|
21
21
|
"@stylistic/eslint-plugin": "^6.0.1",
|
|
22
22
|
"empathic": "^2.1.0",
|
|
23
|
-
"eslint-plugin-import-zod": "^1.2.1",
|
|
24
23
|
"eslint-plugin-jsdoc": "^65.5.0",
|
|
25
24
|
"eslint-plugin-playwright": "^2.12.2",
|
|
26
25
|
"eslint-plugin-react-hooks": "^7.1.1",
|
|
@@ -29,7 +28,9 @@
|
|
|
29
28
|
"eslint-plugin-regexp": "^3.3.3",
|
|
30
29
|
"eslint-plugin-security": "^4.2.1",
|
|
31
30
|
"eslint-plugin-unicorn": "^74.0.0",
|
|
32
|
-
"
|
|
31
|
+
"eslint-plugin-zod": "^5.3.0",
|
|
32
|
+
"globals": "^17.14.0",
|
|
33
|
+
"oxlint-anti-slop": "^0.5.0"
|
|
33
34
|
},
|
|
34
35
|
"devDependencies": {
|
|
35
36
|
"@comment-labs/tsconfig": "1.0.0-beta.8",
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { t as sanitizePlugin } from "../sanitize-plugin-DZgftcJx.mjs";
|
|
2
|
-
import importZod from "eslint-plugin-import-zod";
|
|
3
|
-
// src/plugins/import-zod.ts
|
|
4
|
-
var import_zod_default = sanitizePlugin(importZod);
|
|
5
|
-
export { import_zod_default as default };
|
|
6
|
-
|
|
7
|
-
//# sourceMappingURL=import-zod.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"import-zod.mjs","names":[],"sources":["../../src/plugins/import-zod.ts"],"sourcesContent":["import importZod from 'eslint-plugin-import-zod'\nimport { sanitizePlugin } from '../sanitize-plugin'\n\n\nexport default sanitizePlugin(importZod)\n"],"mappings":";;;AAIA,IAAA,qBAAe,eAAe,SAAS"}
|