xo 0.49.0 → 0.52.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/cli.js +1 -1
- package/config/plugins.cjs +24 -24
- package/index.js +7 -2
- package/lib/constants.js +6 -6
- package/lib/options-manager.js +92 -9
- package/lib/report.js +3 -1
- package/node_modules/@typescript-eslint/eslint-plugin/README.md +2 -149
- package/node_modules/@typescript-eslint/eslint-plugin/dist/configs/all.js +1 -1
- package/node_modules/@typescript-eslint/eslint-plugin/dist/configs/all.js.map +1 -1
- package/node_modules/@typescript-eslint/eslint-plugin/dist/configs/eslint-recommended.js +1 -1
- package/node_modules/@typescript-eslint/eslint-plugin/dist/configs/eslint-recommended.js.map +1 -1
- package/node_modules/@typescript-eslint/eslint-plugin/dist/configs/strict.js +2 -6
- package/node_modules/@typescript-eslint/eslint-plugin/dist/configs/strict.js.map +1 -1
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/array-type.js +22 -9
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/array-type.js.map +1 -1
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/await-thenable.js +1 -1
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/await-thenable.js.map +1 -1
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/ban-ts-comment.js +70 -63
- 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-tslint-comment.js +1 -1
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/ban-tslint-comment.js.map +1 -1
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/ban-types.js +1 -1
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/ban-types.js.map +1 -1
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/class-literal-property-style.js +1 -1
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/comma-dangle.js +11 -11
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/comma-dangle.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 +100 -0
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/consistent-generic-constructors.js.map +1 -0
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/consistent-indexed-object-style.js +2 -2
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/consistent-indexed-object-style.js.map +1 -1
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/consistent-type-assertions.js +1 -1
- 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-definitions.js +1 -1
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/consistent-type-definitions.js.map +1 -1
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/consistent-type-exports.js +1 -1
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/consistent-type-exports.js.map +1 -1
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/consistent-type-imports.js +1 -1
- 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/dot-notation.js +1 -1
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/explicit-function-return-type.js +14 -8
- 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/explicit-member-accessibility.js +133 -43
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/explicit-member-accessibility.js.map +1 -1
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/explicit-module-boundary-types.js +12 -1
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/explicit-module-boundary-types.js.map +1 -1
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/index.js +2 -0
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/index.js.map +1 -1
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/init-declarations.js +1 -1
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/member-delimiter-style.js +18 -3
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/member-delimiter-style.js.map +1 -1
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/member-ordering.js +9 -2
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/member-ordering.js.map +1 -1
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/method-signature-style.js +1 -1
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/method-signature-style.js.map +1 -1
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/naming-convention.js +1 -1
- 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-base-to-string.js +2 -2
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-base-to-string.js.map +1 -1
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-confusing-void-expression.js +1 -1
- 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-enum-values.js +1 -1
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-duplicate-enum-values.js.map +1 -1
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-duplicate-imports.js +2 -0
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-duplicate-imports.js.map +1 -1
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-dynamic-delete.js +1 -1
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-dynamic-delete.js.map +1 -1
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-empty-function.js +11 -1
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-empty-function.js.map +1 -1
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-empty-interface.js +0 -1
- 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 +3 -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-extra-parens.js +8 -2
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-extra-parens.js.map +1 -1
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-extraneous-class.js +5 -1
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-extraneous-class.js.map +1 -1
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-floating-promises.js +9 -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-implicit-any-catch.js +1 -1
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-implicit-any-catch.js.map +1 -1
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-inferrable-types.js +10 -2
- 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-invalid-void-type.js +1 -1
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-invalid-void-type.js.map +1 -1
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-meaningless-void-operator.js +0 -1
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-meaningless-void-operator.js.map +1 -1
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-misused-promises.js +29 -3
- 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-namespace.js +3 -1
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-namespace.js.map +1 -1
- 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-non-null-asserted-optional-chain.js +1 -2
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-non-null-asserted-optional-chain.js.map +1 -1
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-non-null-assertion.js +1 -2
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-non-null-assertion.js.map +1 -1
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-require-imports.js +1 -1
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-require-imports.js.map +1 -1
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-shadow.js +38 -8
- 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-this-alias.js +2 -0
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-this-alias.js.map +1 -1
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-type-alias.js +10 -1
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-type-alias.js.map +1 -1
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-unnecessary-boolean-literal-compare.js +3 -1
- 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 +3 -1
- 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 +1 -1
- 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-unnecessary-type-arguments.js +1 -1
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-unnecessary-type-arguments.js.map +1 -1
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-unnecessary-type-assertion.js +2 -1
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-unnecessary-type-assertion.js.map +1 -1
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-unnecessary-type-constraint.js +4 -2
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-unnecessary-type-constraint.js.map +1 -1
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-unsafe-argument.js +8 -8
- 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-assignment.js +8 -8
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-unsafe-assignment.js.map +1 -1
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-unsafe-call.js +1 -1
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-unsafe-call.js.map +1 -1
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-unsafe-member-access.js +4 -4
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-unsafe-member-access.js.map +1 -1
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-unsafe-return.js +1 -1
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-unsafe-return.js.map +1 -1
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-unused-vars.js +4 -3
- 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 +42 -12
- 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/no-useless-constructor.js +6 -3
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-useless-constructor.js.map +1 -1
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-useless-empty-export.js +1 -2
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-useless-empty-export.js.map +1 -1
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-var-requires.js +1 -1
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-var-requires.js.map +1 -1
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/non-nullable-type-assertion-style.js +1 -2
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/non-nullable-type-assertion-style.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 +6 -6
- 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/parameter-properties.js +32 -24
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/parameter-properties.js.map +1 -1
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-as-const.js +6 -2
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-as-const.js.map +1 -1
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-enum-initializers.js +1 -2
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-enum-initializers.js.map +1 -1
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-for-of.js +1 -1
- 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 +1 -1
- 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-literal-enum-member.js +1 -1
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-literal-enum-member.js.map +1 -1
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-namespace-keyword.js +1 -1
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-namespace-keyword.js.map +1 -1
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-nullish-coalescing.js +134 -5
- 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 +166 -86
- 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-parameter-types.js +1 -1
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-readonly-parameter-types.js.map +1 -1
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-readonly.js +8 -3
- 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-reduce-type-parameter.js +1 -1
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-reduce-type-parameter.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 +1 -1
- 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/prefer-ts-expect-error.js +1 -1
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-ts-expect-error.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 +2 -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/require-await.js +1 -1
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/require-await.js.map +1 -1
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/restrict-plus-operands.js +3 -1
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/restrict-plus-operands.js.map +1 -1
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/restrict-template-expressions.js +21 -6
- 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/return-await.js +2 -2
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/return-await.js.map +1 -1
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/sort-type-union-intersection-members.js +4 -1
- 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 -1
- 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 +1 -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/space-infix-ops.js +22 -26
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/space-infix-ops.js.map +1 -1
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/strict-boolean-expressions.js +1 -1
- 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 -2
- 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/typedef.js +24 -20
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/typedef.js.map +1 -1
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/unbound-method.js +2 -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 +2 -1
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/unified-signatures.js.map +1 -1
- package/node_modules/@typescript-eslint/eslint-plugin/dist/util/index.js +3 -0
- package/node_modules/@typescript-eslint/eslint-plugin/dist/util/index.js.map +1 -1
- package/node_modules/@typescript-eslint/eslint-plugin/dist/util/isNodeEqual.js +27 -0
- package/node_modules/@typescript-eslint/eslint-plugin/dist/util/isNodeEqual.js.map +1 -0
- package/node_modules/@typescript-eslint/eslint-plugin/dist/util/isNullLiteral.js +9 -0
- package/node_modules/@typescript-eslint/eslint-plugin/dist/util/isNullLiteral.js.map +1 -0
- package/node_modules/@typescript-eslint/eslint-plugin/dist/util/isUndefinedIdentifier.js +9 -0
- package/node_modules/@typescript-eslint/eslint-plugin/dist/util/isUndefinedIdentifier.js.map +1 -0
- package/node_modules/@typescript-eslint/eslint-plugin/dist/util/misc.js +36 -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 +4 -141
- package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/TEMPLATE.md +3 -38
- package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/adjacent-overload-signatures.md +6 -27
- package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/array-type.md +6 -33
- package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/await-thenable.md +6 -27
- package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/ban-ts-comment.md +30 -33
- package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/ban-tslint-comment.md +6 -23
- package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/ban-types.md +77 -101
- package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/brace-style.md +6 -30
- package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/camelcase.md +3 -1
- package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/class-literal-property-style.md +9 -13
- package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/comma-dangle.md +10 -36
- package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/comma-spacing.md +6 -30
- package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/consistent-generic-constructors.md +73 -0
- package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/consistent-indexed-object-style.md +19 -29
- package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/consistent-type-assertions.md +9 -34
- package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/consistent-type-definitions.md +15 -30
- package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/consistent-type-exports.md +9 -24
- package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/consistent-type-imports.md +9 -27
- package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/default-param-last.md +8 -32
- package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/dot-notation.md +10 -30
- package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/explicit-function-return-type.md +9 -43
- package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/explicit-member-accessibility.md +9 -40
- package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/explicit-module-boundary-types.md +12 -57
- package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/func-call-spacing.md +6 -30
- package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/indent.md +11 -31
- package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/init-declarations.md +6 -30
- package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/keyword-spacing.md +6 -30
- package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/lines-between-class-members.md +8 -32
- package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/member-delimiter-style.md +6 -10
- package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/member-ordering.md +34 -21
- package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/method-signature-style.md +6 -10
- package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/naming-convention.md +6 -10
- package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-array-constructor.md +6 -30
- package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-base-to-string.md +8 -20
- package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-confusing-non-null-assertion.md +6 -23
- package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-confusing-void-expression.md +6 -50
- package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-dupe-class-members.md +6 -30
- package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-duplicate-enum-values.md +10 -27
- package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-duplicate-imports.md +9 -33
- package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-dynamic-delete.md +6 -27
- package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-empty-function.md +20 -34
- package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-empty-interface.md +6 -14
- package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-explicit-any.md +6 -30
- package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-extra-non-null-assertion.md +6 -23
- package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-extra-parens.md +6 -30
- package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-extra-semi.md +6 -30
- package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-extraneous-class.md +252 -50
- package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-floating-promises.md +6 -27
- package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-for-in-array.md +6 -29
- package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-implicit-any-catch.md +13 -28
- package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-implied-eval.md +6 -26
- package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-inferrable-types.md +11 -39
- package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-invalid-this.md +6 -34
- package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-invalid-void-type.md +6 -26
- package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-loop-func.md +6 -30
- package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-loss-of-precision.md +6 -27
- package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-magic-numbers.md +6 -32
- package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-meaningless-void-operator.md +7 -11
- package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-misused-new.md +6 -27
- package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-misused-promises.md +62 -13
- package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-namespace.md +10 -25
- package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-non-null-asserted-nullish-coalescing.md +6 -23
- package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-non-null-asserted-optional-chain.md +6 -23
- package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-non-null-assertion.md +6 -27
- package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-parameter-properties.md +11 -14
- package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-redeclare.md +6 -27
- package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-redundant-type-constituents.md +6 -23
- package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-require-imports.md +6 -27
- package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-restricted-imports.md +6 -21
- package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-shadow.md +6 -27
- package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-this-alias.md +24 -50
- package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-throw-literal.md +25 -37
- package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-type-alias.md +22 -26
- package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-unnecessary-boolean-literal-compare.md +6 -34
- package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-unnecessary-condition.md +6 -24
- package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-unnecessary-qualifier.md +6 -27
- package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-unnecessary-type-arguments.md +6 -27
- package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-unnecessary-type-assertion.md +8 -16
- package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-unnecessary-type-constraint.md +6 -23
- package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-unsafe-argument.md +6 -24
- package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-unsafe-assignment.md +6 -24
- package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-unsafe-call.md +6 -24
- package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-unsafe-member-access.md +6 -24
- package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-unsafe-return.md +6 -24
- package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-unused-expressions.md +6 -30
- package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-unused-vars.md +6 -30
- package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-use-before-define.md +6 -31
- package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-useless-constructor.md +7 -31
- package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-useless-empty-export.md +6 -23
- package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-var-requires.md +6 -27
- package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/non-nullable-type-assertion-style.md +6 -23
- package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/object-curly-spacing.md +6 -30
- package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/padding-line-between-statements.md +10 -39
- package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/parameter-properties.md +6 -14
- package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/prefer-as-const.md +6 -23
- package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/prefer-enum-initializers.md +6 -23
- package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/prefer-for-of.md +6 -27
- package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/prefer-function-type.md +6 -27
- package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/prefer-includes.md +6 -23
- package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/prefer-literal-enum-member.md +6 -10
- package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/prefer-namespace-keyword.md +6 -27
- package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/prefer-nullish-coalescing.md +48 -10
- package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/prefer-optional-chain.md +18 -25
- package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/prefer-readonly-parameter-types.md +8 -25
- package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/prefer-readonly.md +6 -16
- package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/prefer-reduce-type-parameter.md +6 -23
- package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/prefer-regexp-exec.md +6 -23
- package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/prefer-return-this-type.md +6 -23
- package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/prefer-string-starts-ends-with.md +6 -24
- package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/prefer-ts-expect-error.md +6 -23
- package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/promise-function-async.md +6 -44
- package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/quotes.md +6 -30
- package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/require-array-sort-compare.md +6 -26
- package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/require-await.md +6 -28
- package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/restrict-plus-operands.md +6 -36
- package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/restrict-template-expressions.md +6 -35
- package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/return-await.md +6 -20
- package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/semi.md +6 -30
- package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/sort-type-union-intersection-members.md +6 -53
- package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/space-before-blocks.md +10 -30
- package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/space-before-function-paren.md +6 -30
- package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/space-infix-ops.md +7 -31
- package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/strict-boolean-expressions.md +6 -34
- package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/switch-exhaustiveness-check.md +6 -23
- package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/triple-slash-reference.md +9 -16
- package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/type-annotation-spacing.md +8 -26
- package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/typedef.md +12 -40
- package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/unbound-method.md +7 -35
- package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/unified-signatures.md +11 -29
- package/node_modules/@typescript-eslint/eslint-plugin/package.json +7 -7
- package/node_modules/@typescript-eslint/parser/README.md +15 -11
- package/node_modules/@typescript-eslint/parser/dist/parser.d.ts.map +1 -1
- package/node_modules/@typescript-eslint/parser/dist/parser.js +1 -8
- package/node_modules/@typescript-eslint/parser/dist/parser.js.map +1 -1
- package/node_modules/@typescript-eslint/parser/package.json +8 -7
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/base-config.d.ts +9 -9
- 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 +4 -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 -4
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/dom.js.map +1 -1
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2020.bigint.d.ts.map +1 -1
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2020.bigint.js +2 -11
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2020.bigint.js.map +1 -1
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2020.d.ts.map +1 -1
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2020.date.d.ts +3 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2020.date.d.ts.map +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2020.date.js +11 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2020.date.js.map +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2020.js +3 -1
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2020.js.map +1 -1
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2020.number.d.ts +3 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2020.number.d.ts.map +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2020.number.js +11 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2020.number.js.map +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2022.object.js +1 -1
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2022.object.js.map +1 -1
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.bigint.d.ts.map +1 -1
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.bigint.js +2 -11
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.bigint.js.map +1 -1
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/index.d.ts +2 -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 +4 -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.js +13 -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 +2 -0
- 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 +12 -4
- package/node_modules/@typescript-eslint/scope-manager/dist/referencer/ClassVisitor.js.map +1 -1
- package/node_modules/@typescript-eslint/scope-manager/dist/referencer/Referencer.d.ts +1 -0
- 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 +4 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/referencer/Referencer.js.map +1 -1
- package/node_modules/@typescript-eslint/scope-manager/dist/referencer/TypeVisitor.d.ts.map +1 -1
- package/node_modules/@typescript-eslint/scope-manager/dist/referencer/TypeVisitor.js +13 -7
- package/node_modules/@typescript-eslint/scope-manager/dist/referencer/TypeVisitor.js.map +1 -1
- package/node_modules/@typescript-eslint/scope-manager/dist/scope/ClassStaticBlockScope.d.ts +1 -1
- package/node_modules/@typescript-eslint/scope-manager/dist/scope/ClassStaticBlockScope.d.ts.map +1 -1
- package/node_modules/@typescript-eslint/scope-manager/package.json +6 -6
- package/node_modules/@typescript-eslint/type-utils/dist/isTypeReadonly.js +27 -27
- package/node_modules/@typescript-eslint/type-utils/dist/isTypeReadonly.js.map +1 -1
- package/node_modules/@typescript-eslint/type-utils/package.json +6 -6
- package/node_modules/@typescript-eslint/types/dist/generated/ast-spec.d.ts +412 -68
- 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 +1 -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 +1 -1
- package/node_modules/@typescript-eslint/types/dist/parser-options.d.ts.map +1 -1
- package/node_modules/@typescript-eslint/types/package.json +5 -4
- package/node_modules/@typescript-eslint/typescript-estree/README.md +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 +34 -13
- package/node_modules/@typescript-eslint/typescript-estree/dist/convert.js.map +1 -1
- package/node_modules/@typescript-eslint/typescript-estree/dist/create-program/createIsolatedProgram.d.ts.map +1 -1
- package/node_modules/@typescript-eslint/typescript-estree/dist/create-program/createIsolatedProgram.js +2 -1
- package/node_modules/@typescript-eslint/typescript-estree/dist/create-program/createIsolatedProgram.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 +34 -1
- 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/createSourceFile.js +2 -2
- package/node_modules/@typescript-eslint/typescript-estree/dist/create-program/createSourceFile.js.map +1 -1
- package/node_modules/@typescript-eslint/typescript-estree/dist/create-program/getScriptKind.d.ts +5 -0
- package/node_modules/@typescript-eslint/typescript-estree/dist/create-program/getScriptKind.d.ts.map +1 -0
- package/node_modules/@typescript-eslint/typescript-estree/dist/create-program/getScriptKind.js +72 -0
- package/node_modules/@typescript-eslint/typescript-estree/dist/create-program/getScriptKind.js.map +1 -0
- package/node_modules/@typescript-eslint/typescript-estree/dist/create-program/shared.d.ts +1 -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 +8 -23
- package/node_modules/@typescript-eslint/typescript-estree/dist/create-program/shared.js.map +1 -1
- package/node_modules/@typescript-eslint/typescript-estree/dist/index.d.ts +1 -0
- package/node_modules/@typescript-eslint/typescript-estree/dist/index.d.ts.map +1 -1
- package/node_modules/@typescript-eslint/typescript-estree/dist/index.js +1 -0
- 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 +3 -0
- 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 +21 -1
- package/node_modules/@typescript-eslint/typescript-estree/dist/node-utils.js.map +1 -1
- package/node_modules/@typescript-eslint/typescript-estree/dist/parser-options.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 +6 -3
- package/node_modules/@typescript-eslint/typescript-estree/dist/parser.js.map +1 -1
- package/node_modules/@typescript-eslint/typescript-estree/dist/ts-estree/estree-to-ts-node-types.d.ts +3 -2
- 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/package.json +8 -7
- package/node_modules/@typescript-eslint/utils/dist/ast-utils/eslint-utils/PatternMatcher.d.ts +2 -2
- package/node_modules/@typescript-eslint/utils/dist/ast-utils/eslint-utils/PatternMatcher.d.ts.map +1 -1
- package/node_modules/@typescript-eslint/utils/dist/ast-utils/eslint-utils/astUtilities.d.ts +7 -7
- package/node_modules/@typescript-eslint/utils/dist/ast-utils/eslint-utils/astUtilities.d.ts.map +1 -1
- package/node_modules/@typescript-eslint/utils/dist/ast-utils/helpers.d.ts.map +1 -1
- package/node_modules/@typescript-eslint/utils/dist/ast-utils/helpers.js.map +1 -1
- package/node_modules/@typescript-eslint/utils/dist/ast-utils/predicates.d.ts +6 -2
- package/node_modules/@typescript-eslint/utils/dist/ast-utils/predicates.d.ts.map +1 -1
- package/node_modules/@typescript-eslint/utils/dist/eslint-utils/RuleCreator.d.ts.map +1 -1
- package/node_modules/@typescript-eslint/utils/dist/eslint-utils/RuleCreator.js +2 -1
- package/node_modules/@typescript-eslint/utils/dist/eslint-utils/RuleCreator.js.map +1 -1
- package/node_modules/@typescript-eslint/utils/dist/eslint-utils/applyDefault.d.ts.map +1 -1
- package/node_modules/@typescript-eslint/utils/dist/eslint-utils/applyDefault.js +2 -0
- package/node_modules/@typescript-eslint/utils/dist/eslint-utils/applyDefault.js.map +1 -1
- package/node_modules/@typescript-eslint/utils/dist/eslint-utils/getParserServices.d.ts.map +1 -1
- package/node_modules/@typescript-eslint/utils/dist/eslint-utils/getParserServices.js +3 -4
- package/node_modules/@typescript-eslint/utils/dist/eslint-utils/getParserServices.js.map +1 -1
- package/node_modules/@typescript-eslint/utils/dist/ts-eslint/CLIEngine.d.ts +3 -3
- package/node_modules/@typescript-eslint/utils/dist/ts-eslint/CLIEngine.d.ts.map +1 -1
- package/node_modules/@typescript-eslint/utils/dist/ts-eslint/Linter.d.ts +2 -2
- package/node_modules/@typescript-eslint/utils/dist/ts-eslint/Linter.d.ts.map +1 -1
- package/node_modules/@typescript-eslint/utils/dist/ts-eslint/Rule.d.ts +4 -0
- package/node_modules/@typescript-eslint/utils/dist/ts-eslint/Rule.d.ts.map +1 -1
- package/node_modules/@typescript-eslint/utils/dist/ts-eslint/SourceCode.d.ts +1 -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-scope/Definition.d.ts +1 -1
- package/node_modules/@typescript-eslint/utils/dist/ts-eslint-scope/Definition.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/analyze.d.ts +1 -1
- package/node_modules/@typescript-eslint/utils/dist/ts-eslint-scope/analyze.d.ts.map +1 -1
- package/node_modules/@typescript-eslint/utils/package.json +7 -7
- 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 +2 -1
- package/node_modules/@typescript-eslint/visitor-keys/dist/visitor-keys.js.map +1 -1
- package/node_modules/@typescript-eslint/visitor-keys/package.json +6 -5
- package/node_modules/eslint-config-xo-typescript/index.js +27 -11
- package/node_modules/eslint-config-xo-typescript/package.json +5 -4
- package/package.json +13 -13
- package/readme.md +1 -1
|
@@ -1,11 +1,17 @@
|
|
|
1
|
-
|
|
1
|
+
---
|
|
2
|
+
description: 'Enforce consistent spacing before blocks.'
|
|
3
|
+
---
|
|
2
4
|
|
|
3
|
-
|
|
5
|
+
> 🛑 This file is source code, not the primary documentation location! 🛑
|
|
6
|
+
>
|
|
7
|
+
> See **https://typescript-eslint.io/rules/space-before-blocks** for documentation.
|
|
4
8
|
|
|
5
9
|
## Rule Details
|
|
6
10
|
|
|
7
11
|
This rule extends the base [`eslint/space-before-blocks`](https://eslint.org/docs/rules/space-before-blocks) rule.
|
|
8
|
-
It adds support for interfaces and enums
|
|
12
|
+
It adds support for interfaces and enums.
|
|
13
|
+
|
|
14
|
+
<!-- tabs -->
|
|
9
15
|
|
|
10
16
|
### ❌ Incorrect
|
|
11
17
|
|
|
@@ -31,32 +37,6 @@ interface State {
|
|
|
31
37
|
}
|
|
32
38
|
```
|
|
33
39
|
|
|
34
|
-
In case a more specific options object is passed these blocks will follow `classes` configuration option.
|
|
35
|
-
|
|
36
|
-
## How to Use
|
|
37
|
-
|
|
38
|
-
```jsonc
|
|
39
|
-
{
|
|
40
|
-
// note you must disable the base rule as it can report incorrect errors
|
|
41
|
-
"space-before-blocks": "off",
|
|
42
|
-
"@typescript-eslint/space-before-blocks": ["error"]
|
|
43
|
-
}
|
|
44
|
-
```
|
|
45
|
-
|
|
46
40
|
## Options
|
|
47
41
|
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
<sup>
|
|
51
|
-
|
|
52
|
-
Taken with ❤️ [from ESLint core](https://github.com/eslint/eslint/blob/master/docs/rules/space-before-blocks.md)
|
|
53
|
-
|
|
54
|
-
</sup>
|
|
55
|
-
|
|
56
|
-
## Attributes
|
|
57
|
-
|
|
58
|
-
- Configs:
|
|
59
|
-
- [ ] ✅ Recommended
|
|
60
|
-
- [ ] 🔒 Strict
|
|
61
|
-
- [x] 🔧 Fixable
|
|
62
|
-
- [ ] 💭 Requires type information
|
|
42
|
+
In case a more specific options object is passed these blocks will follow `classes` configuration option.
|
package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/space-before-function-paren.md
CHANGED
|
@@ -1,36 +1,12 @@
|
|
|
1
|
-
|
|
1
|
+
---
|
|
2
|
+
description: 'Enforce consistent spacing before function parenthesis.'
|
|
3
|
+
---
|
|
2
4
|
|
|
3
|
-
|
|
5
|
+
> 🛑 This file is source code, not the primary documentation location! 🛑
|
|
6
|
+
>
|
|
7
|
+
> See **https://typescript-eslint.io/rules/space-before-function-paren** for documentation.
|
|
4
8
|
|
|
5
9
|
## Rule Details
|
|
6
10
|
|
|
7
11
|
This rule extends the base [`eslint/space-before-function-paren`](https://eslint.org/docs/rules/space-before-function-paren) rule.
|
|
8
12
|
It adds support for generic type parameters on function calls.
|
|
9
|
-
|
|
10
|
-
## How to Use
|
|
11
|
-
|
|
12
|
-
```jsonc
|
|
13
|
-
{
|
|
14
|
-
// note you must disable the base rule as it can report incorrect errors
|
|
15
|
-
"space-before-function-paren": "off",
|
|
16
|
-
"@typescript-eslint/space-before-function-paren": ["error"]
|
|
17
|
-
}
|
|
18
|
-
```
|
|
19
|
-
|
|
20
|
-
## Options
|
|
21
|
-
|
|
22
|
-
See [`eslint/space-before-function-paren` options](https://eslint.org/docs/rules/space-before-function-paren#options).
|
|
23
|
-
|
|
24
|
-
<sup>
|
|
25
|
-
|
|
26
|
-
Taken with ❤️ [from ESLint core](https://github.com/eslint/eslint/blob/main/docs/rules/space-before-function-paren.md)
|
|
27
|
-
|
|
28
|
-
</sup>
|
|
29
|
-
|
|
30
|
-
## Attributes
|
|
31
|
-
|
|
32
|
-
- Configs:
|
|
33
|
-
- [ ] ✅ Recommended
|
|
34
|
-
- [ ] 🔒 Strict
|
|
35
|
-
- [x] 🔧 Fixable
|
|
36
|
-
- [ ] 💭 Requires type information
|
|
@@ -1,40 +1,16 @@
|
|
|
1
|
-
|
|
1
|
+
---
|
|
2
|
+
description: 'Require spacing around infix operators.'
|
|
3
|
+
---
|
|
2
4
|
|
|
3
|
-
This
|
|
5
|
+
> 🛑 This file is source code, not the primary documentation location! 🛑
|
|
6
|
+
>
|
|
7
|
+
> See **https://typescript-eslint.io/rules/space-infix-ops** for documentation.
|
|
4
8
|
|
|
5
9
|
This rule extends the base [`eslint/space-infix-ops`](https://eslint.org/docs/rules/space-infix-ops) rule.
|
|
6
|
-
|
|
7
|
-
It also add support for enum members
|
|
10
|
+
It adds support for enum members.
|
|
8
11
|
|
|
9
12
|
```ts
|
|
10
13
|
enum MyEnum {
|
|
11
14
|
KEY = 'value',
|
|
12
15
|
}
|
|
13
16
|
```
|
|
14
|
-
|
|
15
|
-
## How to Use
|
|
16
|
-
|
|
17
|
-
```jsonc
|
|
18
|
-
{
|
|
19
|
-
"space-infix-ops": "off",
|
|
20
|
-
"@typescript-eslint/space-infix-ops": ["error", { "int32Hint": false }]
|
|
21
|
-
}
|
|
22
|
-
```
|
|
23
|
-
|
|
24
|
-
## Options
|
|
25
|
-
|
|
26
|
-
See [`eslint/space-infix-ops` options](https://eslint.org/docs/rules/space-infix-ops#options).
|
|
27
|
-
|
|
28
|
-
<sup>
|
|
29
|
-
|
|
30
|
-
Taken with ❤️ [from ESLint core](https://github.com/eslint/eslint/blob/main/docs/rules/space-infix-ops.md)
|
|
31
|
-
|
|
32
|
-
</sup>
|
|
33
|
-
|
|
34
|
-
## Attributes
|
|
35
|
-
|
|
36
|
-
- Configs:
|
|
37
|
-
- [ ] ✅ Recommended
|
|
38
|
-
- [ ] 🔒 Strict
|
|
39
|
-
- [x] 🔧 Fixable
|
|
40
|
-
- [ ] 💭 Requires type information
|
package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/strict-boolean-expressions.md
CHANGED
|
@@ -1,6 +1,10 @@
|
|
|
1
|
-
|
|
1
|
+
---
|
|
2
|
+
description: 'Disallow certain types in boolean expressions.'
|
|
3
|
+
---
|
|
2
4
|
|
|
3
|
-
|
|
5
|
+
> 🛑 This file is source code, not the primary documentation location! 🛑
|
|
6
|
+
>
|
|
7
|
+
> See **https://typescript-eslint.io/rules/strict-boolean-expressions** for documentation.
|
|
4
8
|
|
|
5
9
|
Forbids usage of non-boolean types in expressions where a boolean is expected.
|
|
6
10
|
`boolean` and `never` types are always allowed.
|
|
@@ -85,29 +89,6 @@ const foo = (arg: any) => (Boolean(arg) ? 1 : 0);
|
|
|
85
89
|
|
|
86
90
|
## Options
|
|
87
91
|
|
|
88
|
-
```ts
|
|
89
|
-
type Options = {
|
|
90
|
-
allowString?: boolean;
|
|
91
|
-
allowNumber?: boolean;
|
|
92
|
-
allowNullableObject?: boolean;
|
|
93
|
-
allowNullableBoolean?: boolean;
|
|
94
|
-
allowNullableString?: boolean;
|
|
95
|
-
allowNullableNumber?: boolean;
|
|
96
|
-
allowAny?: boolean;
|
|
97
|
-
};
|
|
98
|
-
|
|
99
|
-
const defaultOptions: Options = {
|
|
100
|
-
allowString: true,
|
|
101
|
-
allowNumber: true,
|
|
102
|
-
allowNullableObject: true,
|
|
103
|
-
allowNullableBoolean: false,
|
|
104
|
-
allowNullableString: false,
|
|
105
|
-
allowNullableNumber: false,
|
|
106
|
-
allowAny: false,
|
|
107
|
-
allowRuleToRunWithoutStrictNullChecksIKnowWhatIAmDoing: false,
|
|
108
|
-
};
|
|
109
|
-
```
|
|
110
|
-
|
|
111
92
|
### `allowString`
|
|
112
93
|
|
|
113
94
|
Allows `string` in a boolean context.
|
|
@@ -195,13 +176,4 @@ This rule provides following fixes and suggestions for particular types in boole
|
|
|
195
176
|
|
|
196
177
|
## Related To
|
|
197
178
|
|
|
198
|
-
- TSLint: [strict-boolean-expressions](https://palantir.github.io/tslint/rules/strict-boolean-expressions)
|
|
199
179
|
- [no-unnecessary-condition](./no-unnecessary-condition.md) - Similar rule which reports always-truthy and always-falsy values in conditions
|
|
200
|
-
|
|
201
|
-
## Attributes
|
|
202
|
-
|
|
203
|
-
- Configs:
|
|
204
|
-
- [ ] ✅ Recommended
|
|
205
|
-
- [ ] 🔒 Strict
|
|
206
|
-
- [x] 🔧 Fixable
|
|
207
|
-
- [x] 💭 Requires type information
|
package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/switch-exhaustiveness-check.md
CHANGED
|
@@ -1,6 +1,10 @@
|
|
|
1
|
-
|
|
1
|
+
---
|
|
2
|
+
description: 'Require switch-case statements to be exhaustive with union type.'
|
|
3
|
+
---
|
|
2
4
|
|
|
3
|
-
|
|
5
|
+
> 🛑 This file is source code, not the primary documentation location! 🛑
|
|
6
|
+
>
|
|
7
|
+
> See **https://typescript-eslint.io/rules/switch-exhaustiveness-check** for documentation.
|
|
4
8
|
|
|
5
9
|
Union type may have a lot of parts. It's easy to forget to consider all cases in switch. This rule reminds which parts are missing. If domain of the problem requires to have only a partial switch, developer may _explicitly_ add a default clause.
|
|
6
10
|
|
|
@@ -106,27 +110,6 @@ switch (day) {
|
|
|
106
110
|
}
|
|
107
111
|
```
|
|
108
112
|
|
|
109
|
-
## Options
|
|
110
|
-
|
|
111
|
-
```jsonc
|
|
112
|
-
// .eslintrc.json
|
|
113
|
-
{
|
|
114
|
-
"rules": {
|
|
115
|
-
"@typescript-eslint/switch-exhaustiveness-check": "warn"
|
|
116
|
-
}
|
|
117
|
-
}
|
|
118
|
-
```
|
|
119
|
-
|
|
120
|
-
This rule is not configurable.
|
|
121
|
-
|
|
122
113
|
## When Not To Use It
|
|
123
114
|
|
|
124
115
|
If program doesn't have union types with many parts. Downside of this rule is the need for type information, so it's slower than regular rules.
|
|
125
|
-
|
|
126
|
-
## Attributes
|
|
127
|
-
|
|
128
|
-
- Configs:
|
|
129
|
-
- [ ] ✅ Recommended
|
|
130
|
-
- [ ] 🔒 Strict
|
|
131
|
-
- [ ] 🔧 Fixable
|
|
132
|
-
- [x] 💭 Requires type information
|
|
@@ -1,10 +1,16 @@
|
|
|
1
|
-
|
|
1
|
+
---
|
|
2
|
+
description: 'Disallow certain triple slash directives in favor of ES6-style import declarations.'
|
|
3
|
+
---
|
|
2
4
|
|
|
3
|
-
|
|
5
|
+
> 🛑 This file is source code, not the primary documentation location! 🛑
|
|
6
|
+
>
|
|
7
|
+
> See **https://typescript-eslint.io/rules/triple-slash-reference** for documentation.
|
|
8
|
+
|
|
9
|
+
## Rule Details
|
|
4
10
|
|
|
5
11
|
Use of triple-slash reference type directives is discouraged in favor of the newer `import` style. This rule allows you to ban use of `/// <reference path="" />`, `/// <reference types="" />`, or `/// <reference lib="" />` directives.
|
|
6
12
|
|
|
7
|
-
##
|
|
13
|
+
## Options
|
|
8
14
|
|
|
9
15
|
With `{ "path": "never", "types": "never", "lib": "never" }` options set, the following will all be **incorrect** usage:
|
|
10
16
|
|
|
@@ -51,16 +57,3 @@ If you want to ban use of one or all of the triple slash reference directives, o
|
|
|
51
57
|
## When Not To Use It
|
|
52
58
|
|
|
53
59
|
If you want to use all flavors of triple slash reference directives.
|
|
54
|
-
|
|
55
|
-
## Related To
|
|
56
|
-
|
|
57
|
-
- TSLint: [no-reference](http://palantir.github.io/tslint/rules/no-reference/)
|
|
58
|
-
- TSLint: [no-reference-import](https://palantir.github.io/tslint/rules/no-reference-import/)
|
|
59
|
-
|
|
60
|
-
## Attributes
|
|
61
|
-
|
|
62
|
-
- Configs:
|
|
63
|
-
- [x] ✅ Recommended
|
|
64
|
-
- [x] 🔒 Strict
|
|
65
|
-
- [ ] 🔧 Fixable
|
|
66
|
-
- [ ] 💭 Requires type information
|
|
@@ -1,6 +1,10 @@
|
|
|
1
|
-
|
|
1
|
+
---
|
|
2
|
+
description: 'Require consistent spacing around type annotations.'
|
|
3
|
+
---
|
|
2
4
|
|
|
3
|
-
|
|
5
|
+
> 🛑 This file is source code, not the primary documentation location! 🛑
|
|
6
|
+
>
|
|
7
|
+
> See **https://typescript-eslint.io/rules/type-annotation-spacing** for documentation.
|
|
4
8
|
|
|
5
9
|
Spacing around type annotations improves readability of the code. Although the most commonly used style guideline for type annotations in TypeScript prescribes adding a space after the colon, but not before it, it is subjective to the preferences of a project. For example:
|
|
6
10
|
|
|
@@ -37,21 +41,11 @@ This rule aims to enforce specific spacing patterns around type annotations and
|
|
|
37
41
|
|
|
38
42
|
## Options
|
|
39
43
|
|
|
40
|
-
This rule has an object option:
|
|
41
|
-
|
|
42
|
-
- `"before": false`, (default for colon) disallows spaces before the colon/arrow.
|
|
43
|
-
- `"before": true`, (default for arrow) requires a space before the colon/arrow.
|
|
44
|
-
- `"after": true`, (default) requires a space after the colon/arrow.
|
|
45
|
-
- `"after": false`, disallows spaces after the colon/arrow.
|
|
46
|
-
- `"overrides"`, overrides the default options for type annotations with `colon` (e.g. `const foo: string`) and function types with `arrow` (e.g. `type Foo = () => {}`). Additionally allows granular overrides for `variable` (`const foo: string`),`parameter` (`function foo(bar: string) {...}`),`property` (`interface Foo { bar: string }`) and `returnType` (`function foo(): string {...}`) annotations.
|
|
47
|
-
|
|
48
|
-
### defaults
|
|
49
|
-
|
|
50
44
|
Examples of code for this rule with no options at all:
|
|
51
45
|
|
|
52
46
|
<!--tabs-->
|
|
53
47
|
|
|
54
|
-
|
|
48
|
+
### ❌ Incorrect
|
|
55
49
|
|
|
56
50
|
<!-- prettier-ignore -->
|
|
57
51
|
```ts
|
|
@@ -80,7 +74,7 @@ type Foo = () =>{};
|
|
|
80
74
|
type Foo = ()=> {};
|
|
81
75
|
```
|
|
82
76
|
|
|
83
|
-
|
|
77
|
+
### ✅ Correct
|
|
84
78
|
|
|
85
79
|
<!-- prettier-ignore -->
|
|
86
80
|
```ts
|
|
@@ -307,15 +301,3 @@ If you don't want to enforce spacing for your type annotations, you can safely t
|
|
|
307
301
|
|
|
308
302
|
- [TypeScript Type System](https://basarat.gitbooks.io/typescript/docs/types/type-system.html)
|
|
309
303
|
- [Type Inference](https://www.typescriptlang.org/docs/handbook/type-inference.html)
|
|
310
|
-
|
|
311
|
-
## Related To
|
|
312
|
-
|
|
313
|
-
- TSLint: [`typedef-whitespace`](https://palantir.github.io/tslint/rules/typedef-whitespace/)
|
|
314
|
-
|
|
315
|
-
## Attributes
|
|
316
|
-
|
|
317
|
-
- Configs:
|
|
318
|
-
- [ ] ✅ Recommended
|
|
319
|
-
- [ ] 🔒 Strict
|
|
320
|
-
- [x] 🔧 Fixable
|
|
321
|
-
- [ ] 💭 Requires type information
|
|
@@ -1,6 +1,10 @@
|
|
|
1
|
-
|
|
1
|
+
---
|
|
2
|
+
description: 'Require type annotations in certain places.'
|
|
3
|
+
---
|
|
2
4
|
|
|
3
|
-
|
|
5
|
+
> 🛑 This file is source code, not the primary documentation location! 🛑
|
|
6
|
+
>
|
|
7
|
+
> See **https://typescript-eslint.io/rules/typedef** for documentation.
|
|
4
8
|
|
|
5
9
|
TypeScript cannot always infer types for all places in code.
|
|
6
10
|
Some locations require type annotations for their types to be inferred.
|
|
@@ -18,44 +22,24 @@ class ContainsText {
|
|
|
18
22
|
}
|
|
19
23
|
```
|
|
20
24
|
|
|
21
|
-
|
|
25
|
+
:::caution
|
|
26
|
+
|
|
27
|
+
Requiring type annotations unnecessarily can be cumbersome to maintain and generally reduces code readability.
|
|
22
28
|
TypeScript is often better at inferring types than easily written type annotations would allow.
|
|
23
29
|
|
|
24
30
|
**Instead of enabling `typedef`, it is generally recommended to use the `--noImplicitAny` and `--strictPropertyInitialization` compiler options to enforce type annotations only when useful.**
|
|
25
31
|
|
|
32
|
+
:::
|
|
33
|
+
|
|
26
34
|
## Rule Details
|
|
27
35
|
|
|
28
36
|
This rule can enforce type annotations in locations regardless of whether they're required.
|
|
29
37
|
This is typically used to maintain consistency for element types that sometimes require them.
|
|
30
38
|
|
|
31
|
-
> To enforce type definitions existing on call signatures
|
|
39
|
+
> To enforce type definitions existing on call signatures, use `explicit-function-return-type`, or `explicit-module-boundary-types`.
|
|
32
40
|
|
|
33
41
|
## Options
|
|
34
42
|
|
|
35
|
-
```ts
|
|
36
|
-
type Options = {
|
|
37
|
-
arrayDestructuring?: boolean;
|
|
38
|
-
arrowParameter?: boolean;
|
|
39
|
-
memberVariableDeclaration?: boolean;
|
|
40
|
-
objectDestructuring?: boolean;
|
|
41
|
-
parameter?: boolean;
|
|
42
|
-
propertyDeclaration?: boolean;
|
|
43
|
-
variableDeclaration?: boolean;
|
|
44
|
-
variableDeclarationIgnoreFunction?: boolean;
|
|
45
|
-
};
|
|
46
|
-
|
|
47
|
-
const defaultOptions: Options = {
|
|
48
|
-
arrayDestructuring: false,
|
|
49
|
-
arrowParameter: false,
|
|
50
|
-
memberVariableDeclaration: false,
|
|
51
|
-
objectDestructuring: false,
|
|
52
|
-
parameter: false,
|
|
53
|
-
propertyDeclaration: false,
|
|
54
|
-
variableDeclaration: false,
|
|
55
|
-
variableDeclarationIgnoreFunction: false,
|
|
56
|
-
};
|
|
57
|
-
```
|
|
58
|
-
|
|
59
43
|
For example, with the following configuration:
|
|
60
44
|
|
|
61
45
|
```json
|
|
@@ -336,15 +320,3 @@ In general, if you do not consider the cost of writing unnecessary type annotati
|
|
|
336
320
|
|
|
337
321
|
- [TypeScript Type System](https://basarat.gitbooks.io/typescript/docs/types/type-system.html)
|
|
338
322
|
- [Type Inference](https://www.typescriptlang.org/docs/handbook/type-inference.html)
|
|
339
|
-
|
|
340
|
-
## Related To
|
|
341
|
-
|
|
342
|
-
- TSLint: [`typedef`](https://palantir.github.io/tslint/rules/typedef)
|
|
343
|
-
|
|
344
|
-
## Attributes
|
|
345
|
-
|
|
346
|
-
- Configs:
|
|
347
|
-
- [ ] ✅ Recommended
|
|
348
|
-
- [ ] 🔒 Strict
|
|
349
|
-
- [ ] 🔧 Fixable
|
|
350
|
-
- [ ] 💭 Requires type information
|
|
@@ -1,18 +1,19 @@
|
|
|
1
|
-
|
|
1
|
+
---
|
|
2
|
+
description: 'Enforce unbound methods are called with their expected scope.'
|
|
3
|
+
---
|
|
2
4
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
5
|
+
> 🛑 This file is source code, not the primary documentation location! 🛑
|
|
6
|
+
>
|
|
7
|
+
> See **https://typescript-eslint.io/rules/unbound-method** for documentation.
|
|
6
8
|
|
|
7
9
|
Class functions don't preserve the class scope when passed as standalone variables.
|
|
8
|
-
|
|
9
10
|
If your function does not access `this`, [you can annotate it with `this: void`](https://www.typescriptlang.org/docs/handbook/2/functions.html#declaring-this-in-a-function), or consider using an arrow function instead.
|
|
10
11
|
|
|
11
12
|
If you're working with `jest`, you can use [`eslint-plugin-jest`'s version of this rule](https://github.com/jest-community/eslint-plugin-jest/blob/main/docs/rules/unbound-method.md) to lint your test files, which knows when it's ok to pass an unbound method to `expect` calls.
|
|
12
13
|
|
|
13
14
|
## Rule Details
|
|
14
15
|
|
|
15
|
-
Examples of code for this rule
|
|
16
|
+
Examples of code for this rule with the default options:
|
|
16
17
|
|
|
17
18
|
<!--tabs-->
|
|
18
19
|
|
|
@@ -75,10 +76,6 @@ const { double } = arith;
|
|
|
75
76
|
|
|
76
77
|
## Options
|
|
77
78
|
|
|
78
|
-
The rule accepts an options object with the following property:
|
|
79
|
-
|
|
80
|
-
- `ignoreStatic` to not check whether `static` methods are correctly bound
|
|
81
|
-
|
|
82
79
|
### `ignoreStatic`
|
|
83
80
|
|
|
84
81
|
Examples of **correct** code for this rule with `{ ignoreStatic: true }`:
|
|
@@ -96,33 +93,8 @@ const { log } = OtherClass;
|
|
|
96
93
|
log();
|
|
97
94
|
```
|
|
98
95
|
|
|
99
|
-
## Example
|
|
100
|
-
|
|
101
|
-
```json
|
|
102
|
-
{
|
|
103
|
-
"@typescript-eslint/unbound-method": [
|
|
104
|
-
"error",
|
|
105
|
-
{
|
|
106
|
-
"ignoreStatic": true
|
|
107
|
-
}
|
|
108
|
-
]
|
|
109
|
-
}
|
|
110
|
-
```
|
|
111
|
-
|
|
112
96
|
## When Not To Use It
|
|
113
97
|
|
|
114
98
|
If your code intentionally waits to bind methods after use, such as by passing a `scope: this` along with the method, you can disable this rule.
|
|
115
99
|
|
|
116
100
|
If you're wanting to use `toBeCalled` and similar matches in `jest` tests, you can disable this rule for your test files in favor of [`eslint-plugin-jest`'s version of this rule](https://github.com/jest-community/eslint-plugin-jest/blob/main/docs/rules/unbound-method.md).
|
|
117
|
-
|
|
118
|
-
## Related To
|
|
119
|
-
|
|
120
|
-
- TSLint: [no-unbound-method](https://palantir.github.io/tslint/rules/no-unbound-method/)
|
|
121
|
-
|
|
122
|
-
## Attributes
|
|
123
|
-
|
|
124
|
-
- Configs:
|
|
125
|
-
- [x] ✅ Recommended
|
|
126
|
-
- [x] 🔒 Strict
|
|
127
|
-
- [ ] 🔧 Fixable
|
|
128
|
-
- [x] 💭 Requires type information
|
|
@@ -1,27 +1,15 @@
|
|
|
1
|
-
|
|
1
|
+
---
|
|
2
|
+
description: 'Disallow two overloads that could be unified into one with a union or an optional/rest parameter.'
|
|
3
|
+
---
|
|
2
4
|
|
|
3
|
-
|
|
5
|
+
> 🛑 This file is source code, not the primary documentation location! 🛑
|
|
6
|
+
>
|
|
7
|
+
> See **https://typescript-eslint.io/rules/unified-signatures** for documentation.
|
|
4
8
|
|
|
5
9
|
## Rule Details
|
|
6
10
|
|
|
7
11
|
This rule aims to keep the source code as maintainable as possible by reducing the amount of overloads.
|
|
8
12
|
|
|
9
|
-
## Options
|
|
10
|
-
|
|
11
|
-
```ts
|
|
12
|
-
type Options = {
|
|
13
|
-
ignoreDifferentlyNamedParameters?: boolean;
|
|
14
|
-
};
|
|
15
|
-
|
|
16
|
-
const defaultOptions: Options = {
|
|
17
|
-
ignoreDifferentlyNamedParameters: false,
|
|
18
|
-
};
|
|
19
|
-
```
|
|
20
|
-
|
|
21
|
-
The rule accepts an options object with the following property:
|
|
22
|
-
|
|
23
|
-
- `ignoreDifferentlyNamedParameters`: whether two parameters with different names at the same index should be considered different even if their types are the same.
|
|
24
|
-
|
|
25
13
|
Examples of code for this rule with the default options:
|
|
26
14
|
|
|
27
15
|
<!--tabs-->
|
|
@@ -48,6 +36,10 @@ function x(x: number | string): void;
|
|
|
48
36
|
function y(...x: number[]): void;
|
|
49
37
|
```
|
|
50
38
|
|
|
39
|
+
## Options
|
|
40
|
+
|
|
41
|
+
### `ignoreDifferentlyNamedParameters`
|
|
42
|
+
|
|
51
43
|
Examples of code for this rule with `ignoreDifferentlyNamedParameters`:
|
|
52
44
|
|
|
53
45
|
<!--tabs-->
|
|
@@ -76,14 +68,4 @@ function f(...a: number[]): void;
|
|
|
76
68
|
function f(...a: string[]): void;
|
|
77
69
|
```
|
|
78
70
|
|
|
79
|
-
##
|
|
80
|
-
|
|
81
|
-
- TSLint: [`unified-signatures`](https://palantir.github.io/tslint/rules/unified-signatures/)
|
|
82
|
-
|
|
83
|
-
## Attributes
|
|
84
|
-
|
|
85
|
-
- Configs:
|
|
86
|
-
- [ ] ✅ Recommended
|
|
87
|
-
- [x] 🔒 Strict
|
|
88
|
-
- [ ] 🔧 Fixable
|
|
89
|
-
- [ ] 💭 Requires type information
|
|
71
|
+
## Options
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@typescript-eslint/eslint-plugin",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.35.1",
|
|
4
4
|
"description": "TypeScript plugin for ESLint",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"eslint",
|
|
@@ -36,17 +36,17 @@
|
|
|
36
36
|
"check-configs": "jest tests/configs.test.ts --runTestsByPath --silent --runInBand",
|
|
37
37
|
"clean": "tsc -b tsconfig.build.json --clean",
|
|
38
38
|
"postclean": "rimraf dist && rimraf coverage",
|
|
39
|
-
"format": "prettier --write \"./**/*.{ts,js,json,md}\" --ignore-path ../../.prettierignore",
|
|
39
|
+
"format": "prettier --write \"./**/*.{ts,mts,cts,tsx,js,mjs,cjs,jsx,json,md,css}\" --ignore-path ../../.prettierignore",
|
|
40
40
|
"generate:configs": "../../node_modules/.bin/ts-node --files --transpile-only tools/generate-configs.ts",
|
|
41
41
|
"generate:rules-lists": "../../node_modules/.bin/ts-node --files --transpile-only tools/generate-rules-lists.ts",
|
|
42
|
-
"lint": "eslint . --
|
|
42
|
+
"lint": "eslint . --ignore-path ../../.eslintignore",
|
|
43
43
|
"test": "jest --coverage",
|
|
44
44
|
"typecheck": "tsc -p tsconfig.json --noEmit"
|
|
45
45
|
},
|
|
46
46
|
"dependencies": {
|
|
47
|
-
"@typescript-eslint/scope-manager": "5.
|
|
48
|
-
"@typescript-eslint/type-utils": "5.
|
|
49
|
-
"@typescript-eslint/utils": "5.
|
|
47
|
+
"@typescript-eslint/scope-manager": "5.35.1",
|
|
48
|
+
"@typescript-eslint/type-utils": "5.35.1",
|
|
49
|
+
"@typescript-eslint/utils": "5.35.1",
|
|
50
50
|
"debug": "^4.3.4",
|
|
51
51
|
"functional-red-black-tree": "^1.0.1",
|
|
52
52
|
"ignore": "^5.2.0",
|
|
@@ -79,5 +79,5 @@
|
|
|
79
79
|
"type": "opencollective",
|
|
80
80
|
"url": "https://opencollective.com/typescript-eslint"
|
|
81
81
|
},
|
|
82
|
-
"gitHead": "
|
|
82
|
+
"gitHead": "cb43b4a19dcb967c3342dc8e677e57097b76d888"
|
|
83
83
|
}
|
|
@@ -78,16 +78,19 @@ Default `false`.
|
|
|
78
78
|
|
|
79
79
|
Enable parsing JSX when `true`. More details can be found [here](https://www.typescriptlang.org/docs/handbook/jsx.html).
|
|
80
80
|
|
|
81
|
-
**NOTE:** this setting does not affect known file types (`.js`, `.jsx`, `.ts`, `.tsx`, `.json`) because the TypeScript compiler has its own internal handling for known file extensions.
|
|
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
82
|
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
-
|
|
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`**
|
|
91
94
|
|
|
92
95
|
### `parserOptions.ecmaFeatures.globalReturn`
|
|
93
96
|
|
|
@@ -203,7 +206,8 @@ For example, by default it will ensure that a glob like `./**/tsconfig.json` wil
|
|
|
203
206
|
Default `undefined`.
|
|
204
207
|
|
|
205
208
|
This option allows you to provide one or more additional file extensions which should be considered in the TypeScript Program compilation.
|
|
206
|
-
The default extensions are
|
|
209
|
+
The default extensions are `['.js', '.mjs', '.cjs', '.jsx', '.ts', '.mts', '.cts', '.tsx']`.
|
|
210
|
+
Add extensions starting with `.`, followed by the file extension. E.g. for a `.vue` file use `"extraFileExtensions": [".vue"]`.
|
|
207
211
|
|
|
208
212
|
### `parserOptions.warnOnUnsupportedTypeScriptVersion`
|
|
209
213
|
|
|
@@ -252,7 +256,7 @@ Note that if you pass custom programs via `options.programs` this option will no
|
|
|
252
256
|
|
|
253
257
|
Default `undefined`.
|
|
254
258
|
|
|
255
|
-
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/
|
|
259
|
+
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.
|
|
256
260
|
|
|
257
261
|
## Utilities
|
|
258
262
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"parser.d.ts","sourceRoot":"","sources":["../src/parser.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAO,MAAM,0BAA0B,CAAC;AACxE,OAAO,EAEL,cAAc,EAEd,WAAW,EACZ,MAAM,sCAAsC,CAAC;AAC9C,OAAO,EAGL,YAAY,EACb,MAAM,kCAAkC,CAAC;AAM1C,UAAU,oBAAoB;IAC5B,GAAG,EAAE,QAAQ,CAAC,OAAO,GAAG;QACtB,KAAK,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;QACzB,MAAM,CAAC,EAAE,QAAQ,CAAC,KAAK,EAAE,CAAC;QAC1B,QAAQ,CAAC,EAAE,QAAQ,CAAC,OAAO,EAAE,CAAC;KAC/B,CAAC;IACF,QAAQ,EAAE,cAAc,CAAC;IACzB,WAAW,EAAE,OAAO,WAAW,CAAC;IAChC,YAAY,EAAE,YAAY,CAAC;CAC5B;AA+CD,iBAAS,KAAK,CACZ,IAAI,EAAE,MAAM,EACZ,OAAO,CAAC,EAAE,aAAa,GACtB,oBAAoB,CAAC,KAAK,CAAC,CAE7B;AAED,iBAAS,cAAc,CACrB,IAAI,EAAE,MAAM,EACZ,OAAO,CAAC,EAAE,aAAa,GAAG,IAAI,GAC7B,oBAAoB,
|
|
1
|
+
{"version":3,"file":"parser.d.ts","sourceRoot":"","sources":["../src/parser.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAO,MAAM,0BAA0B,CAAC;AACxE,OAAO,EAEL,cAAc,EAEd,WAAW,EACZ,MAAM,sCAAsC,CAAC;AAC9C,OAAO,EAGL,YAAY,EACb,MAAM,kCAAkC,CAAC;AAM1C,UAAU,oBAAoB;IAC5B,GAAG,EAAE,QAAQ,CAAC,OAAO,GAAG;QACtB,KAAK,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;QACzB,MAAM,CAAC,EAAE,QAAQ,CAAC,KAAK,EAAE,CAAC;QAC1B,QAAQ,CAAC,EAAE,QAAQ,CAAC,OAAO,EAAE,CAAC;KAC/B,CAAC;IACF,QAAQ,EAAE,cAAc,CAAC;IACzB,WAAW,EAAE,OAAO,WAAW,CAAC;IAChC,YAAY,EAAE,YAAY,CAAC;CAC5B;AA+CD,iBAAS,KAAK,CACZ,IAAI,EAAE,MAAM,EACZ,OAAO,CAAC,EAAE,aAAa,GACtB,oBAAoB,CAAC,KAAK,CAAC,CAE7B;AAED,iBAAS,cAAc,CACrB,IAAI,EAAE,MAAM,EACZ,OAAO,CAAC,EAAE,aAAa,GAAG,IAAI,GAC7B,oBAAoB,CAwFtB;AAED,OAAO,EAAE,KAAK,EAAE,cAAc,EAAE,aAAa,EAAE,CAAC"}
|