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,6 +1,10 @@
|
|
|
1
|
-
|
|
1
|
+
---
|
|
2
|
+
description: 'Enforce `RegExp#exec` over `String#match` if no global flag is provided.'
|
|
3
|
+
---
|
|
2
4
|
|
|
3
|
-
|
|
5
|
+
> 🛑 This file is source code, not the primary documentation location! 🛑
|
|
6
|
+
>
|
|
7
|
+
> See **https://typescript-eslint.io/rules/prefer-regexp-exec** for documentation.
|
|
4
8
|
|
|
5
9
|
As `String#match` is defined to be the same as `RegExp#exec` when the regular expression does not include the `g` flag, prefer a consistent usage.
|
|
6
10
|
|
|
@@ -42,27 +46,6 @@ const search = /thing/;
|
|
|
42
46
|
search.exec(text);
|
|
43
47
|
```
|
|
44
48
|
|
|
45
|
-
## Options
|
|
46
|
-
|
|
47
|
-
```jsonc
|
|
48
|
-
// .eslintrc.json
|
|
49
|
-
{
|
|
50
|
-
"rules": {
|
|
51
|
-
"@typescript-eslint/prefer-regexp-exec": "warn"
|
|
52
|
-
}
|
|
53
|
-
}
|
|
54
|
-
```
|
|
55
|
-
|
|
56
|
-
This rule is not configurable.
|
|
57
|
-
|
|
58
49
|
## When Not To Use It
|
|
59
50
|
|
|
60
51
|
If you prefer consistent use of `String#match` for both, with `g` flag and without it, you can turn this rule off.
|
|
61
|
-
|
|
62
|
-
## Attributes
|
|
63
|
-
|
|
64
|
-
- Configs:
|
|
65
|
-
- [ ] ✅ Recommended
|
|
66
|
-
- [ ] 🔒 Strict
|
|
67
|
-
- [x] 🔧 Fixable
|
|
68
|
-
- [x] 💭 Requires type information
|
|
@@ -1,6 +1,10 @@
|
|
|
1
|
-
|
|
1
|
+
---
|
|
2
|
+
description: 'Enforce that `this` is used when only `this` type is returned.'
|
|
3
|
+
---
|
|
2
4
|
|
|
3
|
-
|
|
5
|
+
> 🛑 This file is source code, not the primary documentation location! 🛑
|
|
6
|
+
>
|
|
7
|
+
> See **https://typescript-eslint.io/rules/prefer-return-this-type** for documentation.
|
|
4
8
|
|
|
5
9
|
[Method chaining](https://en.wikipedia.org/wiki/Method_chaining) is a common pattern in OOP languages and TypeScript provides a special [polymorphic this type](https://www.typescriptlang.org/docs/handbook/2/classes.html#this-types).
|
|
6
10
|
If any type other than `this` is specified as the return type of these chaining methods, TypeScript will fail to cast it when invoking in subclass.
|
|
@@ -93,27 +97,6 @@ class Derived extends Base {
|
|
|
93
97
|
}
|
|
94
98
|
```
|
|
95
99
|
|
|
96
|
-
## Options
|
|
97
|
-
|
|
98
|
-
```jsonc
|
|
99
|
-
// .eslintrc.json
|
|
100
|
-
{
|
|
101
|
-
"rules": {
|
|
102
|
-
"@typescript-eslint/prefer-return-this-type": "warn"
|
|
103
|
-
}
|
|
104
|
-
}
|
|
105
|
-
```
|
|
106
|
-
|
|
107
|
-
This rule is not configurable.
|
|
108
|
-
|
|
109
100
|
## When Not To Use It
|
|
110
101
|
|
|
111
102
|
If you don't use method chaining or explicit return values, you can safely turn this rule off.
|
|
112
|
-
|
|
113
|
-
## Attributes
|
|
114
|
-
|
|
115
|
-
- Configs:
|
|
116
|
-
- [ ] ✅ Recommended
|
|
117
|
-
- [x] 🔒 Strict
|
|
118
|
-
- [x] 🔧 Fixable
|
|
119
|
-
- [x] 💭 Requires type information
|
package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/prefer-string-starts-ends-with.md
CHANGED
|
@@ -1,9 +1,12 @@
|
|
|
1
|
-
|
|
1
|
+
---
|
|
2
|
+
description: 'Enforce using `String#startsWith` and `String#endsWith` over other equivalent methods of checking substrings.'
|
|
3
|
+
---
|
|
2
4
|
|
|
3
|
-
|
|
5
|
+
> 🛑 This file is source code, not the primary documentation location! 🛑
|
|
6
|
+
>
|
|
7
|
+
> See **https://typescript-eslint.io/rules/prefer-string-starts-ends-with** for documentation.
|
|
4
8
|
|
|
5
9
|
There are multiple ways to verify if a string starts or ends with a specific string, such as `foo.indexOf('bar') === 0`.
|
|
6
|
-
|
|
7
10
|
Since ES2015 has added `String#startsWith` and `String#endsWith`, this rule reports other ways to be consistent.
|
|
8
11
|
|
|
9
12
|
## Rule Details
|
|
@@ -45,27 +48,6 @@ foo.startsWith('bar');
|
|
|
45
48
|
foo.endsWith('bar');
|
|
46
49
|
```
|
|
47
50
|
|
|
48
|
-
## Options
|
|
49
|
-
|
|
50
|
-
```jsonc
|
|
51
|
-
// .eslintrc.json
|
|
52
|
-
{
|
|
53
|
-
"rules": {
|
|
54
|
-
"@typescript-eslint/prefer-string-starts-ends-with": "warn"
|
|
55
|
-
}
|
|
56
|
-
}
|
|
57
|
-
```
|
|
58
|
-
|
|
59
|
-
This rule is not configurable.
|
|
60
|
-
|
|
61
51
|
## When Not To Use It
|
|
62
52
|
|
|
63
53
|
If you don't mind that style, you can turn this rule off safely.
|
|
64
|
-
|
|
65
|
-
## Attributes
|
|
66
|
-
|
|
67
|
-
- Configs:
|
|
68
|
-
- [ ] ✅ Recommended
|
|
69
|
-
- [x] 🔒 Strict
|
|
70
|
-
- [x] 🔧 Fixable
|
|
71
|
-
- [x] 💭 Requires type information
|
|
@@ -1,6 +1,10 @@
|
|
|
1
|
-
|
|
1
|
+
---
|
|
2
|
+
description: 'Enforce using `@ts-expect-error` over `@ts-ignore`.'
|
|
3
|
+
---
|
|
2
4
|
|
|
3
|
-
|
|
5
|
+
> 🛑 This file is source code, not the primary documentation location! 🛑
|
|
6
|
+
>
|
|
7
|
+
> See **https://typescript-eslint.io/rules/prefer-ts-expect-error** for documentation.
|
|
4
8
|
|
|
5
9
|
TypeScript allows you to suppress all errors on a line by placing a single-line comment or a comment block line starting with `@ts-ignore` immediately before the erroring line.
|
|
6
10
|
While powerful, there is no way to know if a `@ts-ignore` is actually suppressing an error without manually investigating what happens when the `@ts-ignore` is removed.
|
|
@@ -62,19 +66,6 @@ const isOptionEnabled = (key: string): boolean => {
|
|
|
62
66
|
};
|
|
63
67
|
```
|
|
64
68
|
|
|
65
|
-
## Options
|
|
66
|
-
|
|
67
|
-
```jsonc
|
|
68
|
-
// .eslintrc.json
|
|
69
|
-
{
|
|
70
|
-
"rules": {
|
|
71
|
-
"@typescript-eslint/prefer-ts-expect-error": "warn"
|
|
72
|
-
}
|
|
73
|
-
}
|
|
74
|
-
```
|
|
75
|
-
|
|
76
|
-
This rule is not configurable.
|
|
77
|
-
|
|
78
69
|
## When Not To Use It
|
|
79
70
|
|
|
80
71
|
If you are **NOT** using TypeScript 3.9 (or greater), then you will not be able to use this rule, as the directive is not supported
|
|
@@ -82,11 +73,3 @@ If you are **NOT** using TypeScript 3.9 (or greater), then you will not be able
|
|
|
82
73
|
## Further Reading
|
|
83
74
|
|
|
84
75
|
- [Original Implementing PR](https://github.com/microsoft/TypeScript/pull/36014)
|
|
85
|
-
|
|
86
|
-
## Attributes
|
|
87
|
-
|
|
88
|
-
- Configs:
|
|
89
|
-
- [ ] ✅ Recommended
|
|
90
|
-
- [x] 🔒 Strict
|
|
91
|
-
- [x] 🔧 Fixable
|
|
92
|
-
- [ ] 💭 Requires type information
|
|
@@ -1,8 +1,11 @@
|
|
|
1
|
-
|
|
1
|
+
---
|
|
2
|
+
description: 'Require any function or method that returns a Promise to be marked async.'
|
|
3
|
+
---
|
|
2
4
|
|
|
3
|
-
|
|
5
|
+
> 🛑 This file is source code, not the primary documentation location! 🛑
|
|
6
|
+
>
|
|
7
|
+
> See **https://typescript-eslint.io/rules/promise-function-async** for documentation.
|
|
4
8
|
|
|
5
|
-
Requires any function or method that returns a Promise to be marked async.
|
|
6
9
|
Ensures that each function is only capable of:
|
|
7
10
|
|
|
8
11
|
- returning a rejected promise, or
|
|
@@ -37,44 +40,3 @@ async function functionReturnsPromise() {
|
|
|
37
40
|
return Promise.resolve('value');
|
|
38
41
|
}
|
|
39
42
|
```
|
|
40
|
-
|
|
41
|
-
## Options
|
|
42
|
-
|
|
43
|
-
Options may be provided as an object with:
|
|
44
|
-
|
|
45
|
-
- `allowAny` to indicate that `any` or `unknown` shouldn't be considered Promises (`true` by default).
|
|
46
|
-
- `allowedPromiseNames` to indicate any extra names of classes or interfaces to be considered Promises when returned.
|
|
47
|
-
|
|
48
|
-
In addition, each of the following properties may be provided, and default to `true`:
|
|
49
|
-
|
|
50
|
-
- `checkArrowFunctions`
|
|
51
|
-
- `checkFunctionDeclarations`
|
|
52
|
-
- `checkFunctionExpressions`
|
|
53
|
-
- `checkMethodDeclarations`
|
|
54
|
-
|
|
55
|
-
```json
|
|
56
|
-
{
|
|
57
|
-
"@typescript-eslint/promise-function-async": [
|
|
58
|
-
"error",
|
|
59
|
-
{
|
|
60
|
-
"allowedPromiseNames": ["Thenable"],
|
|
61
|
-
"checkArrowFunctions": true,
|
|
62
|
-
"checkFunctionDeclarations": true,
|
|
63
|
-
"checkFunctionExpressions": true,
|
|
64
|
-
"checkMethodDeclarations": true
|
|
65
|
-
}
|
|
66
|
-
]
|
|
67
|
-
}
|
|
68
|
-
```
|
|
69
|
-
|
|
70
|
-
## Related To
|
|
71
|
-
|
|
72
|
-
- TSLint: [promise-function-async](https://palantir.github.io/tslint/rules/promise-function-async)
|
|
73
|
-
|
|
74
|
-
## Attributes
|
|
75
|
-
|
|
76
|
-
- Configs:
|
|
77
|
-
- [ ] ✅ Recommended
|
|
78
|
-
- [ ] 🔒 Strict
|
|
79
|
-
- [x] 🔧 Fixable
|
|
80
|
-
- [x] 💭 Requires type information
|
|
@@ -1,36 +1,12 @@
|
|
|
1
|
-
|
|
1
|
+
---
|
|
2
|
+
description: 'Enforce the consistent use of either backticks, double, or single quotes.'
|
|
3
|
+
---
|
|
2
4
|
|
|
3
|
-
|
|
5
|
+
> 🛑 This file is source code, not the primary documentation location! 🛑
|
|
6
|
+
>
|
|
7
|
+
> See **https://typescript-eslint.io/rules/quotes** for documentation.
|
|
4
8
|
|
|
5
9
|
## Rule Details
|
|
6
10
|
|
|
7
11
|
This rule extends the base [`eslint/quotes`](https://eslint.org/docs/rules/quotes) rule.
|
|
8
12
|
It adds support for TypeScript features which allow quoted names, but not backtick quoted names.
|
|
9
|
-
|
|
10
|
-
## How to Use
|
|
11
|
-
|
|
12
|
-
```jsonc
|
|
13
|
-
{
|
|
14
|
-
// note you must disable the base rule as it can report incorrect errors
|
|
15
|
-
"quotes": "off",
|
|
16
|
-
"@typescript-eslint/quotes": ["error"]
|
|
17
|
-
}
|
|
18
|
-
```
|
|
19
|
-
|
|
20
|
-
## Options
|
|
21
|
-
|
|
22
|
-
See [`eslint/quotes` options](https://eslint.org/docs/rules/quotes#options).
|
|
23
|
-
|
|
24
|
-
<sup>
|
|
25
|
-
|
|
26
|
-
Taken with ❤️ [from ESLint core](https://github.com/eslint/eslint/blob/main/docs/rules/quotes.md)
|
|
27
|
-
|
|
28
|
-
</sup>
|
|
29
|
-
|
|
30
|
-
## Attributes
|
|
31
|
-
|
|
32
|
-
- Configs:
|
|
33
|
-
- [ ] ✅ Recommended
|
|
34
|
-
- [ ] 🔒 Strict
|
|
35
|
-
- [x] 🔧 Fixable
|
|
36
|
-
- [ ] 💭 Requires type information
|
package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/require-array-sort-compare.md
CHANGED
|
@@ -1,9 +1,12 @@
|
|
|
1
|
-
|
|
1
|
+
---
|
|
2
|
+
description: 'Require `Array#sort` calls to always provide a `compareFunction`.'
|
|
3
|
+
---
|
|
2
4
|
|
|
3
|
-
|
|
5
|
+
> 🛑 This file is source code, not the primary documentation location! 🛑
|
|
6
|
+
>
|
|
7
|
+
> See **https://typescript-eslint.io/rules/require-array-sort-compare** for documentation.
|
|
4
8
|
|
|
5
9
|
This rule prevents invoking the `Array#sort()` method without providing a `compare` argument.
|
|
6
|
-
|
|
7
10
|
When called without a compare function, `Array#sort()` converts all non-undefined array elements into strings and then compares said strings based off their UTF-16 code units.
|
|
8
11
|
|
|
9
12
|
The result is that elements are sorted alphabetically, regardless of their type.
|
|
@@ -55,21 +58,6 @@ userDefinedType.sort();
|
|
|
55
58
|
|
|
56
59
|
## Options
|
|
57
60
|
|
|
58
|
-
The rule accepts an options object with the following properties:
|
|
59
|
-
|
|
60
|
-
```ts
|
|
61
|
-
type Options = {
|
|
62
|
-
/**
|
|
63
|
-
* If true, an array which all elements are string is ignored.
|
|
64
|
-
*/
|
|
65
|
-
ignoreStringArrays?: boolean;
|
|
66
|
-
};
|
|
67
|
-
|
|
68
|
-
const defaults = {
|
|
69
|
-
ignoreStringArrays: false,
|
|
70
|
-
};
|
|
71
|
-
```
|
|
72
|
-
|
|
73
61
|
### `ignoreStringArrays`
|
|
74
62
|
|
|
75
63
|
Examples of code for this rule with `{ ignoreStringArrays: true }`:
|
|
@@ -97,11 +85,3 @@ const three = '3';
|
|
|
97
85
|
## When Not To Use It
|
|
98
86
|
|
|
99
87
|
If you understand the language specification enough, you can turn this rule off safely.
|
|
100
|
-
|
|
101
|
-
## Attributes
|
|
102
|
-
|
|
103
|
-
- Configs:
|
|
104
|
-
- [ ] ✅ Recommended
|
|
105
|
-
- [ ] 🔒 Strict
|
|
106
|
-
- [ ] 🔧 Fixable
|
|
107
|
-
- [x] 💭 Requires type information
|
|
@@ -1,6 +1,10 @@
|
|
|
1
|
-
|
|
1
|
+
---
|
|
2
|
+
description: 'Disallow async functions which have no `await` expression.'
|
|
3
|
+
---
|
|
2
4
|
|
|
3
|
-
|
|
5
|
+
> 🛑 This file is source code, not the primary documentation location! 🛑
|
|
6
|
+
>
|
|
7
|
+
> See **https://typescript-eslint.io/rules/require-await** for documentation.
|
|
4
8
|
|
|
5
9
|
## Rule Details
|
|
6
10
|
|
|
@@ -18,29 +22,3 @@ const returnsPromise2 = () => returnsPromise1();
|
|
|
18
22
|
```
|
|
19
23
|
|
|
20
24
|
## How to Use
|
|
21
|
-
|
|
22
|
-
```jsonc
|
|
23
|
-
{
|
|
24
|
-
// note you must disable the base rule as it can report incorrect errors
|
|
25
|
-
"require-await": "off",
|
|
26
|
-
"@typescript-eslint/require-await": "error"
|
|
27
|
-
}
|
|
28
|
-
```
|
|
29
|
-
|
|
30
|
-
## Options
|
|
31
|
-
|
|
32
|
-
See [`eslint/require-await` options](https://eslint.org/docs/rules/require-await#options).
|
|
33
|
-
|
|
34
|
-
<sup>
|
|
35
|
-
|
|
36
|
-
Taken with ❤️ [from ESLint core](https://github.com/eslint/eslint/blob/main/docs/rules/require-await.md)
|
|
37
|
-
|
|
38
|
-
</sup>
|
|
39
|
-
|
|
40
|
-
## Attributes
|
|
41
|
-
|
|
42
|
-
- Configs:
|
|
43
|
-
- [x] ✅ Recommended
|
|
44
|
-
- [x] 🔒 Strict
|
|
45
|
-
- [ ] 🔧 Fixable
|
|
46
|
-
- [x] 💭 Requires type information
|
|
@@ -1,6 +1,10 @@
|
|
|
1
|
-
|
|
1
|
+
---
|
|
2
|
+
description: 'Require both operands of addition to have type `number` or `string`.'
|
|
3
|
+
---
|
|
2
4
|
|
|
3
|
-
|
|
5
|
+
> 🛑 This file is source code, not the primary documentation location! 🛑
|
|
6
|
+
>
|
|
7
|
+
> See **https://typescript-eslint.io/rules/restrict-plus-operands** for documentation.
|
|
4
8
|
|
|
5
9
|
## Rule Details
|
|
6
10
|
|
|
@@ -24,22 +28,6 @@ var foo = 1n + 1n;
|
|
|
24
28
|
|
|
25
29
|
## Options
|
|
26
30
|
|
|
27
|
-
The rule accepts an options object with the following properties:
|
|
28
|
-
|
|
29
|
-
```ts
|
|
30
|
-
type Options = {
|
|
31
|
-
// if true, check compound assignments (`+=`)
|
|
32
|
-
checkCompoundAssignments?: boolean;
|
|
33
|
-
// if true, 'any' itself and `string`,`bigint`, `number` is allowed.
|
|
34
|
-
allowAny?: boolean;
|
|
35
|
-
};
|
|
36
|
-
|
|
37
|
-
const defaults = {
|
|
38
|
-
checkCompoundAssignments: false,
|
|
39
|
-
allowAny: false,
|
|
40
|
-
};
|
|
41
|
-
```
|
|
42
|
-
|
|
43
31
|
### `checkCompoundAssignments`
|
|
44
32
|
|
|
45
33
|
Examples of code for this rule with `{ checkCompoundAssignments: true }`:
|
|
@@ -94,21 +82,3 @@ var fn = (a: any, b: number) => a + b;
|
|
|
94
82
|
```
|
|
95
83
|
|
|
96
84
|
## How to Use
|
|
97
|
-
|
|
98
|
-
```json
|
|
99
|
-
{
|
|
100
|
-
"@typescript-eslint/restrict-plus-operands": "error"
|
|
101
|
-
}
|
|
102
|
-
```
|
|
103
|
-
|
|
104
|
-
## Related To
|
|
105
|
-
|
|
106
|
-
- TSLint: [restrict-plus-operands](https://palantir.github.io/tslint/rules/restrict-plus-operands/)
|
|
107
|
-
|
|
108
|
-
## Attributes
|
|
109
|
-
|
|
110
|
-
- Configs:
|
|
111
|
-
- [x] ✅ Recommended
|
|
112
|
-
- [x] 🔒 Strict
|
|
113
|
-
- [ ] 🔧 Fixable
|
|
114
|
-
- [x] 💭 Requires type information
|
package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/restrict-template-expressions.md
CHANGED
|
@@ -1,6 +1,10 @@
|
|
|
1
|
-
|
|
1
|
+
---
|
|
2
|
+
description: 'Enforce template literal expressions to be of `string` type.'
|
|
3
|
+
---
|
|
2
4
|
|
|
3
|
-
|
|
5
|
+
> 🛑 This file is source code, not the primary documentation location! 🛑
|
|
6
|
+
>
|
|
7
|
+
> See **https://typescript-eslint.io/rules/restrict-template-expressions** for documentation.
|
|
4
8
|
|
|
5
9
|
## Rule Details
|
|
6
10
|
|
|
@@ -31,31 +35,6 @@ const msg3 = `stringWithKindProp = ${stringWithKindProp}`;
|
|
|
31
35
|
|
|
32
36
|
## Options
|
|
33
37
|
|
|
34
|
-
The rule accepts an options object with the following properties:
|
|
35
|
-
|
|
36
|
-
```ts
|
|
37
|
-
type Options = {
|
|
38
|
-
// if true, also allow number type in template expressions
|
|
39
|
-
allowNumber?: boolean;
|
|
40
|
-
// if true, also allow boolean type in template expressions
|
|
41
|
-
allowBoolean?: boolean;
|
|
42
|
-
// if true, also allow any in template expressions
|
|
43
|
-
allowAny?: boolean;
|
|
44
|
-
// if true, also allow null and undefined in template expressions
|
|
45
|
-
allowNullish?: boolean;
|
|
46
|
-
// if true, also allow RegExp in template expressions
|
|
47
|
-
allowRegExp?: boolean;
|
|
48
|
-
};
|
|
49
|
-
|
|
50
|
-
const defaults = {
|
|
51
|
-
allowNumber: true,
|
|
52
|
-
allowBoolean: false,
|
|
53
|
-
allowAny: false,
|
|
54
|
-
allowNullish: false,
|
|
55
|
-
allowRegExp: false,
|
|
56
|
-
};
|
|
57
|
-
```
|
|
58
|
-
|
|
59
38
|
### `allowNumber`
|
|
60
39
|
|
|
61
40
|
Examples of additional **correct** code for this rule with `{ allowNumber: true }`:
|
|
@@ -108,11 +87,3 @@ const msg1 = `arg = ${arg}`;
|
|
|
108
87
|
const arg = /foo/;
|
|
109
88
|
const msg1 = `arg = ${arg}`;
|
|
110
89
|
```
|
|
111
|
-
|
|
112
|
-
## Attributes
|
|
113
|
-
|
|
114
|
-
- Configs:
|
|
115
|
-
- [x] ✅ Recommended
|
|
116
|
-
- [x] 🔒 Strict
|
|
117
|
-
- [ ] 🔧 Fixable
|
|
118
|
-
- [x] 💭 Requires type information
|
|
@@ -1,6 +1,10 @@
|
|
|
1
|
-
|
|
1
|
+
---
|
|
2
|
+
description: 'Enforce consistent returning of awaited values.'
|
|
3
|
+
---
|
|
2
4
|
|
|
3
|
-
|
|
5
|
+
> 🛑 This file is source code, not the primary documentation location! 🛑
|
|
6
|
+
>
|
|
7
|
+
> See **https://typescript-eslint.io/rules/return-await** for documentation.
|
|
4
8
|
|
|
5
9
|
Returning an awaited promise can make sense for better stack trace information as well as for consistent error handling (returned promises will not be caught in an async function try/catch).
|
|
6
10
|
|
|
@@ -9,16 +13,6 @@ Returning an awaited promise can make sense for better stack trace information a
|
|
|
9
13
|
This rule builds on top of the [`eslint/no-return-await`](https://eslint.org/docs/rules/no-return-await) rule.
|
|
10
14
|
It expands upon the base rule to add support for optionally requiring `return await` in certain cases.
|
|
11
15
|
|
|
12
|
-
## How to Use
|
|
13
|
-
|
|
14
|
-
```jsonc
|
|
15
|
-
{
|
|
16
|
-
// note you must disable the base rule as it can report incorrect errors
|
|
17
|
-
"no-return-await": "off",
|
|
18
|
-
"@typescript-eslint/return-await": "error"
|
|
19
|
-
}
|
|
20
|
-
```
|
|
21
|
-
|
|
22
16
|
## Options
|
|
23
17
|
|
|
24
18
|
```ts
|
|
@@ -220,11 +214,3 @@ async function validNever3() {
|
|
|
220
214
|
return 'value';
|
|
221
215
|
}
|
|
222
216
|
```
|
|
223
|
-
|
|
224
|
-
## Attributes
|
|
225
|
-
|
|
226
|
-
- Configs:
|
|
227
|
-
- [ ] ✅ Recommended
|
|
228
|
-
- [ ] 🔒 Strict
|
|
229
|
-
- [x] 🔧 Fixable
|
|
230
|
-
- [x] 💭 Requires type information
|
|
@@ -1,6 +1,10 @@
|
|
|
1
|
-
|
|
1
|
+
---
|
|
2
|
+
description: 'Require or disallow semicolons instead of ASI.'
|
|
3
|
+
---
|
|
2
4
|
|
|
3
|
-
|
|
5
|
+
> 🛑 This file is source code, not the primary documentation location! 🛑
|
|
6
|
+
>
|
|
7
|
+
> See **https://typescript-eslint.io/rules/semi** for documentation.
|
|
4
8
|
|
|
5
9
|
This rule enforces consistent use of semicolons after statements.
|
|
6
10
|
|
|
@@ -10,31 +14,3 @@ This rule extends the base [`eslint/semi`](https://eslint.org/docs/rules/semi) r
|
|
|
10
14
|
It adds support for TypeScript features that require semicolons.
|
|
11
15
|
|
|
12
16
|
See also the [`@typescript-eslint/member-delimiter-style`](member-delimiter-style.md) rule, which allows you to specify the delimiter for `type` and `interface` members.
|
|
13
|
-
|
|
14
|
-
## How to Use
|
|
15
|
-
|
|
16
|
-
```jsonc
|
|
17
|
-
{
|
|
18
|
-
// note you must disable the base rule as it can report incorrect errors
|
|
19
|
-
"semi": "off",
|
|
20
|
-
"@typescript-eslint/semi": ["error"]
|
|
21
|
-
}
|
|
22
|
-
```
|
|
23
|
-
|
|
24
|
-
## Options
|
|
25
|
-
|
|
26
|
-
See [`eslint/semi` options](https://eslint.org/docs/rules/semi#options).
|
|
27
|
-
|
|
28
|
-
<sup>
|
|
29
|
-
|
|
30
|
-
Taken with ❤️ [from ESLint core](https://github.com/eslint/eslint/blob/main/docs/rules/semi.md)
|
|
31
|
-
|
|
32
|
-
</sup>
|
|
33
|
-
|
|
34
|
-
## Attributes
|
|
35
|
-
|
|
36
|
-
- Configs:
|
|
37
|
-
- [ ] ✅ Recommended
|
|
38
|
-
- [ ] 🔒 Strict
|
|
39
|
-
- [x] 🔧 Fixable
|
|
40
|
-
- [ ] 💭 Requires type information
|
|
@@ -1,6 +1,10 @@
|
|
|
1
|
-
|
|
1
|
+
---
|
|
2
|
+
description: 'Enforce members of a type union/intersection to be sorted alphabetically.'
|
|
3
|
+
---
|
|
2
4
|
|
|
3
|
-
|
|
5
|
+
> 🛑 This file is source code, not the primary documentation location! 🛑
|
|
6
|
+
>
|
|
7
|
+
> See **https://typescript-eslint.io/rules/sort-type-union-intersection-members** for documentation.
|
|
4
8
|
|
|
5
9
|
Sorting union (`|`) and intersection (`&`) types can help:
|
|
6
10
|
|
|
@@ -91,49 +95,6 @@ type T4 =
|
|
|
91
95
|
|
|
92
96
|
## Options
|
|
93
97
|
|
|
94
|
-
```ts
|
|
95
|
-
type Options = {
|
|
96
|
-
// true to check intersection types, false otherwise
|
|
97
|
-
checkIntersections?: boolean;
|
|
98
|
-
// true to check union types, false otherwise
|
|
99
|
-
checkUnions?: boolean;
|
|
100
|
-
// the ordering of the groups
|
|
101
|
-
groupOrder?: (
|
|
102
|
-
| 'conditional'
|
|
103
|
-
| 'function'
|
|
104
|
-
| 'import'
|
|
105
|
-
| 'intersection'
|
|
106
|
-
| 'keyword'
|
|
107
|
-
| 'literal'
|
|
108
|
-
| 'named'
|
|
109
|
-
| 'object'
|
|
110
|
-
| 'operator'
|
|
111
|
-
| 'tuple'
|
|
112
|
-
| 'union'
|
|
113
|
-
| 'nullish'
|
|
114
|
-
)[];
|
|
115
|
-
};
|
|
116
|
-
|
|
117
|
-
const defaultOptions: Options = {
|
|
118
|
-
checkIntersections: true,
|
|
119
|
-
checkUnions: true,
|
|
120
|
-
groupOrder: [
|
|
121
|
-
'named',
|
|
122
|
-
'keyword',
|
|
123
|
-
'operator',
|
|
124
|
-
'literal',
|
|
125
|
-
'function',
|
|
126
|
-
'import',
|
|
127
|
-
'conditional',
|
|
128
|
-
'object',
|
|
129
|
-
'tuple',
|
|
130
|
-
'intersection',
|
|
131
|
-
'union',
|
|
132
|
-
'nullish',
|
|
133
|
-
],
|
|
134
|
-
};
|
|
135
|
-
```
|
|
136
|
-
|
|
137
98
|
### `groupOrder`
|
|
138
99
|
|
|
139
100
|
Each member of the type is placed into a group, and then the rule sorts alphabetically within each group.
|
|
@@ -151,11 +112,3 @@ The ordering of groups is determined by this option.
|
|
|
151
112
|
- `tuple` - Tuple types (`[A, B, C]`)
|
|
152
113
|
- `union` - Union types (`A | B`)
|
|
153
114
|
- `nullish` - `null` and `undefined`
|
|
154
|
-
|
|
155
|
-
## Attributes
|
|
156
|
-
|
|
157
|
-
- Configs:
|
|
158
|
-
- [ ] ✅ Recommended
|
|
159
|
-
- [ ] 🔒 Strict
|
|
160
|
-
- [x] 🔧 Fixable
|
|
161
|
-
- [ ] 💭 Requires type information
|