xo 0.53.1 → 0.54.1
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/config/plugins.cjs +34 -4
- package/lib/options-manager.js +11 -58
- package/node_modules/@eslint-community/eslint-utils/README.md +37 -0
- package/node_modules/{eslint-utils → @eslint-community/eslint-utils}/index.js +124 -12
- package/node_modules/@eslint-community/eslint-utils/index.js.map +1 -0
- package/node_modules/{eslint-utils → @eslint-community/eslint-utils}/index.mjs +124 -11
- package/node_modules/@eslint-community/eslint-utils/index.mjs.map +1 -0
- package/node_modules/@eslint-community/eslint-utils/package.json +73 -0
- package/node_modules/{regexpp → @eslint-community/regexpp}/README.md +9 -10
- package/node_modules/@eslint-community/regexpp/index.d.ts +781 -0
- package/node_modules/{regexpp → @eslint-community/regexpp}/index.js +297 -262
- package/node_modules/@eslint-community/regexpp/index.js.map +1 -0
- package/node_modules/{regexpp → @eslint-community/regexpp}/index.mjs +297 -262
- package/node_modules/@eslint-community/regexpp/index.mjs.map +1 -0
- package/node_modules/{regexpp → @eslint-community/regexpp}/package.json +60 -64
- package/node_modules/@typescript-eslint/eslint-plugin/LICENSE +1 -1
- package/node_modules/@typescript-eslint/eslint-plugin/README.md +6 -92
- package/node_modules/@typescript-eslint/eslint-plugin/dist/configs/all.js +11 -2
- package/node_modules/@typescript-eslint/eslint-plugin/dist/configs/all.js.map +1 -1
- package/node_modules/@typescript-eslint/eslint-plugin/dist/configs/strict.js +3 -1
- package/node_modules/@typescript-eslint/eslint-plugin/dist/configs/strict.js.map +1 -1
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/adjacent-overload-signatures.js +4 -2
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/adjacent-overload-signatures.js.map +1 -1
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/array-type.js +1 -1
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/array-type.js.map +1 -1
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/ban-ts-comment.js +2 -1
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/ban-ts-comment.js.map +1 -1
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/ban-types.js +3 -3
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/ban-types.js.map +1 -1
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/block-spacing.js +158 -0
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/block-spacing.js.map +1 -0
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/brace-style.js +3 -1
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/brace-style.js.map +1 -1
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/comma-spacing.js +1 -1
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/comma-spacing.js.map +1 -1
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/consistent-generic-constructors.js +17 -7
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/consistent-generic-constructors.js.map +1 -1
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/consistent-type-assertions.js +47 -0
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/consistent-type-assertions.js.map +1 -1
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/consistent-type-imports.js +5 -11
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/consistent-type-imports.js.map +1 -1
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/enum-utils/shared.js +61 -0
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/enum-utils/shared.js.map +1 -0
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/explicit-function-return-type.js +22 -3
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/explicit-function-return-type.js.map +1 -1
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/index.js +14 -0
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/index.js.map +1 -1
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/key-spacing.js +351 -0
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/key-spacing.js.map +1 -0
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/keyword-spacing.js +53 -2
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/keyword-spacing.js.map +1 -1
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/lines-around-comment.js +384 -0
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/lines-around-comment.js.map +1 -0
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/member-ordering.js +205 -39
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/member-ordering.js.map +1 -1
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/naming-convention-utils/enums.js +14 -13
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/naming-convention-utils/enums.js.map +1 -1
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/naming-convention-utils/schema.js +5 -0
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/naming-convention-utils/schema.js.map +1 -1
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/naming-convention-utils/validator.js +6 -6
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/naming-convention-utils/validator.js.map +1 -1
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/naming-convention.js +231 -198
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/naming-convention.js.map +1 -1
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-confusing-void-expression.js +5 -0
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-confusing-void-expression.js.map +1 -1
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-duplicate-type-constituents.js +158 -0
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-duplicate-type-constituents.js.map +1 -0
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-empty-interface.js +19 -16
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-empty-interface.js.map +1 -1
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-explicit-any.js +2 -2
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-explicit-any.js.map +1 -1
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-floating-promises.js +45 -4
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-floating-promises.js.map +1 -1
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-implied-eval.js +1 -1
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-implied-eval.js.map +1 -1
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-import-type-side-effects.js +79 -0
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-import-type-side-effects.js.map +1 -0
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-inferrable-types.js +1 -1
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-inferrable-types.js.map +1 -1
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-loss-of-precision.js +1 -1
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-loss-of-precision.js.map +1 -1
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-misused-promises.js +15 -15
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-misused-promises.js.map +1 -1
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-mixed-enums.js +196 -0
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-mixed-enums.js.map +1 -0
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-non-null-asserted-nullish-coalescing.js +1 -1
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-non-null-asserted-nullish-coalescing.js.map +1 -1
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-redundant-type-constituents.js +3 -3
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-redundant-type-constituents.js.map +1 -1
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-shadow.js +6 -1
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-shadow.js.map +1 -1
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-unnecessary-boolean-literal-compare.js +21 -31
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-unnecessary-boolean-literal-compare.js.map +1 -1
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-unnecessary-condition.js +22 -7
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-unnecessary-condition.js.map +1 -1
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-unnecessary-qualifier.js +4 -5
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-unnecessary-qualifier.js.map +1 -1
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-unsafe-argument.js +9 -9
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-unsafe-argument.js.map +1 -1
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-unsafe-enum-comparison.js +119 -0
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-unsafe-enum-comparison.js.map +1 -0
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-unused-vars.js +1 -2
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-unused-vars.js.map +1 -1
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-use-before-define.js +2 -2
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-use-before-define.js.map +1 -1
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/object-curly-spacing.js +1 -0
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/object-curly-spacing.js.map +1 -1
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/padding-line-between-statements.js +1 -0
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/padding-line-between-statements.js.map +1 -1
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-for-of.js +3 -5
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-for-of.js.map +1 -1
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-function-type.js +4 -5
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-function-type.js.map +1 -1
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-includes.js +2 -2
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-includes.js.map +1 -1
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-nullish-coalescing.js +19 -1
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-nullish-coalescing.js.map +1 -1
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-optional-chain.js +47 -11
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-optional-chain.js.map +1 -1
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-readonly.js +2 -1
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-readonly.js.map +1 -1
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-regexp-exec.js +1 -1
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-regexp-exec.js.map +1 -1
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-string-starts-ends-with.js +2 -2
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-string-starts-ends-with.js.map +1 -1
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/promise-function-async.js +3 -1
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/promise-function-async.js.map +1 -1
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/require-array-sort-compare.js +1 -1
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/require-array-sort-compare.js.map +1 -1
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/restrict-template-expressions.js +7 -0
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/restrict-template-expressions.js.map +1 -1
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/sort-type-constituents.js +5 -5
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/sort-type-constituents.js.map +1 -1
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/sort-type-union-intersection-members.js +5 -5
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/sort-type-union-intersection-members.js.map +1 -1
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/space-before-blocks.js +1 -2
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/space-before-blocks.js.map +1 -1
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/space-before-function-paren.js +2 -1
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/space-before-function-paren.js.map +1 -1
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/strict-boolean-expressions.js +46 -2
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/strict-boolean-expressions.js.map +1 -1
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/switch-exhaustiveness-check.js +1 -1
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/switch-exhaustiveness-check.js.map +1 -1
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/triple-slash-reference.js +1 -1
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/triple-slash-reference.js.map +1 -1
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/unbound-method.js +1 -1
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/unbound-method.js.map +1 -1
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/unified-signatures.js +1 -2
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/unified-signatures.js.map +1 -1
- package/node_modules/@typescript-eslint/eslint-plugin/dist/util/collectUnusedVariables.js.map +1 -1
- package/node_modules/@typescript-eslint/eslint-plugin/dist/util/getESLintCoreRule.js.map +1 -1
- package/node_modules/@typescript-eslint/eslint-plugin/dist/util/getStringLength.js +20 -0
- package/node_modules/@typescript-eslint/eslint-plugin/dist/util/getStringLength.js.map +1 -0
- package/node_modules/@typescript-eslint/eslint-plugin/dist/util/getWrappingFixer.js +2 -1
- package/node_modules/@typescript-eslint/eslint-plugin/dist/util/getWrappingFixer.js.map +1 -1
- package/node_modules/@typescript-eslint/eslint-plugin/dist/util/index.js +1 -0
- package/node_modules/@typescript-eslint/eslint-plugin/dist/util/index.js.map +1 -1
- package/node_modules/@typescript-eslint/eslint-plugin/dist/util/isNullLiteral.js +1 -1
- package/node_modules/@typescript-eslint/eslint-plugin/dist/util/isNullLiteral.js.map +1 -1
- package/node_modules/@typescript-eslint/eslint-plugin/dist/util/misc.js +27 -1
- package/node_modules/@typescript-eslint/eslint-plugin/dist/util/misc.js.map +1 -1
- package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/README.md +3 -3
- package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/await-thenable.md +1 -1
- package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/ban-types.md +3 -8
- package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/block-spacing.md +12 -0
- package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/consistent-indexed-object-style.md +1 -1
- package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/consistent-type-exports.md +2 -0
- package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/consistent-type-imports.md +9 -1
- package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/explicit-function-return-type.md +52 -0
- package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/key-spacing.md +12 -0
- package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/lines-around-comment.md +37 -0
- package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/member-ordering.md +181 -20
- package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/naming-convention.md +7 -6
- package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-duplicate-type-constituents.md +61 -0
- package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-empty-interface.md +1 -1
- package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-import-type-side-effects.md +75 -0
- package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-mixed-enums.md +88 -0
- package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-non-null-assertion.md +2 -2
- package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-shadow.md +21 -0
- package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-unsafe-enum-comparison.md +75 -0
- package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/prefer-function-type.md +5 -0
- package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/promise-function-async.md +18 -1
- package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/restrict-template-expressions.md +9 -0
- package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/strict-boolean-expressions.md +6 -0
- package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/unified-signatures.md +7 -10
- package/node_modules/@typescript-eslint/eslint-plugin/package.json +13 -9
- package/node_modules/@typescript-eslint/parser/LICENSE +5 -5
- package/node_modules/@typescript-eslint/parser/README.md +6 -300
- package/node_modules/@typescript-eslint/parser/_ts3.4/dist/index.d.ts +4 -0
- package/node_modules/@typescript-eslint/parser/dist/index.d.ts +4 -0
- package/node_modules/@typescript-eslint/parser/dist/index.d.ts.map +1 -1
- package/node_modules/@typescript-eslint/parser/dist/index.js +5 -1
- package/node_modules/@typescript-eslint/parser/dist/index.js.map +1 -1
- package/node_modules/@typescript-eslint/parser/dist/parser.d.ts.map +1 -1
- package/node_modules/@typescript-eslint/parser/dist/parser.js +20 -18
- package/node_modules/@typescript-eslint/parser/dist/parser.js.map +1 -1
- package/node_modules/@typescript-eslint/parser/package.json +6 -6
- package/node_modules/@typescript-eslint/scope-manager/LICENSE +1 -1
- package/node_modules/@typescript-eslint/scope-manager/README.md +5 -117
- package/node_modules/@typescript-eslint/scope-manager/dist/ScopeManager.js +10 -10
- package/node_modules/@typescript-eslint/scope-manager/dist/ScopeManager.js.map +1 -1
- package/node_modules/@typescript-eslint/scope-manager/dist/definition/Definition.d.ts +1 -1
- package/node_modules/@typescript-eslint/scope-manager/dist/definition/Definition.d.ts.map +1 -1
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/decorators.d.ts +3 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/decorators.d.ts.map +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/decorators.js +21 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/decorators.js.map +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/decorators.legacy.d.ts +3 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/decorators.legacy.d.ts.map +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/decorators.legacy.js +15 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/decorators.legacy.js.map +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/dom.d.ts.map +1 -1
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/dom.iterable.d.ts.map +1 -1
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/dom.iterable.js +5 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/dom.iterable.js.map +1 -1
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/dom.js +44 -10
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/dom.js.map +1 -1
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2015.symbol.wellknown.d.ts.map +1 -1
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2015.symbol.wellknown.js +1 -1
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2015.symbol.wellknown.js.map +1 -1
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2019.d.ts.map +1 -1
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2019.intl.d.ts +3 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2019.intl.d.ts.map +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2019.intl.js +12 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2019.intl.js.map +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2019.js +2 -1
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2019.js.map +1 -1
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2022.d.ts.map +1 -1
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2022.js +2 -1
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2022.js.map +1 -1
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2022.regexp.d.ts +3 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2022.regexp.d.ts.map +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2022.regexp.js +15 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2022.regexp.js.map +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2023.array.d.ts +3 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2023.array.d.ts.map +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2023.array.js +24 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2023.array.js.map +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2023.d.ts +3 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2023.d.ts.map +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2023.full.d.ts +3 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2023.full.d.ts.map +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2023.full.js +14 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2023.full.js.map +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2023.js +11 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2023.js.map +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/es5.d.ts.map +1 -1
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/es5.js +3 -105
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/es5.js.map +1 -1
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.js +2 -2
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/index.d.ts +7 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/index.d.ts.map +1 -1
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/index.js +14 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/index.js.map +1 -1
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/webworker.d.ts.map +1 -1
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/webworker.iterable.d.ts.map +1 -1
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/webworker.iterable.js +2 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/webworker.iterable.js.map +1 -1
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/webworker.js +43 -1
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/webworker.js.map +1 -1
- package/node_modules/@typescript-eslint/scope-manager/dist/referencer/ClassVisitor.d.ts +4 -2
- package/node_modules/@typescript-eslint/scope-manager/dist/referencer/ClassVisitor.d.ts.map +1 -1
- package/node_modules/@typescript-eslint/scope-manager/dist/referencer/ClassVisitor.js +14 -6
- package/node_modules/@typescript-eslint/scope-manager/dist/referencer/ClassVisitor.js.map +1 -1
- package/node_modules/@typescript-eslint/scope-manager/dist/referencer/ExportVisitor.d.ts +1 -1
- package/node_modules/@typescript-eslint/scope-manager/dist/referencer/ExportVisitor.d.ts.map +1 -1
- package/node_modules/@typescript-eslint/scope-manager/dist/referencer/ExportVisitor.js.map +1 -1
- package/node_modules/@typescript-eslint/scope-manager/dist/referencer/ImportVisitor.js.map +1 -1
- package/node_modules/@typescript-eslint/scope-manager/dist/referencer/PatternVisitor.d.ts +2 -2
- package/node_modules/@typescript-eslint/scope-manager/dist/referencer/PatternVisitor.d.ts.map +1 -1
- package/node_modules/@typescript-eslint/scope-manager/dist/referencer/PatternVisitor.js +10 -12
- package/node_modules/@typescript-eslint/scope-manager/dist/referencer/PatternVisitor.js.map +1 -1
- package/node_modules/@typescript-eslint/scope-manager/dist/referencer/Reference.js +17 -17
- package/node_modules/@typescript-eslint/scope-manager/dist/referencer/Reference.js.map +1 -1
- package/node_modules/@typescript-eslint/scope-manager/dist/referencer/Referencer.d.ts +2 -1
- package/node_modules/@typescript-eslint/scope-manager/dist/referencer/Referencer.d.ts.map +1 -1
- package/node_modules/@typescript-eslint/scope-manager/dist/referencer/Referencer.js +5 -2
- package/node_modules/@typescript-eslint/scope-manager/dist/referencer/Referencer.js.map +1 -1
- package/node_modules/@typescript-eslint/scope-manager/dist/referencer/TypeVisitor.js.map +1 -1
- package/node_modules/@typescript-eslint/scope-manager/dist/referencer/Visitor.js.map +1 -1
- package/node_modules/@typescript-eslint/scope-manager/dist/referencer/VisitorBase.js.map +1 -1
- package/node_modules/@typescript-eslint/scope-manager/dist/scope/Scope.d.ts +1 -1
- package/node_modules/@typescript-eslint/scope-manager/dist/scope/Scope.d.ts.map +1 -1
- package/node_modules/@typescript-eslint/scope-manager/dist/scope/ScopeBase.d.ts +1 -1
- package/node_modules/@typescript-eslint/scope-manager/dist/scope/ScopeBase.d.ts.map +1 -1
- package/node_modules/@typescript-eslint/scope-manager/dist/scope/ScopeBase.js.map +1 -1
- package/node_modules/@typescript-eslint/scope-manager/package.json +12 -12
- package/node_modules/@typescript-eslint/type-utils/LICENSE +1 -1
- package/node_modules/@typescript-eslint/type-utils/README.md +7 -10
- package/node_modules/@typescript-eslint/type-utils/_ts3.4/dist/containsAllTypesByName.d.ts +4 -2
- package/node_modules/@typescript-eslint/type-utils/_ts3.4/dist/typeFlagUtils.d.ts +8 -3
- package/node_modules/@typescript-eslint/type-utils/dist/containsAllTypesByName.d.ts +4 -2
- package/node_modules/@typescript-eslint/type-utils/dist/containsAllTypesByName.d.ts.map +1 -1
- package/node_modules/@typescript-eslint/type-utils/dist/containsAllTypesByName.js +12 -6
- package/node_modules/@typescript-eslint/type-utils/dist/containsAllTypesByName.js.map +1 -1
- package/node_modules/@typescript-eslint/type-utils/dist/isTypeReadonly.d.ts.map +1 -1
- package/node_modules/@typescript-eslint/type-utils/dist/isTypeReadonly.js +2 -4
- package/node_modules/@typescript-eslint/type-utils/dist/isTypeReadonly.js.map +1 -1
- package/node_modules/@typescript-eslint/type-utils/dist/typeFlagUtils.d.ts +8 -3
- package/node_modules/@typescript-eslint/type-utils/dist/typeFlagUtils.d.ts.map +1 -1
- package/node_modules/@typescript-eslint/type-utils/dist/typeFlagUtils.js +11 -4
- package/node_modules/@typescript-eslint/type-utils/dist/typeFlagUtils.js.map +1 -1
- package/node_modules/@typescript-eslint/type-utils/package.json +6 -6
- package/node_modules/@typescript-eslint/types/LICENSE +1 -1
- package/node_modules/@typescript-eslint/types/README.md +6 -11
- package/node_modules/@typescript-eslint/types/_ts3.4/dist/generated/ast-spec.d.ts +90 -16
- package/node_modules/@typescript-eslint/types/_ts3.4/dist/lib.d.ts +1 -1
- package/node_modules/@typescript-eslint/types/_ts3.4/dist/parser-options.d.ts +9 -5
- package/node_modules/@typescript-eslint/types/dist/generated/ast-spec.d.ts +90 -16
- package/node_modules/@typescript-eslint/types/dist/generated/ast-spec.d.ts.map +1 -1
- package/node_modules/@typescript-eslint/types/dist/generated/ast-spec.js +3 -0
- package/node_modules/@typescript-eslint/types/dist/generated/ast-spec.js.map +1 -1
- package/node_modules/@typescript-eslint/types/dist/lib.d.ts +1 -1
- package/node_modules/@typescript-eslint/types/dist/lib.d.ts.map +1 -1
- package/node_modules/@typescript-eslint/types/dist/parser-options.d.ts +9 -5
- package/node_modules/@typescript-eslint/types/dist/parser-options.d.ts.map +1 -1
- package/node_modules/@typescript-eslint/types/package.json +6 -6
- package/node_modules/@typescript-eslint/typescript-estree/LICENSE +5 -5
- package/node_modules/@typescript-eslint/typescript-estree/README.md +6 -379
- package/node_modules/@typescript-eslint/typescript-estree/_ts3.4/dist/clear-caches.d.ts +10 -0
- package/node_modules/@typescript-eslint/typescript-estree/_ts3.4/dist/create-program/describeFilePath.d.ts +2 -0
- package/node_modules/@typescript-eslint/typescript-estree/_ts3.4/dist/create-program/{createWatchProgram.d.ts → getWatchProgramsForProjects.d.ts} +3 -4
- package/node_modules/@typescript-eslint/typescript-estree/_ts3.4/dist/create-program/shared.d.ts +8 -2
- package/node_modules/@typescript-eslint/typescript-estree/_ts3.4/dist/index.d.ts +2 -2
- package/node_modules/@typescript-eslint/typescript-estree/_ts3.4/dist/parseSettings/ExpiringCache.d.ts +17 -0
- package/node_modules/@typescript-eslint/typescript-estree/_ts3.4/dist/parseSettings/createParseSettings.d.ts +1 -0
- package/node_modules/@typescript-eslint/typescript-estree/_ts3.4/dist/parseSettings/getProjectConfigFiles.d.ts +12 -0
- package/node_modules/@typescript-eslint/typescript-estree/_ts3.4/dist/parseSettings/index.d.ts +8 -3
- package/node_modules/@typescript-eslint/typescript-estree/_ts3.4/dist/parseSettings/resolveProjectList.d.ts +19 -0
- package/node_modules/@typescript-eslint/typescript-estree/_ts3.4/dist/parser-options.d.ts +23 -4
- package/node_modules/@typescript-eslint/typescript-estree/_ts3.4/dist/parser.d.ts +1 -1
- package/node_modules/@typescript-eslint/typescript-estree/_ts3.4/dist/simple-traverse.d.ts +1 -1
- package/node_modules/@typescript-eslint/typescript-estree/_ts3.4/dist/ts-estree/estree-to-ts-node-types.d.ts +4 -1
- package/node_modules/@typescript-eslint/typescript-estree/_ts3.4/dist/ts-estree/ts-nodes.d.ts +4 -2
- package/node_modules/@typescript-eslint/typescript-estree/_ts3.4/dist/version-check.d.ts +1 -1
- package/node_modules/@typescript-eslint/typescript-estree/dist/clear-caches.d.ts +10 -0
- package/node_modules/@typescript-eslint/typescript-estree/dist/clear-caches.d.ts.map +1 -0
- package/node_modules/@typescript-eslint/typescript-estree/dist/clear-caches.js +24 -0
- package/node_modules/@typescript-eslint/typescript-estree/dist/clear-caches.js.map +1 -0
- package/node_modules/@typescript-eslint/typescript-estree/dist/convert-comments.js +1 -1
- package/node_modules/@typescript-eslint/typescript-estree/dist/convert-comments.js.map +1 -1
- package/node_modules/@typescript-eslint/typescript-estree/dist/convert.d.ts.map +1 -1
- package/node_modules/@typescript-eslint/typescript-estree/dist/convert.js +62 -16
- package/node_modules/@typescript-eslint/typescript-estree/dist/convert.js.map +1 -1
- package/node_modules/@typescript-eslint/typescript-estree/dist/create-program/createDefaultProgram.d.ts.map +1 -1
- package/node_modules/@typescript-eslint/typescript-estree/dist/create-program/createDefaultProgram.js +1 -0
- package/node_modules/@typescript-eslint/typescript-estree/dist/create-program/createDefaultProgram.js.map +1 -1
- package/node_modules/@typescript-eslint/typescript-estree/dist/create-program/createProjectProgram.d.ts.map +1 -1
- package/node_modules/@typescript-eslint/typescript-estree/dist/create-program/createProjectProgram.js +7 -12
- package/node_modules/@typescript-eslint/typescript-estree/dist/create-program/createProjectProgram.js.map +1 -1
- package/node_modules/@typescript-eslint/typescript-estree/dist/create-program/describeFilePath.d.ts +2 -0
- package/node_modules/@typescript-eslint/typescript-estree/dist/create-program/describeFilePath.d.ts.map +1 -0
- package/node_modules/@typescript-eslint/typescript-estree/dist/create-program/describeFilePath.js +32 -0
- package/node_modules/@typescript-eslint/typescript-estree/dist/create-program/describeFilePath.js.map +1 -0
- package/node_modules/@typescript-eslint/typescript-estree/dist/create-program/{createWatchProgram.d.ts → getWatchProgramsForProjects.d.ts} +3 -4
- package/node_modules/@typescript-eslint/typescript-estree/dist/create-program/getWatchProgramsForProjects.d.ts.map +1 -0
- package/node_modules/@typescript-eslint/typescript-estree/dist/create-program/{createWatchProgram.js → getWatchProgramsForProjects.js} +16 -20
- package/node_modules/@typescript-eslint/typescript-estree/dist/create-program/getWatchProgramsForProjects.js.map +1 -0
- package/node_modules/@typescript-eslint/typescript-estree/dist/create-program/shared.d.ts +8 -2
- package/node_modules/@typescript-eslint/typescript-estree/dist/create-program/shared.d.ts.map +1 -1
- package/node_modules/@typescript-eslint/typescript-estree/dist/create-program/shared.js +15 -1
- package/node_modules/@typescript-eslint/typescript-estree/dist/create-program/shared.js.map +1 -1
- package/node_modules/@typescript-eslint/typescript-estree/dist/getModifiers.d.ts.map +1 -1
- package/node_modules/@typescript-eslint/typescript-estree/dist/getModifiers.js +3 -3
- package/node_modules/@typescript-eslint/typescript-estree/dist/getModifiers.js.map +1 -1
- package/node_modules/@typescript-eslint/typescript-estree/dist/index.d.ts +2 -2
- package/node_modules/@typescript-eslint/typescript-estree/dist/index.d.ts.map +1 -1
- package/node_modules/@typescript-eslint/typescript-estree/dist/index.js +2 -4
- package/node_modules/@typescript-eslint/typescript-estree/dist/index.js.map +1 -1
- package/node_modules/@typescript-eslint/typescript-estree/dist/node-utils.d.ts.map +1 -1
- package/node_modules/@typescript-eslint/typescript-estree/dist/node-utils.js +18 -5
- package/node_modules/@typescript-eslint/typescript-estree/dist/node-utils.js.map +1 -1
- package/node_modules/@typescript-eslint/typescript-estree/dist/parseSettings/ExpiringCache.d.ts +17 -0
- package/node_modules/@typescript-eslint/typescript-estree/dist/parseSettings/ExpiringCache.d.ts.map +1 -0
- package/node_modules/@typescript-eslint/typescript-estree/dist/parseSettings/ExpiringCache.js +62 -0
- package/node_modules/@typescript-eslint/typescript-estree/dist/parseSettings/ExpiringCache.js.map +1 -0
- package/node_modules/@typescript-eslint/typescript-estree/dist/parseSettings/createParseSettings.d.ts +1 -0
- package/node_modules/@typescript-eslint/typescript-estree/dist/parseSettings/createParseSettings.d.ts.map +1 -1
- package/node_modules/@typescript-eslint/typescript-estree/dist/parseSettings/createParseSettings.js +22 -48
- package/node_modules/@typescript-eslint/typescript-estree/dist/parseSettings/createParseSettings.js.map +1 -1
- package/node_modules/@typescript-eslint/typescript-estree/dist/parseSettings/getProjectConfigFiles.d.ts +12 -0
- package/node_modules/@typescript-eslint/typescript-estree/dist/parseSettings/getProjectConfigFiles.d.ts.map +1 -0
- package/node_modules/@typescript-eslint/typescript-estree/dist/parseSettings/getProjectConfigFiles.js +70 -0
- package/node_modules/@typescript-eslint/typescript-estree/dist/parseSettings/getProjectConfigFiles.js.map +1 -0
- package/node_modules/@typescript-eslint/typescript-estree/dist/parseSettings/index.d.ts +8 -3
- package/node_modules/@typescript-eslint/typescript-estree/dist/parseSettings/index.d.ts.map +1 -1
- package/node_modules/@typescript-eslint/typescript-estree/dist/parseSettings/resolveProjectList.d.ts +19 -0
- package/node_modules/@typescript-eslint/typescript-estree/dist/parseSettings/resolveProjectList.d.ts.map +1 -0
- package/node_modules/@typescript-eslint/typescript-estree/dist/parseSettings/resolveProjectList.js +103 -0
- package/node_modules/@typescript-eslint/typescript-estree/dist/parseSettings/resolveProjectList.js.map +1 -0
- package/node_modules/@typescript-eslint/typescript-estree/dist/parseSettings/warnAboutTSVersion.js +4 -4
- package/node_modules/@typescript-eslint/typescript-estree/dist/parseSettings/warnAboutTSVersion.js.map +1 -1
- package/node_modules/@typescript-eslint/typescript-estree/dist/parser-options.d.ts +23 -4
- package/node_modules/@typescript-eslint/typescript-estree/dist/parser-options.d.ts.map +1 -1
- package/node_modules/@typescript-eslint/typescript-estree/dist/parser.d.ts +1 -1
- package/node_modules/@typescript-eslint/typescript-estree/dist/parser.d.ts.map +1 -1
- package/node_modules/@typescript-eslint/typescript-estree/dist/parser.js +1 -1
- package/node_modules/@typescript-eslint/typescript-estree/dist/parser.js.map +1 -1
- package/node_modules/@typescript-eslint/typescript-estree/dist/simple-traverse.d.ts +1 -1
- package/node_modules/@typescript-eslint/typescript-estree/dist/simple-traverse.d.ts.map +1 -1
- package/node_modules/@typescript-eslint/typescript-estree/dist/simple-traverse.js +1 -1
- package/node_modules/@typescript-eslint/typescript-estree/dist/simple-traverse.js.map +1 -1
- package/node_modules/@typescript-eslint/typescript-estree/dist/ts-estree/estree-to-ts-node-types.d.ts +4 -1
- package/node_modules/@typescript-eslint/typescript-estree/dist/ts-estree/estree-to-ts-node-types.d.ts.map +1 -1
- package/node_modules/@typescript-eslint/typescript-estree/dist/ts-estree/ts-nodes.d.ts +4 -2
- package/node_modules/@typescript-eslint/typescript-estree/dist/ts-estree/ts-nodes.d.ts.map +1 -1
- package/node_modules/@typescript-eslint/typescript-estree/dist/version-check.d.ts +1 -1
- package/node_modules/@typescript-eslint/typescript-estree/dist/version-check.d.ts.map +1 -1
- package/node_modules/@typescript-eslint/typescript-estree/dist/version-check.js +2 -0
- package/node_modules/@typescript-eslint/typescript-estree/dist/version-check.js.map +1 -1
- package/node_modules/@typescript-eslint/typescript-estree/package.json +5 -6
- package/node_modules/@typescript-eslint/utils/LICENSE +1 -1
- package/node_modules/@typescript-eslint/utils/README.md +6 -23
- package/node_modules/@typescript-eslint/utils/_ts3.4/dist/ast-utils/eslint-utils/PatternMatcher.d.ts +4 -4
- package/node_modules/@typescript-eslint/utils/_ts3.4/dist/ast-utils/eslint-utils/ReferenceTracker.d.ts +4 -4
- package/node_modules/@typescript-eslint/utils/_ts3.4/dist/ast-utils/eslint-utils/astUtilities.d.ts +6 -6
- package/node_modules/@typescript-eslint/utils/_ts3.4/dist/ast-utils/eslint-utils/predicates.d.ts +5 -5
- package/node_modules/@typescript-eslint/utils/_ts3.4/dist/ast-utils/eslint-utils/scopeAnalysis.d.ts +2 -2
- package/node_modules/@typescript-eslint/utils/_ts3.4/dist/ast-utils/helpers.d.ts +60 -6
- package/node_modules/@typescript-eslint/utils/_ts3.4/dist/ast-utils/predicates.d.ts +13 -1
- package/node_modules/@typescript-eslint/utils/_ts3.4/dist/eslint-utils/InferTypesFromRule.d.ts +2 -2
- package/node_modules/@typescript-eslint/utils/_ts3.4/dist/eslint-utils/RuleCreator.d.ts +2 -2
- package/node_modules/@typescript-eslint/utils/_ts3.4/dist/eslint-utils/deepMerge.d.ts +1 -1
- package/node_modules/@typescript-eslint/utils/_ts3.4/dist/eslint-utils/rule-tester/RuleTester.d.ts +3 -3
- package/node_modules/@typescript-eslint/utils/_ts3.4/dist/eslint-utils/rule-tester/dependencyConstraints.d.ts +2 -2
- package/node_modules/@typescript-eslint/utils/_ts3.4/dist/ts-eslint/Rule.d.ts +6 -6
- package/node_modules/@typescript-eslint/utils/_ts3.4/dist/ts-eslint/RuleTester.d.ts +1 -1
- package/node_modules/@typescript-eslint/utils/_ts3.4/dist/ts-eslint/SourceCode.d.ts +5 -1
- package/node_modules/@typescript-eslint/utils/_ts3.4/dist/ts-eslint-scope/Options.d.ts +1 -1
- package/node_modules/@typescript-eslint/utils/_ts3.4/dist/ts-eslint-scope/Reference.d.ts +1 -1
- package/node_modules/@typescript-eslint/utils/_ts3.4/dist/ts-eslint-scope/Scope.d.ts +1 -1
- package/node_modules/@typescript-eslint/utils/dist/ast-utils/eslint-utils/PatternMatcher.d.ts +4 -4
- package/node_modules/@typescript-eslint/utils/dist/ast-utils/eslint-utils/PatternMatcher.js +2 -2
- package/node_modules/@typescript-eslint/utils/dist/ast-utils/eslint-utils/PatternMatcher.js.map +1 -1
- package/node_modules/@typescript-eslint/utils/dist/ast-utils/eslint-utils/ReferenceTracker.d.ts +4 -4
- package/node_modules/@typescript-eslint/utils/dist/ast-utils/eslint-utils/ReferenceTracker.js +2 -2
- package/node_modules/@typescript-eslint/utils/dist/ast-utils/eslint-utils/ReferenceTracker.js.map +1 -1
- package/node_modules/@typescript-eslint/utils/dist/ast-utils/eslint-utils/astUtilities.d.ts +6 -6
- package/node_modules/@typescript-eslint/utils/dist/ast-utils/eslint-utils/astUtilities.js +7 -7
- package/node_modules/@typescript-eslint/utils/dist/ast-utils/eslint-utils/astUtilities.js.map +1 -1
- package/node_modules/@typescript-eslint/utils/dist/ast-utils/eslint-utils/predicates.d.ts +5 -5
- package/node_modules/@typescript-eslint/utils/dist/ast-utils/eslint-utils/predicates.d.ts.map +1 -1
- package/node_modules/@typescript-eslint/utils/dist/ast-utils/eslint-utils/predicates.js +1 -1
- package/node_modules/@typescript-eslint/utils/dist/ast-utils/eslint-utils/predicates.js.map +1 -1
- package/node_modules/@typescript-eslint/utils/dist/ast-utils/eslint-utils/scopeAnalysis.d.ts +2 -2
- package/node_modules/@typescript-eslint/utils/dist/ast-utils/eslint-utils/scopeAnalysis.js +3 -3
- package/node_modules/@typescript-eslint/utils/dist/ast-utils/eslint-utils/scopeAnalysis.js.map +1 -1
- package/node_modules/@typescript-eslint/utils/dist/ast-utils/helpers.d.ts +60 -6
- package/node_modules/@typescript-eslint/utils/dist/ast-utils/helpers.d.ts.map +1 -1
- package/node_modules/@typescript-eslint/utils/dist/ast-utils/predicates.d.ts +13 -1
- package/node_modules/@typescript-eslint/utils/dist/ast-utils/predicates.d.ts.map +1 -1
- package/node_modules/@typescript-eslint/utils/dist/ast-utils/predicates.js +15 -1
- package/node_modules/@typescript-eslint/utils/dist/ast-utils/predicates.js.map +1 -1
- package/node_modules/@typescript-eslint/utils/dist/eslint-utils/InferTypesFromRule.d.ts +2 -2
- package/node_modules/@typescript-eslint/utils/dist/eslint-utils/InferTypesFromRule.d.ts.map +1 -1
- package/node_modules/@typescript-eslint/utils/dist/eslint-utils/RuleCreator.d.ts +2 -2
- package/node_modules/@typescript-eslint/utils/dist/eslint-utils/RuleCreator.d.ts.map +1 -1
- package/node_modules/@typescript-eslint/utils/dist/eslint-utils/applyDefault.js +1 -1
- package/node_modules/@typescript-eslint/utils/dist/eslint-utils/applyDefault.js.map +1 -1
- package/node_modules/@typescript-eslint/utils/dist/eslint-utils/deepMerge.d.ts +1 -1
- package/node_modules/@typescript-eslint/utils/dist/eslint-utils/deepMerge.d.ts.map +1 -1
- package/node_modules/@typescript-eslint/utils/dist/eslint-utils/nullThrows.js +1 -1
- package/node_modules/@typescript-eslint/utils/dist/eslint-utils/nullThrows.js.map +1 -1
- package/node_modules/@typescript-eslint/utils/dist/eslint-utils/rule-tester/RuleTester.d.ts +3 -3
- package/node_modules/@typescript-eslint/utils/dist/eslint-utils/rule-tester/RuleTester.d.ts.map +1 -1
- package/node_modules/@typescript-eslint/utils/dist/eslint-utils/rule-tester/RuleTester.js +40 -27
- package/node_modules/@typescript-eslint/utils/dist/eslint-utils/rule-tester/RuleTester.js.map +1 -1
- package/node_modules/@typescript-eslint/utils/dist/eslint-utils/rule-tester/dependencyConstraints.d.ts +2 -2
- package/node_modules/@typescript-eslint/utils/dist/eslint-utils/rule-tester/dependencyConstraints.d.ts.map +1 -1
- package/node_modules/@typescript-eslint/utils/dist/ts-eslint/Rule.d.ts +6 -6
- package/node_modules/@typescript-eslint/utils/dist/ts-eslint/Rule.d.ts.map +1 -1
- package/node_modules/@typescript-eslint/utils/dist/ts-eslint/RuleTester.d.ts +1 -1
- package/node_modules/@typescript-eslint/utils/dist/ts-eslint/RuleTester.d.ts.map +1 -1
- package/node_modules/@typescript-eslint/utils/dist/ts-eslint/SourceCode.d.ts +5 -1
- package/node_modules/@typescript-eslint/utils/dist/ts-eslint/SourceCode.d.ts.map +1 -1
- package/node_modules/@typescript-eslint/utils/dist/ts-eslint/SourceCode.js.map +1 -1
- package/node_modules/@typescript-eslint/utils/dist/ts-eslint-scope/Options.d.ts +1 -1
- package/node_modules/@typescript-eslint/utils/dist/ts-eslint-scope/Options.d.ts.map +1 -1
- package/node_modules/@typescript-eslint/utils/dist/ts-eslint-scope/Reference.d.ts +1 -1
- package/node_modules/@typescript-eslint/utils/dist/ts-eslint-scope/Reference.d.ts.map +1 -1
- package/node_modules/@typescript-eslint/utils/dist/ts-eslint-scope/Scope.d.ts +1 -1
- package/node_modules/@typescript-eslint/utils/dist/ts-eslint-scope/Scope.d.ts.map +1 -1
- package/node_modules/@typescript-eslint/utils/package.json +8 -8
- package/node_modules/@typescript-eslint/visitor-keys/LICENSE +1 -1
- package/node_modules/@typescript-eslint/visitor-keys/README.md +6 -9
- package/node_modules/@typescript-eslint/visitor-keys/dist/visitor-keys.d.ts.map +1 -1
- package/node_modules/@typescript-eslint/visitor-keys/dist/visitor-keys.js +63 -48
- package/node_modules/@typescript-eslint/visitor-keys/dist/visitor-keys.js.map +1 -1
- package/node_modules/@typescript-eslint/visitor-keys/package.json +4 -4
- package/node_modules/eslint-config-xo-typescript/index.js +8 -11
- package/node_modules/eslint-config-xo-typescript/package.json +5 -5
- package/node_modules/eslint-visitor-keys/README.md +1 -2
- package/node_modules/eslint-visitor-keys/dist/eslint-visitor-keys.cjs +38 -36
- package/node_modules/eslint-visitor-keys/lib/visitor-keys.js +38 -35
- package/node_modules/eslint-visitor-keys/package.json +16 -6
- package/node_modules/fastq/README.md +1 -1
- package/node_modules/fastq/index.d.ts +1 -1
- package/node_modules/fastq/package.json +1 -1
- package/node_modules/fastq/queue.js +6 -0
- package/node_modules/fastq/test/promise.js +27 -0
- package/node_modules/grapheme-splitter/LICENSE +22 -0
- package/node_modules/grapheme-splitter/README.md +111 -0
- package/node_modules/grapheme-splitter/index.d.ts +24 -0
- package/node_modules/grapheme-splitter/index.js +1743 -0
- package/node_modules/grapheme-splitter/package.json +34 -0
- package/node_modules/grapheme-splitter/tests/GraphemeBreakTest.txt +850 -0
- package/node_modules/grapheme-splitter/tests/grapheme_splitter_tests.js +83 -0
- package/node_modules/ignore/README.md +3 -3
- package/node_modules/ignore/index.js +24 -9
- package/node_modules/ignore/legacy.js +176 -135
- package/node_modules/ignore/package.json +13 -11
- package/node_modules/semver/README.md +56 -0
- package/node_modules/semver/bin/semver.js +8 -2
- package/node_modules/semver/classes/comparator.js +37 -33
- package/node_modules/semver/classes/range.js +6 -2
- package/node_modules/semver/classes/semver.js +10 -9
- package/node_modules/semver/functions/diff.js +24 -8
- package/node_modules/semver/functions/inc.js +3 -2
- package/node_modules/semver/functions/parse.js +0 -10
- package/node_modules/semver/index.js +1 -0
- package/node_modules/semver/internal/constants.js +15 -2
- package/node_modules/semver/internal/parse-options.js +14 -10
- package/node_modules/semver/package.json +7 -6
- package/node_modules/semver/ranges/intersects.js +1 -1
- package/node_modules/semver/ranges/subset.js +6 -3
- package/package.json +19 -19
- package/readme.md +1 -2
- package/node_modules/@typescript-eslint/typescript-estree/dist/create-program/createWatchProgram.d.ts.map +0 -1
- package/node_modules/@typescript-eslint/typescript-estree/dist/create-program/createWatchProgram.js.map +0 -1
- package/node_modules/braces/CHANGELOG.md +0 -184
- package/node_modules/eslint-scope/CHANGELOG.md +0 -70
- package/node_modules/eslint-utils/README.md +0 -38
- package/node_modules/eslint-utils/index.js.map +0 -1
- package/node_modules/eslint-utils/index.mjs.map +0 -1
- package/node_modules/eslint-utils/node_modules/eslint-visitor-keys/CHANGELOG.md +0 -36
- package/node_modules/eslint-utils/node_modules/eslint-visitor-keys/LICENSE +0 -201
- package/node_modules/eslint-utils/node_modules/eslint-visitor-keys/README.md +0 -98
- package/node_modules/eslint-utils/node_modules/eslint-visitor-keys/lib/index.js +0 -81
- package/node_modules/eslint-utils/node_modules/eslint-visitor-keys/lib/visitor-keys.json +0 -289
- package/node_modules/eslint-utils/node_modules/eslint-visitor-keys/package.json +0 -39
- package/node_modules/eslint-utils/package.json +0 -78
- package/node_modules/glob-parent/CHANGELOG.md +0 -110
- package/node_modules/picomatch/CHANGELOG.md +0 -136
- package/node_modules/regexpp/index.d.ts +0 -248
- package/node_modules/regexpp/index.js.map +0 -1
- package/node_modules/regexpp/index.mjs.map +0 -1
- /package/node_modules/{eslint-utils → @eslint-community/eslint-utils}/LICENSE +0 -0
- /package/node_modules/{regexpp → @eslint-community/regexpp}/LICENSE +0 -0
- /package/node_modules/{yallist → semver/node_modules/yallist}/LICENSE +0 -0
- /package/node_modules/{yallist → semver/node_modules/yallist}/README.md +0 -0
- /package/node_modules/{yallist → semver/node_modules/yallist}/iterator.js +0 -0
- /package/node_modules/{yallist → semver/node_modules/yallist}/package.json +0 -0
- /package/node_modules/{yallist → semver/node_modules/yallist}/yallist.js +0 -0
package/config/plugins.cjs
CHANGED
|
@@ -222,9 +222,20 @@ module.exports = {
|
|
|
222
222
|
},
|
|
223
223
|
],
|
|
224
224
|
'import/no-useless-path-segments': 'error',
|
|
225
|
-
'import/newline-after-import':
|
|
225
|
+
'import/newline-after-import': [
|
|
226
|
+
'error',
|
|
227
|
+
{
|
|
228
|
+
// TODO: Buggy.
|
|
229
|
+
// considerComments: true,
|
|
230
|
+
},
|
|
231
|
+
],
|
|
226
232
|
'import/no-amd': 'error',
|
|
227
|
-
'import/no-duplicates':
|
|
233
|
+
'import/no-duplicates': [
|
|
234
|
+
'error',
|
|
235
|
+
{
|
|
236
|
+
'prefer-inline': true,
|
|
237
|
+
},
|
|
238
|
+
],
|
|
228
239
|
|
|
229
240
|
// We use `unicorn/prefer-module` instead.
|
|
230
241
|
// 'import/no-commonjs': 'error',
|
|
@@ -232,7 +243,13 @@ module.exports = {
|
|
|
232
243
|
// Looks useful, but too unstable at the moment
|
|
233
244
|
// 'import/no-deprecated': 'error',
|
|
234
245
|
|
|
235
|
-
'import/no-
|
|
246
|
+
'import/no-empty-named-blocks': 'error',
|
|
247
|
+
'import/no-extraneous-dependencies': [
|
|
248
|
+
'error',
|
|
249
|
+
{
|
|
250
|
+
includeTypes: true,
|
|
251
|
+
},
|
|
252
|
+
],
|
|
236
253
|
'import/no-mutable-exports': 'error',
|
|
237
254
|
'import/no-named-as-default-member': 'error',
|
|
238
255
|
'import/no-named-as-default': 'error',
|
|
@@ -245,7 +262,20 @@ module.exports = {
|
|
|
245
262
|
// }
|
|
246
263
|
// ],
|
|
247
264
|
|
|
248
|
-
'import/order':
|
|
265
|
+
'import/order': [
|
|
266
|
+
'error',
|
|
267
|
+
{
|
|
268
|
+
groups: [
|
|
269
|
+
'builtin',
|
|
270
|
+
'external',
|
|
271
|
+
'parent',
|
|
272
|
+
'sibling',
|
|
273
|
+
'index',
|
|
274
|
+
],
|
|
275
|
+
'newlines-between': 'never',
|
|
276
|
+
warnOnUnassignedImports: true,
|
|
277
|
+
},
|
|
278
|
+
],
|
|
249
279
|
'import/no-unassigned-import': [
|
|
250
280
|
'error',
|
|
251
281
|
{
|
package/lib/options-manager.js
CHANGED
|
@@ -2,7 +2,6 @@ import {existsSync, promises as fs} from 'node:fs';
|
|
|
2
2
|
import process from 'node:process';
|
|
3
3
|
import os from 'node:os';
|
|
4
4
|
import path from 'node:path';
|
|
5
|
-
import {createRequire} from 'node:module';
|
|
6
5
|
import arrify from 'arrify';
|
|
7
6
|
import {mergeWith, flow, pick} from 'lodash-es';
|
|
8
7
|
import {findUpSync} from 'find-up';
|
|
@@ -11,12 +10,12 @@ import prettier from 'prettier';
|
|
|
11
10
|
import semver from 'semver';
|
|
12
11
|
import {cosmiconfig, defaultLoaders} from 'cosmiconfig';
|
|
13
12
|
import micromatch from 'micromatch';
|
|
14
|
-
import JSON5 from 'json5';
|
|
15
13
|
import stringify from 'json-stable-stringify-without-jsonify';
|
|
16
14
|
import {Legacy} from '@eslint/eslintrc';
|
|
17
15
|
import createEsmUtils from 'esm-utils';
|
|
18
16
|
import MurmurHash3 from 'imurmurhash';
|
|
19
17
|
import slash from 'slash';
|
|
18
|
+
import {getTsconfig} from 'get-tsconfig';
|
|
20
19
|
import {
|
|
21
20
|
DEFAULT_IGNORES,
|
|
22
21
|
DEFAULT_EXTENSION,
|
|
@@ -159,26 +158,20 @@ const handleTSConfig = async options => {
|
|
|
159
158
|
options.tsConfig = {};
|
|
160
159
|
options.tsConfigPath = '';
|
|
161
160
|
|
|
162
|
-
const {project: tsConfigProjectPath
|
|
161
|
+
const {project: tsConfigProjectPath} = options.parserOptions || {};
|
|
163
162
|
|
|
164
163
|
if (tsConfigProjectPath) {
|
|
165
164
|
options.tsConfigPath = path.resolve(options.cwd, tsConfigProjectPath);
|
|
166
|
-
options.tsConfig =
|
|
165
|
+
options.tsConfig = tsConfigResolvePaths(getTsconfig(options.tsConfigPath).config, options.tsConfigPath);
|
|
167
166
|
} else {
|
|
168
|
-
const
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
}
|
|
177
|
-
|
|
178
|
-
if (options.tsConfig) {
|
|
179
|
-
// If the tsconfig extends from another file, we need to ensure that the file is covered by the tsconfig
|
|
180
|
-
// or not. The basefile could have includes/excludes/files properties that should be applied to the final tsconfig representation.
|
|
181
|
-
options.tsConfig = await recursiveBuildTsConfig(options.tsConfig, options.tsConfigPath);
|
|
167
|
+
const {config: tsConfig, path: filepath} = getTsconfig(options.filePath) || {};
|
|
168
|
+
options.tsConfigPath = filepath;
|
|
169
|
+
options.tsConfig = tsConfig;
|
|
170
|
+
if (options.tsConfigPath) {
|
|
171
|
+
options.tsConfig = tsConfigResolvePaths(tsConfig, options.tsConfigPath);
|
|
172
|
+
} else {
|
|
173
|
+
delete options.tsConfig;
|
|
174
|
+
}
|
|
182
175
|
}
|
|
183
176
|
|
|
184
177
|
let hasMatch;
|
|
@@ -637,46 +630,6 @@ const getOptionGroups = async (files, options) => {
|
|
|
637
630
|
return optionGroups;
|
|
638
631
|
};
|
|
639
632
|
|
|
640
|
-
async function recursiveBuildTsConfig(tsConfig, tsConfigPath) {
|
|
641
|
-
tsConfig = tsConfigResolvePaths(tsConfig, tsConfigPath);
|
|
642
|
-
|
|
643
|
-
if (!tsConfig.extends || (typeof tsConfig.extends === 'string' && tsConfig.extends.includes('node_modules'))) {
|
|
644
|
-
return tsConfig;
|
|
645
|
-
}
|
|
646
|
-
|
|
647
|
-
// If any of the following are missing, then we need to look up the base config as it could apply
|
|
648
|
-
const require = createRequire(tsConfigPath);
|
|
649
|
-
|
|
650
|
-
let basePath;
|
|
651
|
-
try {
|
|
652
|
-
basePath = require.resolve(tsConfig.extends);
|
|
653
|
-
} catch (error) {
|
|
654
|
-
// Tsconfig resolution is odd, It allows behavior that is not exactly like node resolution
|
|
655
|
-
// therefore we attempt to smooth this out here with this hack
|
|
656
|
-
try {
|
|
657
|
-
basePath = require.resolve(path.join(tsConfig.extends, 'tsconfig.json'));
|
|
658
|
-
} catch {
|
|
659
|
-
// Throw the orginal resolution error to let the user know their extends block is invalid
|
|
660
|
-
throw error;
|
|
661
|
-
}
|
|
662
|
-
}
|
|
663
|
-
|
|
664
|
-
const baseTsConfig = JSON5.parse(await fs.readFile(basePath));
|
|
665
|
-
|
|
666
|
-
delete tsConfig.extends;
|
|
667
|
-
|
|
668
|
-
tsConfig = {
|
|
669
|
-
compilerOptions: {
|
|
670
|
-
...baseTsConfig.compilerOptions,
|
|
671
|
-
...tsConfig.compilerOptions,
|
|
672
|
-
},
|
|
673
|
-
...baseTsConfig,
|
|
674
|
-
...tsConfig,
|
|
675
|
-
};
|
|
676
|
-
|
|
677
|
-
return recursiveBuildTsConfig(tsConfig, basePath);
|
|
678
|
-
}
|
|
679
|
-
|
|
680
633
|
// Convert all include, files, and exclude to absolute paths
|
|
681
634
|
// and or globs. This works because ts only allows simple glob subset
|
|
682
635
|
const tsConfigResolvePaths = (tsConfig, tsConfigPath) => {
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
# @eslint-community/eslint-utils
|
|
2
|
+
|
|
3
|
+
[](https://www.npmjs.com/package/@eslint-community/eslint-utils)
|
|
4
|
+
[](http://www.npmtrends.com/@eslint-community/eslint-utils)
|
|
5
|
+
[](https://github.com/eslint-community/eslint-utils/actions)
|
|
6
|
+
[](https://codecov.io/gh/eslint-community/eslint-utils)
|
|
7
|
+
|
|
8
|
+
## 🏁 Goal
|
|
9
|
+
|
|
10
|
+
This package provides utility functions and classes for make ESLint custom rules.
|
|
11
|
+
|
|
12
|
+
For examples:
|
|
13
|
+
|
|
14
|
+
- [`getStaticValue`](https://eslint-community.github.io/eslint-utils/api/ast-utils.html#getstaticvalue) evaluates static value on AST.
|
|
15
|
+
- [`ReferenceTracker`](https://eslint-community.github.io/eslint-utils/api/scope-utils.html#referencetracker-class) checks the members of modules/globals as handling assignments and destructuring.
|
|
16
|
+
|
|
17
|
+
## 📖 Usage
|
|
18
|
+
|
|
19
|
+
See [documentation](https://eslint-community.github.io/eslint-utils).
|
|
20
|
+
|
|
21
|
+
## 📰 Changelog
|
|
22
|
+
|
|
23
|
+
See [releases](https://github.com/eslint-community/eslint-utils/releases).
|
|
24
|
+
|
|
25
|
+
## ❤️ Contributing
|
|
26
|
+
|
|
27
|
+
Welcome contributing!
|
|
28
|
+
|
|
29
|
+
Please use GitHub's Issues/PRs.
|
|
30
|
+
|
|
31
|
+
### Development Tools
|
|
32
|
+
|
|
33
|
+
- `npm test` runs tests and measures coverage.
|
|
34
|
+
- `npm run clean` removes the coverage result of `npm test` command.
|
|
35
|
+
- `npm run coverage` shows the coverage result of the last `npm test` command.
|
|
36
|
+
- `npm run lint` runs ESLint.
|
|
37
|
+
- `npm run watch` runs tests on each file change.
|
|
@@ -1,11 +1,8 @@
|
|
|
1
|
-
/*! @author Toru Nagashima <https://github.com/mysticatea> */
|
|
2
1
|
'use strict';
|
|
3
2
|
|
|
4
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
5
4
|
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
var evk = _interopDefault(require('eslint-visitor-keys'));
|
|
5
|
+
var eslintVisitorKeys = require('eslint-visitor-keys');
|
|
9
6
|
|
|
10
7
|
/**
|
|
11
8
|
* Get the innermost scope which contains a given location.
|
|
@@ -313,6 +310,24 @@ const builtinNames = Object.freeze(
|
|
|
313
310
|
const callAllowed = new Set(
|
|
314
311
|
[
|
|
315
312
|
Array.isArray,
|
|
313
|
+
Array.of,
|
|
314
|
+
Array.prototype.at,
|
|
315
|
+
Array.prototype.concat,
|
|
316
|
+
Array.prototype.entries,
|
|
317
|
+
Array.prototype.every,
|
|
318
|
+
Array.prototype.filter,
|
|
319
|
+
Array.prototype.find,
|
|
320
|
+
Array.prototype.findIndex,
|
|
321
|
+
Array.prototype.flat,
|
|
322
|
+
Array.prototype.includes,
|
|
323
|
+
Array.prototype.indexOf,
|
|
324
|
+
Array.prototype.join,
|
|
325
|
+
Array.prototype.keys,
|
|
326
|
+
Array.prototype.lastIndexOf,
|
|
327
|
+
Array.prototype.slice,
|
|
328
|
+
Array.prototype.some,
|
|
329
|
+
Array.prototype.toString,
|
|
330
|
+
Array.prototype.values,
|
|
316
331
|
typeof BigInt === "function" ? BigInt : undefined,
|
|
317
332
|
Boolean,
|
|
318
333
|
Date,
|
|
@@ -325,7 +340,14 @@ const callAllowed = new Set(
|
|
|
325
340
|
isFinite,
|
|
326
341
|
isNaN,
|
|
327
342
|
isPrototypeOf,
|
|
343
|
+
Map,
|
|
344
|
+
Map.prototype.entries,
|
|
345
|
+
Map.prototype.get,
|
|
346
|
+
Map.prototype.has,
|
|
347
|
+
Map.prototype.keys,
|
|
348
|
+
Map.prototype.values,
|
|
328
349
|
...Object.getOwnPropertyNames(Math)
|
|
350
|
+
.filter((k) => k !== "random")
|
|
329
351
|
.map((k) => Math[k])
|
|
330
352
|
.filter((f) => typeof f === "function"),
|
|
331
353
|
Number,
|
|
@@ -333,6 +355,10 @@ const callAllowed = new Set(
|
|
|
333
355
|
Number.isNaN,
|
|
334
356
|
Number.parseFloat,
|
|
335
357
|
Number.parseInt,
|
|
358
|
+
Number.prototype.toExponential,
|
|
359
|
+
Number.prototype.toFixed,
|
|
360
|
+
Number.prototype.toPrecision,
|
|
361
|
+
Number.prototype.toString,
|
|
336
362
|
Object,
|
|
337
363
|
Object.entries,
|
|
338
364
|
Object.is,
|
|
@@ -344,10 +370,39 @@ const callAllowed = new Set(
|
|
|
344
370
|
parseFloat,
|
|
345
371
|
parseInt,
|
|
346
372
|
RegExp,
|
|
373
|
+
Set,
|
|
374
|
+
Set.prototype.entries,
|
|
375
|
+
Set.prototype.has,
|
|
376
|
+
Set.prototype.keys,
|
|
377
|
+
Set.prototype.values,
|
|
347
378
|
String,
|
|
348
379
|
String.fromCharCode,
|
|
349
380
|
String.fromCodePoint,
|
|
350
381
|
String.raw,
|
|
382
|
+
String.prototype.at,
|
|
383
|
+
String.prototype.charAt,
|
|
384
|
+
String.prototype.charCodeAt,
|
|
385
|
+
String.prototype.codePointAt,
|
|
386
|
+
String.prototype.concat,
|
|
387
|
+
String.prototype.endsWith,
|
|
388
|
+
String.prototype.includes,
|
|
389
|
+
String.prototype.indexOf,
|
|
390
|
+
String.prototype.lastIndexOf,
|
|
391
|
+
String.prototype.normalize,
|
|
392
|
+
String.prototype.padEnd,
|
|
393
|
+
String.prototype.padStart,
|
|
394
|
+
String.prototype.slice,
|
|
395
|
+
String.prototype.startsWith,
|
|
396
|
+
String.prototype.substr,
|
|
397
|
+
String.prototype.substring,
|
|
398
|
+
String.prototype.toLowerCase,
|
|
399
|
+
String.prototype.toString,
|
|
400
|
+
String.prototype.toUpperCase,
|
|
401
|
+
String.prototype.trim,
|
|
402
|
+
String.prototype.trimEnd,
|
|
403
|
+
String.prototype.trimLeft,
|
|
404
|
+
String.prototype.trimRight,
|
|
405
|
+
String.prototype.trimStart,
|
|
351
406
|
Symbol.for,
|
|
352
407
|
Symbol.keyFor,
|
|
353
408
|
unescape,
|
|
@@ -359,6 +414,26 @@ const callPassThrough = new Set([
|
|
|
359
414
|
Object.seal,
|
|
360
415
|
]);
|
|
361
416
|
|
|
417
|
+
/** @type {ReadonlyArray<readonly [Function, ReadonlySet<string>]>} */
|
|
418
|
+
const getterAllowed = [
|
|
419
|
+
[Map, new Set(["size"])],
|
|
420
|
+
[
|
|
421
|
+
RegExp,
|
|
422
|
+
new Set([
|
|
423
|
+
"dotAll",
|
|
424
|
+
"flags",
|
|
425
|
+
"global",
|
|
426
|
+
"hasIndices",
|
|
427
|
+
"ignoreCase",
|
|
428
|
+
"multiline",
|
|
429
|
+
"source",
|
|
430
|
+
"sticky",
|
|
431
|
+
"unicode",
|
|
432
|
+
]),
|
|
433
|
+
],
|
|
434
|
+
[Set, new Set(["size"])],
|
|
435
|
+
];
|
|
436
|
+
|
|
362
437
|
/**
|
|
363
438
|
* Get the property descriptor.
|
|
364
439
|
* @param {object} object The object to get.
|
|
@@ -418,6 +493,23 @@ function getElementValues(nodeList, initialScope) {
|
|
|
418
493
|
return valueList
|
|
419
494
|
}
|
|
420
495
|
|
|
496
|
+
/**
|
|
497
|
+
* Returns whether the given variable is never written to after initialization.
|
|
498
|
+
* @param {import("eslint").Scope.Variable} variable
|
|
499
|
+
* @returns {boolean}
|
|
500
|
+
*/
|
|
501
|
+
function isEffectivelyConst(variable) {
|
|
502
|
+
const refs = variable.references;
|
|
503
|
+
|
|
504
|
+
const inits = refs.filter((r) => r.init).length;
|
|
505
|
+
const reads = refs.filter((r) => r.isReadOnly()).length;
|
|
506
|
+
if (inits === 1 && reads + inits === refs.length) {
|
|
507
|
+
// there is only one init and all other references only read
|
|
508
|
+
return true
|
|
509
|
+
}
|
|
510
|
+
return false
|
|
511
|
+
}
|
|
512
|
+
|
|
421
513
|
const operations = Object.freeze({
|
|
422
514
|
ArrayExpression(node, initialScope) {
|
|
423
515
|
const elements = getElementValues(node.elements, initialScope);
|
|
@@ -475,7 +567,7 @@ const operations = Object.freeze({
|
|
|
475
567
|
case "%":
|
|
476
568
|
return { value: left.value % right.value }
|
|
477
569
|
case "**":
|
|
478
|
-
return { value:
|
|
570
|
+
return { value: left.value ** right.value }
|
|
479
571
|
case "|":
|
|
480
572
|
return { value: left.value | right.value }
|
|
481
573
|
case "^":
|
|
@@ -576,7 +668,9 @@ const operations = Object.freeze({
|
|
|
576
668
|
const def = variable.defs[0];
|
|
577
669
|
if (
|
|
578
670
|
def.parent &&
|
|
579
|
-
def.
|
|
671
|
+
def.type === "Variable" &&
|
|
672
|
+
(def.parent.kind === "const" ||
|
|
673
|
+
isEffectivelyConst(variable)) &&
|
|
580
674
|
// TODO(mysticatea): don't support destructuring here.
|
|
581
675
|
def.node.id.type === "Identifier"
|
|
582
676
|
) {
|
|
@@ -627,8 +721,19 @@ const operations = Object.freeze({
|
|
|
627
721
|
}
|
|
628
722
|
const property = getStaticPropertyNameValue(node, initialScope);
|
|
629
723
|
|
|
630
|
-
if (property != null
|
|
631
|
-
|
|
724
|
+
if (property != null) {
|
|
725
|
+
if (!isGetter(object.value, property.value)) {
|
|
726
|
+
return { value: object.value[property.value] }
|
|
727
|
+
}
|
|
728
|
+
|
|
729
|
+
for (const [classFn, allowed] of getterAllowed) {
|
|
730
|
+
if (
|
|
731
|
+
object.value instanceof classFn &&
|
|
732
|
+
allowed.has(property.value)
|
|
733
|
+
) {
|
|
734
|
+
return { value: object.value[property.value] }
|
|
735
|
+
}
|
|
736
|
+
}
|
|
632
737
|
}
|
|
633
738
|
}
|
|
634
739
|
return null
|
|
@@ -957,6 +1062,11 @@ function getFunctionNameWithKind(node, sourceCode) {
|
|
|
957
1062
|
parent.left.type === "Identifier"
|
|
958
1063
|
) {
|
|
959
1064
|
tokens.push(`'${parent.left.name}'`);
|
|
1065
|
+
} else if (
|
|
1066
|
+
parent.type === "ExportDefaultDeclaration" &&
|
|
1067
|
+
parent.declaration === node
|
|
1068
|
+
) {
|
|
1069
|
+
tokens.push("'default'");
|
|
960
1070
|
}
|
|
961
1071
|
|
|
962
1072
|
return tokens.join(" ")
|
|
@@ -1010,7 +1120,7 @@ const visitor = Object.freeze(
|
|
|
1010
1120
|
$visitChildren(node, options, visitorKeys) {
|
|
1011
1121
|
const { type } = node;
|
|
1012
1122
|
|
|
1013
|
-
for (const key of visitorKeys[type] ||
|
|
1123
|
+
for (const key of visitorKeys[type] || eslintVisitorKeys.getKeys(node)) {
|
|
1014
1124
|
const value = node[key];
|
|
1015
1125
|
|
|
1016
1126
|
if (Array.isArray(value)) {
|
|
@@ -1136,7 +1246,7 @@ const visitor = Object.freeze(
|
|
|
1136
1246
|
* @param {object} [options] The option object.
|
|
1137
1247
|
* @param {boolean} [options.considerGetters=false] If `true` then it considers member accesses as the node which has side effects.
|
|
1138
1248
|
* @param {boolean} [options.considerImplicitTypeConversion=false] If `true` then it considers implicit type conversion as the node which has side effects.
|
|
1139
|
-
* @param {object} [options.visitorKeys=
|
|
1249
|
+
* @param {object} [options.visitorKeys=KEYS] The keys to traverse nodes. Use `context.getSourceCode().visitorKeys`.
|
|
1140
1250
|
* @returns {boolean} `true` if the node has a certain side effect.
|
|
1141
1251
|
*/
|
|
1142
1252
|
function hasSideEffect(
|
|
@@ -1147,7 +1257,7 @@ function hasSideEffect(
|
|
|
1147
1257
|
return visitor.$visit(
|
|
1148
1258
|
node,
|
|
1149
1259
|
{ considerGetters, considerImplicitTypeConversion },
|
|
1150
|
-
sourceCode.visitorKeys ||
|
|
1260
|
+
sourceCode.visitorKeys || eslintVisitorKeys.KEYS,
|
|
1151
1261
|
)
|
|
1152
1262
|
}
|
|
1153
1263
|
|
|
@@ -1245,6 +1355,8 @@ function isParenthesized(
|
|
|
1245
1355
|
|
|
1246
1356
|
if (
|
|
1247
1357
|
node == null ||
|
|
1358
|
+
// `Program` can't be parenthesized
|
|
1359
|
+
node.parent == null ||
|
|
1248
1360
|
// `CatchClause.param` can't be parenthesized, example `try {} catch (error) {}`
|
|
1249
1361
|
(node.parent.type === "CatchClause" && node.parent.param === node)
|
|
1250
1362
|
) {
|
|
@@ -1921,7 +2033,7 @@ exports.ESM = ESM;
|
|
|
1921
2033
|
exports.PatternMatcher = PatternMatcher;
|
|
1922
2034
|
exports.READ = READ;
|
|
1923
2035
|
exports.ReferenceTracker = ReferenceTracker;
|
|
1924
|
-
exports
|
|
2036
|
+
exports["default"] = index;
|
|
1925
2037
|
exports.findVariable = findVariable;
|
|
1926
2038
|
exports.getFunctionHeadLocation = getFunctionHeadLocation;
|
|
1927
2039
|
exports.getFunctionNameWithKind = getFunctionNameWithKind;
|