xo 0.53.0 → 0.54.0
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 +27 -4
- package/index.js +6 -11
- 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 +10 -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 +2 -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/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 +12 -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-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/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/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 +15 -17
- 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/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.map +1 -1
- package/node_modules/@typescript-eslint/type-utils/dist/typeFlagUtils.js +1 -0
- 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/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
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: 'Disallow enums from having both number and string members.'
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
> 🛑 This file is source code, not the primary documentation location! 🛑
|
|
6
|
+
>
|
|
7
|
+
> See **https://typescript-eslint.io/rules/no-mixed-enums** for documentation.
|
|
8
|
+
|
|
9
|
+
TypeScript enums are allowed to assign numeric or string values to their members.
|
|
10
|
+
Most enums contain either all numbers or all strings, but in theory you can mix-and-match within the same enum.
|
|
11
|
+
Mixing enum member types is generally considered confusing and a bad practice.
|
|
12
|
+
|
|
13
|
+
## Examples
|
|
14
|
+
|
|
15
|
+
<!--tabs-->
|
|
16
|
+
|
|
17
|
+
### ❌ Incorrect
|
|
18
|
+
|
|
19
|
+
```ts
|
|
20
|
+
enum Status {
|
|
21
|
+
Unknown,
|
|
22
|
+
Closed = 1,
|
|
23
|
+
Open = 'open',
|
|
24
|
+
}
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
### ✅ Correct (Explicit Numbers)
|
|
28
|
+
|
|
29
|
+
```ts
|
|
30
|
+
enum Status {
|
|
31
|
+
Unknown = 0,
|
|
32
|
+
Closed = 1,
|
|
33
|
+
Open = 2,
|
|
34
|
+
}
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
### ✅ Correct (Implicit Numbers)
|
|
38
|
+
|
|
39
|
+
```ts
|
|
40
|
+
enum Status {
|
|
41
|
+
Unknown,
|
|
42
|
+
Closed,
|
|
43
|
+
Open,
|
|
44
|
+
}
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
### ✅ Correct (Strings)
|
|
48
|
+
|
|
49
|
+
```ts
|
|
50
|
+
enum Status {
|
|
51
|
+
Unknown = 'unknown',
|
|
52
|
+
Closed = 'closed',
|
|
53
|
+
Open = 'open',
|
|
54
|
+
}
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
## Iteration Pitfalls of Mixed Enum Member Values
|
|
58
|
+
|
|
59
|
+
Enum values may be iterated over using `Object.entries`/`Object.keys`/`Object.values`.
|
|
60
|
+
|
|
61
|
+
If all enum members are strings, the number of items will match the number of enum members:
|
|
62
|
+
|
|
63
|
+
```ts
|
|
64
|
+
enum Status {
|
|
65
|
+
Closed = 'closed',
|
|
66
|
+
Open = 'open',
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
// ['closed', 'open']
|
|
70
|
+
Object.values(Status);
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
But if the enum contains members that are initialized with numbers -including implicitly initialized numbers— then iteration over that enum will include those numbers as well:
|
|
74
|
+
|
|
75
|
+
```ts
|
|
76
|
+
enum Status {
|
|
77
|
+
Unknown,
|
|
78
|
+
Closed = 1,
|
|
79
|
+
Open = 'open',
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
// ["Unknown", "Closed", 0, 1, "open"]
|
|
83
|
+
Object.values(Status);
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
## When Not To Use It
|
|
87
|
+
|
|
88
|
+
If you don't mind the confusion of mixed enum member values and don't iterate over enums, you can safely disable this rule.
|
|
@@ -22,7 +22,7 @@ interface Example {
|
|
|
22
22
|
}
|
|
23
23
|
|
|
24
24
|
declare const example: Example;
|
|
25
|
-
const includesBaz =
|
|
25
|
+
const includesBaz = example.property!.includes('baz');
|
|
26
26
|
```
|
|
27
27
|
|
|
28
28
|
### ✅ Correct
|
|
@@ -33,7 +33,7 @@ interface Example {
|
|
|
33
33
|
}
|
|
34
34
|
|
|
35
35
|
declare const example: Example;
|
|
36
|
-
const includesBaz =
|
|
36
|
+
const includesBaz = example.property?.includes('baz') ?? false;
|
|
37
37
|
```
|
|
38
38
|
|
|
39
39
|
## When Not To Use It
|
|
@@ -78,3 +78,24 @@ Examples of **correct** code with `{ ignoreFunctionTypeParameterNameValueShadow:
|
|
|
78
78
|
const test = 1;
|
|
79
79
|
type Func = (test: string) => typeof test;
|
|
80
80
|
```
|
|
81
|
+
|
|
82
|
+
## FAQ
|
|
83
|
+
|
|
84
|
+
### Why does the rule report on enum members that share the same name as a variable in a parent scope?
|
|
85
|
+
|
|
86
|
+
Reporting on this case isn't a bug - it is completely intentional and correct reporting! The rule reports due to a relatively unknown feature of enums - enum members create a variable within the enum scope so that they can be referenced within the enum without a qualifier.
|
|
87
|
+
|
|
88
|
+
To illustrate this with an example:
|
|
89
|
+
|
|
90
|
+
```ts
|
|
91
|
+
const A = 2;
|
|
92
|
+
enum Test {
|
|
93
|
+
A = 1,
|
|
94
|
+
B = A,
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
console.log(Test.B);
|
|
98
|
+
// what should be logged?
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
Naively looking at the above code, it might look like the log should output `2`, because the outer variable `A`'s value is `2` - however, the code instead outputs `1`, which is the value of `Test.A`. This is because the unqualified code `B = A` is equivalent to the fully-qualified code `B = Test.A`. Due to this behavior, the enum member has **shadowed** the outer variable declaration.
|
|
@@ -85,3 +85,8 @@ type Intersection = ((data: string) => number) & ((id: number) => string);
|
|
|
85
85
|
## When Not To Use It
|
|
86
86
|
|
|
87
87
|
If you specifically want to use an interface or type literal with a single call signature for stylistic reasons, you can disable this rule.
|
|
88
|
+
|
|
89
|
+
This rule has a known edge case of sometimes triggering on global augmentations such as `interface Function`.
|
|
90
|
+
These edge cases are rare and often symptomatic of odd code.
|
|
91
|
+
We recommend you use an [inline ESLint disable comment](https://eslint.org/docs/latest/use/configure/rules#using-configuration-comments-1).
|
|
92
|
+
See [#454](https://github.com/typescript-eslint/typescript-eslint/issues/454) for details.
|
|
@@ -11,10 +11,12 @@ Ensures that each function is only capable of:
|
|
|
11
11
|
- returning a rejected promise, or
|
|
12
12
|
- throwing an Error object.
|
|
13
13
|
|
|
14
|
-
In contrast, non-`async
|
|
14
|
+
In contrast, non-`async`, `Promise`-returning functions are technically capable of either.
|
|
15
15
|
Code that handles the results of those functions will often need to handle both cases, which can get complex.
|
|
16
16
|
This rule's practice removes a requirement for creating code to handle both cases.
|
|
17
17
|
|
|
18
|
+
> When functions return unions of `Promise` and non-`Promise` types implicitly, it is usually a mistake—this rule flags those cases. If it is intentional, make the return type explicitly to allow the rule to pass.
|
|
19
|
+
|
|
18
20
|
## Examples
|
|
19
21
|
|
|
20
22
|
Examples of code for this rule
|
|
@@ -29,6 +31,10 @@ const arrowFunctionReturnsPromise = () => Promise.resolve('value');
|
|
|
29
31
|
function functionReturnsPromise() {
|
|
30
32
|
return Promise.resolve('value');
|
|
31
33
|
}
|
|
34
|
+
|
|
35
|
+
function functionReturnsUnionWithPromiseImplicitly(p: boolean) {
|
|
36
|
+
return p ? 'value' : Promise.resolve('value');
|
|
37
|
+
}
|
|
32
38
|
```
|
|
33
39
|
|
|
34
40
|
### ✅ Correct
|
|
@@ -39,4 +45,15 @@ const arrowFunctionReturnsPromise = async () => Promise.resolve('value');
|
|
|
39
45
|
async function functionReturnsPromise() {
|
|
40
46
|
return Promise.resolve('value');
|
|
41
47
|
}
|
|
48
|
+
|
|
49
|
+
// An explicit return type that is not Promise means this function cannot be made async, so it is ignored by the rule
|
|
50
|
+
function functionReturnsUnionWithPromiseExplicitly(
|
|
51
|
+
p: boolean,
|
|
52
|
+
): string | Promise<string> {
|
|
53
|
+
return p ? 'value' : Promise.resolve('value');
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
async function functionReturnsUnionWithPromiseImplicitly(p: boolean) {
|
|
57
|
+
return p ? 'value' : Promise.resolve('value');
|
|
58
|
+
}
|
|
42
59
|
```
|
package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/restrict-template-expressions.md
CHANGED
|
@@ -90,6 +90,15 @@ const arg = /foo/;
|
|
|
90
90
|
const msg1 = `arg = ${arg}`;
|
|
91
91
|
```
|
|
92
92
|
|
|
93
|
+
### `allowNever`
|
|
94
|
+
|
|
95
|
+
Examples of additional **correct** code for this rule with `{ allowNever: true }`:
|
|
96
|
+
|
|
97
|
+
```ts
|
|
98
|
+
const arg = 'something';
|
|
99
|
+
const msg1 = typeof arg === 'string' ? arg : `arg = ${arg}`;
|
|
100
|
+
```
|
|
101
|
+
|
|
93
102
|
## Related To
|
|
94
103
|
|
|
95
104
|
- [`no-base-to-string`](./no-base-to-string.md)
|
package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/strict-boolean-expressions.md
CHANGED
|
@@ -124,6 +124,12 @@ Allows `number | null | undefined` in a boolean context.
|
|
|
124
124
|
This is unsafe because nullable numbers can be either a falsy number or nullish.
|
|
125
125
|
Set this to `true` if you don't mind implicitly treating zero or NaN the same as a nullish value.
|
|
126
126
|
|
|
127
|
+
### `allowNullableEnum`
|
|
128
|
+
|
|
129
|
+
Allows `enum | null | undefined` in a boolean context.
|
|
130
|
+
This is unsafe because nullable enums can be either a falsy number or nullish.
|
|
131
|
+
Set this to `true` if you don't mind implicitly treating an enum whose value is zero the same as a nullish value.
|
|
132
|
+
|
|
127
133
|
### `allowAny`
|
|
128
134
|
|
|
129
135
|
Allows `any` in a boolean context.
|
|
@@ -38,6 +38,13 @@ function x(x: number | string): void;
|
|
|
38
38
|
function y(...x: number[]): void;
|
|
39
39
|
```
|
|
40
40
|
|
|
41
|
+
```ts
|
|
42
|
+
// This rule won't check overload signatures with different rest parameter types.
|
|
43
|
+
// See https://github.com/microsoft/TypeScript/issues/5077
|
|
44
|
+
function f(...a: number[]): void;
|
|
45
|
+
function f(...a: string[]): void;
|
|
46
|
+
```
|
|
47
|
+
|
|
41
48
|
## Options
|
|
42
49
|
|
|
43
50
|
### `ignoreDifferentlyNamedParameters`
|
|
@@ -53,11 +60,6 @@ function f(a: number): void;
|
|
|
53
60
|
function f(a: string): void;
|
|
54
61
|
```
|
|
55
62
|
|
|
56
|
-
```ts
|
|
57
|
-
function f(...a: number[]): void;
|
|
58
|
-
function f(...b: string[]): void;
|
|
59
|
-
```
|
|
60
|
-
|
|
61
63
|
### ✅ Correct
|
|
62
64
|
|
|
63
65
|
```ts
|
|
@@ -65,9 +67,4 @@ function f(a: number): void;
|
|
|
65
67
|
function f(b: string): void;
|
|
66
68
|
```
|
|
67
69
|
|
|
68
|
-
```ts
|
|
69
|
-
function f(...a: number[]): void;
|
|
70
|
-
function f(...a: string[]): void;
|
|
71
|
-
```
|
|
72
|
-
|
|
73
70
|
## Options
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@typescript-eslint/eslint-plugin",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.57.1",
|
|
4
4
|
"description": "TypeScript plugin for ESLint",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"eslint",
|
|
@@ -37,20 +37,21 @@
|
|
|
37
37
|
"clean": "tsc -b tsconfig.build.json --clean",
|
|
38
38
|
"postclean": "rimraf dist && rimraf coverage",
|
|
39
39
|
"format": "prettier --write \"./**/*.{ts,mts,cts,tsx,js,mjs,cjs,jsx,json,md,css}\" --ignore-path ../../.prettierignore",
|
|
40
|
-
"generate:
|
|
41
|
-
"generate:
|
|
42
|
-
"lint": "
|
|
40
|
+
"generate:breaking-changes": "yarn tsx tools/generate-breaking-changes.ts",
|
|
41
|
+
"generate:configs": "yarn tsx tools/generate-configs.ts",
|
|
42
|
+
"lint": "nx lint",
|
|
43
43
|
"test": "jest --coverage",
|
|
44
44
|
"typecheck": "tsc -p tsconfig.json --noEmit"
|
|
45
45
|
},
|
|
46
46
|
"dependencies": {
|
|
47
|
-
"@
|
|
48
|
-
"@typescript-eslint/
|
|
49
|
-
"@typescript-eslint/utils": "5.
|
|
47
|
+
"@eslint-community/regexpp": "^4.4.0",
|
|
48
|
+
"@typescript-eslint/scope-manager": "5.57.1",
|
|
49
|
+
"@typescript-eslint/type-utils": "5.57.1",
|
|
50
|
+
"@typescript-eslint/utils": "5.57.1",
|
|
50
51
|
"debug": "^4.3.4",
|
|
52
|
+
"grapheme-splitter": "^1.0.4",
|
|
51
53
|
"ignore": "^5.2.0",
|
|
52
54
|
"natural-compare-lite": "^1.4.0",
|
|
53
|
-
"regexpp": "^3.2.0",
|
|
54
55
|
"semver": "^7.3.7",
|
|
55
56
|
"tsutils": "^3.21.0"
|
|
56
57
|
},
|
|
@@ -61,7 +62,10 @@
|
|
|
61
62
|
"@types/natural-compare-lite": "^1.4.0",
|
|
62
63
|
"@types/prettier": "*",
|
|
63
64
|
"chalk": "^5.0.1",
|
|
65
|
+
"cross-fetch": "^3.1.5",
|
|
66
|
+
"grapheme-splitter": "^1.0.4",
|
|
64
67
|
"json-schema": "*",
|
|
68
|
+
"markdown-table": "^3.0.2",
|
|
65
69
|
"marked": "^4.0.15",
|
|
66
70
|
"prettier": "*",
|
|
67
71
|
"title-case": "^3.0.3",
|
|
@@ -80,5 +84,5 @@
|
|
|
80
84
|
"type": "opencollective",
|
|
81
85
|
"url": "https://opencollective.com/typescript-eslint"
|
|
82
86
|
},
|
|
83
|
-
"gitHead": "
|
|
87
|
+
"gitHead": "772b19cd4b3d565670c07a1a42b36ee082a20387"
|
|
84
88
|
}
|
|
@@ -4,11 +4,11 @@ Copyright JS Foundation and other contributors, https://js.foundation
|
|
|
4
4
|
Redistribution and use in source and binary forms, with or without
|
|
5
5
|
modification, are permitted provided that the following conditions are met:
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
7
|
+
- Redistributions of source code must retain the above copyright
|
|
8
|
+
notice, this list of conditions and the following disclaimer.
|
|
9
|
+
- Redistributions in binary form must reproduce the above copyright
|
|
10
|
+
notice, this list of conditions and the following disclaimer in the
|
|
11
|
+
documentation and/or other materials provided with the distribution.
|
|
12
12
|
|
|
13
13
|
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
|
14
14
|
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
|
@@ -1,304 +1,10 @@
|
|
|
1
|
-
|
|
1
|
+
# `@typescript-eslint/parser`
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
> An ESLint parser which leverages <a href="https://github.com/typescript-eslint/typescript-eslint/tree/main/packages/typescript-estree">TypeScript ESTree</a> to allow for ESLint to lint TypeScript source code.
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
<a href="https://www.npmjs.com/package/@typescript-eslint/parser"><img src="https://img.shields.io/npm/v/@typescript-eslint/parser.svg?style=flat-square" alt="NPM Version" /></a>
|
|
8
|
-
<a href="https://www.npmjs.com/package/@typescript-eslint/parser"><img src="https://img.shields.io/npm/dm/@typescript-eslint/parser.svg?style=flat-square" alt="NPM Downloads" /></a>
|
|
9
|
-
</p>
|
|
5
|
+
[](https://www.npmjs.com/package/@typescript-eslint/parser)
|
|
6
|
+
[](https://www.npmjs.com/package/@typescript-eslint/parser)
|
|
10
7
|
|
|
11
|
-
|
|
8
|
+
👉 See **https://typescript-eslint.io/architecture/parser** for documentation on this package.
|
|
12
9
|
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
These docs walk you through setting up ESLint, this parser, and our plugin. If you know what you're doing and just want to quick start, read on...
|
|
16
|
-
|
|
17
|
-
## Quick-start
|
|
18
|
-
|
|
19
|
-
### Installation
|
|
20
|
-
|
|
21
|
-
```bash
|
|
22
|
-
$ yarn add -D typescript @typescript-eslint/parser
|
|
23
|
-
$ npm i --save-dev typescript @typescript-eslint/parser
|
|
24
|
-
```
|
|
25
|
-
|
|
26
|
-
### Usage
|
|
27
|
-
|
|
28
|
-
In your ESLint configuration file, set the `parser` property:
|
|
29
|
-
|
|
30
|
-
```json
|
|
31
|
-
{
|
|
32
|
-
"parser": "@typescript-eslint/parser"
|
|
33
|
-
}
|
|
34
|
-
```
|
|
35
|
-
|
|
36
|
-
There is sometimes an incorrect assumption that the parser itself is what does everything necessary to facilitate the use of ESLint with TypeScript. In actuality, it is the combination of the parser _and_ one or more plugins which allow you to maximize your usage of ESLint with TypeScript.
|
|
37
|
-
|
|
38
|
-
For example, once this parser successfully produces an AST for the TypeScript source code, it might well contain some information which simply does not exist in a standard JavaScript context, such as the data for a TypeScript-specific construct, like an `interface`.
|
|
39
|
-
|
|
40
|
-
The core rules built into ESLint, such as `indent` have no knowledge of such constructs, so it is impossible to expect them to work out of the box with them.
|
|
41
|
-
|
|
42
|
-
Instead, you also need to make use of one more plugins which will add or extend rules with TypeScript-specific features.
|
|
43
|
-
|
|
44
|
-
By far the most common case will be installing the [`@typescript-eslint/eslint-plugin`](https://github.com/typescript-eslint/typescript-eslint/tree/main/packages/eslint-plugin) plugin, but there are also other relevant options available such a [`@typescript-eslint/eslint-plugin-tslint`](https://github.com/typescript-eslint/typescript-eslint/tree/main/packages/eslint-plugin-tslint).
|
|
45
|
-
|
|
46
|
-
## Configuration
|
|
47
|
-
|
|
48
|
-
The following additional configuration options are available by specifying them in [`parserOptions`](https://eslint.org/docs/user-guide/configuring/language-options#specifying-parser-options) in your ESLint configuration file.
|
|
49
|
-
|
|
50
|
-
```ts
|
|
51
|
-
interface ParserOptions {
|
|
52
|
-
ecmaFeatures?: {
|
|
53
|
-
jsx?: boolean;
|
|
54
|
-
globalReturn?: boolean;
|
|
55
|
-
};
|
|
56
|
-
ecmaVersion?: number | 'latest';
|
|
57
|
-
|
|
58
|
-
jsxPragma?: string | null;
|
|
59
|
-
jsxFragmentName?: string | null;
|
|
60
|
-
lib?: string[];
|
|
61
|
-
|
|
62
|
-
project?: string | string[];
|
|
63
|
-
projectFolderIgnoreList?: string[];
|
|
64
|
-
tsconfigRootDir?: string;
|
|
65
|
-
extraFileExtensions?: string[];
|
|
66
|
-
warnOnUnsupportedTypeScriptVersion?: boolean;
|
|
67
|
-
|
|
68
|
-
program?: import('typescript').Program;
|
|
69
|
-
moduleResolver?: string;
|
|
70
|
-
|
|
71
|
-
emitDecoratorMetadata?: boolean;
|
|
72
|
-
}
|
|
73
|
-
```
|
|
74
|
-
|
|
75
|
-
### `parserOptions.ecmaFeatures.jsx`
|
|
76
|
-
|
|
77
|
-
Default `false`.
|
|
78
|
-
|
|
79
|
-
Enable parsing JSX when `true`. More details can be found [here](https://www.typescriptlang.org/docs/handbook/jsx.html).
|
|
80
|
-
|
|
81
|
-
**NOTE:** this setting does not affect known file types (`.js`, `.mjs`, `.cjs`, `.jsx`, `.ts`, `.mts`, `.cts`, `.tsx`, `.json`) because the TypeScript compiler has its own internal handling for known file extensions.
|
|
82
|
-
|
|
83
|
-
<!-- https://github.com/microsoft/TypeScript/blob/d6e483b8dabd8fd37c00954c3f2184bb7f1eb90c/src/compiler/utilities.ts#L6281-L6285 -->
|
|
84
|
-
|
|
85
|
-
The exact behavior is as follows:
|
|
86
|
-
|
|
87
|
-
- `.js`, `.mjs`, `.cjs`, `.jsx`, `.tsx` files are always parsed as if this is `true`.
|
|
88
|
-
- `.ts`, `.mts`, `.cts` files are always parsed as if this is `false`.
|
|
89
|
-
- For "unknown" extensions (`.md`, `.vue`):
|
|
90
|
-
- If `parserOptions.project` is _not_ provided:
|
|
91
|
-
- The setting will be respected.
|
|
92
|
-
- If `parserOptions.project` is provided (i.e. you are using rules with type information):
|
|
93
|
-
- **always parsed as if this is `false`**
|
|
94
|
-
|
|
95
|
-
### `parserOptions.ecmaFeatures.globalReturn`
|
|
96
|
-
|
|
97
|
-
Default `false`.
|
|
98
|
-
|
|
99
|
-
This options allows you to tell the parser if you want to allow global `return` statements in your codebase.
|
|
100
|
-
|
|
101
|
-
### `parserOptions.ecmaVersion`
|
|
102
|
-
|
|
103
|
-
Default `2018`.
|
|
104
|
-
|
|
105
|
-
Accepts any valid ECMAScript version number or `'latest'`:
|
|
106
|
-
|
|
107
|
-
- A version: es3, es5, es6, es7, es8, es9, es10, es11, es12, es13, ..., or
|
|
108
|
-
- A year: es2015, es2016, es2017, es2018, es2019, es2020, es2021, es2022, ..., or
|
|
109
|
-
- `'latest'`
|
|
110
|
-
|
|
111
|
-
When it's a version or a year, the value **must** be a number - so do not include the `es` prefix.
|
|
112
|
-
|
|
113
|
-
Specifies the version of ECMAScript syntax you want to use. This is used by the parser to determine how to perform scope analysis, and it affects the default
|
|
114
|
-
|
|
115
|
-
### `parserOptions.jsxPragma`
|
|
116
|
-
|
|
117
|
-
Default `'React'`
|
|
118
|
-
|
|
119
|
-
The identifier that's used for JSX Elements creation (after transpilation).
|
|
120
|
-
If you're using a library other than React (like `preact`), then you should change this value. If you are using the [new JSX transform](https://reactjs.org/blog/2020/09/22/introducing-the-new-jsx-transform.html) you can set this to `null`.
|
|
121
|
-
|
|
122
|
-
This should not be a member expression - just the root identifier (i.e. use `"React"` instead of `"React.createElement"`).
|
|
123
|
-
|
|
124
|
-
If you provide `parserOptions.project`, you do not need to set this, as it will automatically detected from the compiler.
|
|
125
|
-
|
|
126
|
-
### `parserOptions.jsxFragmentName`
|
|
127
|
-
|
|
128
|
-
Default `null`
|
|
129
|
-
|
|
130
|
-
The identifier that's used for JSX fragment elements (after transpilation).
|
|
131
|
-
If `null`, assumes transpilation will always use a member of the configured `jsxPragma`.
|
|
132
|
-
This should not be a member expression - just the root identifier (i.e. use `"h"` instead of `"h.Fragment"`).
|
|
133
|
-
|
|
134
|
-
If you provide `parserOptions.project`, you do not need to set this, as it will automatically detected from the compiler.
|
|
135
|
-
|
|
136
|
-
### `parserOptions.lib`
|
|
137
|
-
|
|
138
|
-
Default `['es2018']`
|
|
139
|
-
|
|
140
|
-
For valid options, see the [TypeScript compiler options](https://www.typescriptlang.org/tsconfig#lib).
|
|
141
|
-
|
|
142
|
-
Specifies the TypeScript `lib`s that are available. This is used by the scope analyser to ensure there are global variables declared for the types exposed by TypeScript.
|
|
143
|
-
|
|
144
|
-
If you provide `parserOptions.project`, you do not need to set this, as it will automatically detected from the compiler.
|
|
145
|
-
|
|
146
|
-
### `parserOptions.project`
|
|
147
|
-
|
|
148
|
-
Default `undefined`.
|
|
149
|
-
|
|
150
|
-
This option allows you to provide a path to your project's `tsconfig.json`. **This setting is required if you want to use rules which require type information**. Relative paths are interpreted relative to the current working directory if `tsconfigRootDir` is not set. If you intend on running ESLint from directories other than the project root, you should consider using `tsconfigRootDir`.
|
|
151
|
-
|
|
152
|
-
- Accepted values:
|
|
153
|
-
|
|
154
|
-
```js
|
|
155
|
-
// path
|
|
156
|
-
project: './tsconfig.json';
|
|
157
|
-
|
|
158
|
-
// glob pattern
|
|
159
|
-
project: './packages/**/tsconfig.json';
|
|
160
|
-
|
|
161
|
-
// array of paths and/or glob patterns
|
|
162
|
-
project: ['./packages/**/tsconfig.json', './separate-package/tsconfig.json'];
|
|
163
|
-
```
|
|
164
|
-
|
|
165
|
-
- If you use project references, TypeScript will not automatically use project references to resolve files. This means that you will have to add each referenced tsconfig to the `project` field either separately, or via a glob.
|
|
166
|
-
|
|
167
|
-
- Note that using wide globs `**` in your `parserOptions.project` may cause performance implications. Instead of globs that use `**` to recursively check all folders, prefer paths that use a single `*` at a time. For more info see [#2611](https://github.com/typescript-eslint/typescript-eslint/issues/2611).
|
|
168
|
-
|
|
169
|
-
- TypeScript will ignore files with duplicate filenames in the same folder (for example, `src/file.ts` and `src/file.js`). TypeScript purposely ignore all but one of the files, only keeping the one file with the highest priority extension (the extension priority order (from highest to lowest) is `.ts`, `.tsx`, `.d.ts`, `.js`, `.jsx`). For more info see #955.
|
|
170
|
-
|
|
171
|
-
- Note that if this setting is specified and `createDefaultProgram` is not, you must only lint files that are included in the projects as defined by the provided `tsconfig.json` files. If your existing configuration does not include all of the files you would like to lint, you can create a separate `tsconfig.eslint.json` as follows:
|
|
172
|
-
|
|
173
|
-
```jsonc
|
|
174
|
-
{
|
|
175
|
-
// extend your base config so you don't have to redefine your compilerOptions
|
|
176
|
-
"extends": "./tsconfig.json",
|
|
177
|
-
"include": [
|
|
178
|
-
"src/**/*.ts",
|
|
179
|
-
"test/**/*.ts",
|
|
180
|
-
"typings/**/*.ts",
|
|
181
|
-
// etc
|
|
182
|
-
|
|
183
|
-
// if you have a mixed JS/TS codebase, don't forget to include your JS files
|
|
184
|
-
"src/**/*.js"
|
|
185
|
-
]
|
|
186
|
-
}
|
|
187
|
-
```
|
|
188
|
-
|
|
189
|
-
### `parserOptions.tsconfigRootDir`
|
|
190
|
-
|
|
191
|
-
Default `undefined`.
|
|
192
|
-
|
|
193
|
-
This option allows you to provide the root directory for relative tsconfig paths specified in the `project` option above.
|
|
194
|
-
|
|
195
|
-
### `parserOptions.projectFolderIgnoreList`
|
|
196
|
-
|
|
197
|
-
Default `["**/node_modules/**"]`.
|
|
198
|
-
|
|
199
|
-
This option allows you to ignore folders from being included in your provided list of `project`s.
|
|
200
|
-
This is useful if you have configured glob patterns, but want to make sure you ignore certain folders.
|
|
201
|
-
|
|
202
|
-
It accepts an array of globs to exclude from the `project` globs.
|
|
203
|
-
|
|
204
|
-
For example, by default it will ensure that a glob like `./**/tsconfig.json` will not match any `tsconfig`s within your `node_modules` folder (some npm packages do not exclude their source files from their published packages).
|
|
205
|
-
|
|
206
|
-
### `parserOptions.extraFileExtensions`
|
|
207
|
-
|
|
208
|
-
Default `undefined`.
|
|
209
|
-
|
|
210
|
-
This option allows you to provide one or more additional file extensions which should be considered in the TypeScript Program compilation.
|
|
211
|
-
The default extensions are `['.js', '.mjs', '.cjs', '.jsx', '.ts', '.mts', '.cts', '.tsx']`.
|
|
212
|
-
Add extensions starting with `.`, followed by the file extension. E.g. for a `.vue` file use `"extraFileExtensions": [".vue"]`.
|
|
213
|
-
|
|
214
|
-
### `parserOptions.warnOnUnsupportedTypeScriptVersion`
|
|
215
|
-
|
|
216
|
-
Default `true`.
|
|
217
|
-
|
|
218
|
-
This option allows you to toggle the warning that the parser will give you if you use a version of TypeScript which is not explicitly supported
|
|
219
|
-
|
|
220
|
-
### `parserOptions.createDefaultProgram`
|
|
221
|
-
|
|
222
|
-
Default `false`.
|
|
223
|
-
|
|
224
|
-
This option allows you to request that when the `project` setting is specified, files will be allowed when not included in the projects defined by the provided `tsconfig.json` files. **Using this option will incur significant performance costs. This option is primarily included for backwards-compatibility.** See the **`project`** section above for more information.
|
|
225
|
-
|
|
226
|
-
### `parserOptions.programs`
|
|
227
|
-
|
|
228
|
-
Default `undefined`.
|
|
229
|
-
|
|
230
|
-
This option allows you to programmatically provide an array of one or more instances of a TypeScript Program object that will provide type information to rules.
|
|
231
|
-
This will override any programs that would have been computed from `parserOptions.project` or `parserOptions.createDefaultProgram`.
|
|
232
|
-
All linted files must be part of the provided program(s).
|
|
233
|
-
|
|
234
|
-
### `parserOptions.moduleResolver`
|
|
235
|
-
|
|
236
|
-
Default `undefined`.
|
|
237
|
-
|
|
238
|
-
This option allows you to provide a custom module resolution. The value should point to a JS file that default exports (`export default`, or `module.exports =`, or `export =`) a file with the following interface:
|
|
239
|
-
|
|
240
|
-
```ts
|
|
241
|
-
interface ModuleResolver {
|
|
242
|
-
version: 1;
|
|
243
|
-
resolveModuleNames(
|
|
244
|
-
moduleNames: string[],
|
|
245
|
-
containingFile: string,
|
|
246
|
-
reusedNames: string[] | undefined,
|
|
247
|
-
redirectedReference: ts.ResolvedProjectReference | undefined,
|
|
248
|
-
options: ts.CompilerOptions,
|
|
249
|
-
): (ts.ResolvedModule | undefined)[];
|
|
250
|
-
}
|
|
251
|
-
```
|
|
252
|
-
|
|
253
|
-
[Refer to the TypeScript Wiki for an example on how to write the `resolveModuleNames` function](https://github.com/Microsoft/TypeScript/wiki/Using-the-Compiler-API#customizing-module-resolution).
|
|
254
|
-
|
|
255
|
-
Note that if you pass custom programs via `options.programs` this option will not have any effect over them (you can simply add the custom resolution on them directly).
|
|
256
|
-
|
|
257
|
-
### `parserOptions.emitDecoratorMetadata`
|
|
258
|
-
|
|
259
|
-
Default `undefined`.
|
|
260
|
-
|
|
261
|
-
This option allow you to tell parser to act as if `emitDecoratorMetadata: true` is set in `tsconfig.json`, but without [type-aware linting](https://typescript-eslint.io/docs/linting/typed-linting). In other words, you don't have to specify `parserOptions.project` in this case, making the linting process faster.
|
|
262
|
-
|
|
263
|
-
## Utilities
|
|
264
|
-
|
|
265
|
-
### `createProgram(configFile, projectDirectory)`
|
|
266
|
-
|
|
267
|
-
This serves as a utility method for users of the `parserOptions.programs` feature to create a TypeScript program instance from a config file.
|
|
268
|
-
|
|
269
|
-
```ts
|
|
270
|
-
declare function createProgram(
|
|
271
|
-
configFile: string,
|
|
272
|
-
projectDirectory?: string,
|
|
273
|
-
): import('typescript').Program;
|
|
274
|
-
```
|
|
275
|
-
|
|
276
|
-
Example usage in .eslintrc.js:
|
|
277
|
-
|
|
278
|
-
```js
|
|
279
|
-
const parser = require('@typescript-eslint/parser');
|
|
280
|
-
const programs = [parser.createProgram('tsconfig.json')];
|
|
281
|
-
module.exports = {
|
|
282
|
-
parserOptions: {
|
|
283
|
-
programs,
|
|
284
|
-
},
|
|
285
|
-
};
|
|
286
|
-
```
|
|
287
|
-
|
|
288
|
-
## Supported TypeScript Version
|
|
289
|
-
|
|
290
|
-
Please see [`typescript-eslint`](https://github.com/typescript-eslint/typescript-eslint) for the supported TypeScript version.
|
|
291
|
-
|
|
292
|
-
**Please ensure that you are using a supported version before submitting any issues/bug reports.**
|
|
293
|
-
|
|
294
|
-
## Reporting Issues
|
|
295
|
-
|
|
296
|
-
Please use the `@typescript-eslint/parser` issue template when creating your issue and fill out the information requested as best you can. This will really help us when looking into your issue.
|
|
297
|
-
|
|
298
|
-
## License
|
|
299
|
-
|
|
300
|
-
TypeScript ESLint Parser is licensed under a permissive BSD 2-clause license.
|
|
301
|
-
|
|
302
|
-
## Contributing
|
|
303
|
-
|
|
304
|
-
[See the contributing guide here](../../CONTRIBUTING.md)
|
|
10
|
+
> See https://typescript-eslint.io for general documentation on typescript-eslint, the tooling that allows you to run ESLint and Prettier on TypeScript code.
|
|
@@ -1,4 +1,8 @@
|
|
|
1
1
|
export { parse, parseForESLint, ParserOptions } from './parser';
|
|
2
2
|
export { ParserServices, clearCaches, createProgram, } from '@typescript-eslint/typescript-estree';
|
|
3
3
|
export declare const version: string;
|
|
4
|
+
export declare const meta: {
|
|
5
|
+
name: string;
|
|
6
|
+
version: string;
|
|
7
|
+
};
|
|
4
8
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1,4 +1,8 @@
|
|
|
1
1
|
export { parse, parseForESLint, ParserOptions } from './parser';
|
|
2
2
|
export { ParserServices, clearCaches, createProgram, } from '@typescript-eslint/typescript-estree';
|
|
3
3
|
export declare const version: string;
|
|
4
|
+
export declare const meta: {
|
|
5
|
+
name: string;
|
|
6
|
+
version: string;
|
|
7
|
+
};
|
|
4
8
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,cAAc,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAChE,OAAO,EACL,cAAc,EACd,WAAW,EACX,aAAa,GACd,MAAM,sCAAsC,CAAC;AAI9C,eAAO,MAAM,OAAO,EAAE,MAA2C,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,cAAc,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAChE,OAAO,EACL,cAAc,EACd,WAAW,EACX,aAAa,GACd,MAAM,sCAAsC,CAAC;AAI9C,eAAO,MAAM,OAAO,EAAE,MAA2C,CAAC;AAElE,eAAO,MAAM,IAAI;;;CAGhB,CAAC"}
|