xo 0.51.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/lib/options-manager.js +89 -6
- package/node_modules/@typescript-eslint/eslint-plugin/README.md +1 -1
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/array-type.js +21 -8
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/array-type.js.map +1 -1
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/ban-ts-comment.js +37 -31
- 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/comma-dangle.js +10 -10
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/comma-dangle.js.map +1 -1
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/consistent-generic-constructors.js +17 -4
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/consistent-generic-constructors.js.map +1 -1
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/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/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/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-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 +2 -1
- 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 +4 -0
- 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 +8 -3
- 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-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-namespace.js +2 -0
- 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-optional-chain.js +0 -1
- 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 +0 -1
- 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-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 +8 -0
- 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 +2 -0
- 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 +2 -0
- 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-type-assertion.js +1 -0
- 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 +3 -1
- 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 +1 -1
- 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-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/non-nullable-type-assertion-style.js +0 -1
- 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 +5 -5
- 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 +31 -23
- 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 +5 -1
- 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 +0 -1
- 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-nullish-coalescing.js +133 -4
- 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/promise-function-async.js +2 -0
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/promise-function-async.js.map +1 -1
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/require-array-sort-compare.js +1 -0
- 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 +2 -0
- 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 +20 -5
- 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 +1 -1
- 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 +3 -0
- 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/switch-exhaustiveness-check.js +0 -1
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/switch-exhaustiveness-check.js.map +1 -1
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/typedef.js +3 -1
- 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 +1 -0
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/unbound-method.js.map +1 -1
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/unified-signatures.js +1 -0
- 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/docs/rules/TEMPLATE.md +3 -30
- package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/adjacent-overload-signatures.md +6 -15
- package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/array-type.md +6 -21
- package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/await-thenable.md +6 -15
- package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/ban-ts-comment.md +8 -26
- package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/ban-tslint-comment.md +6 -15
- package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/ban-types.md +74 -95
- package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/brace-style.md +6 -22
- 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 -5
- package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/comma-dangle.md +9 -27
- package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/comma-spacing.md +6 -22
- package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/consistent-generic-constructors.md +11 -20
- package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/consistent-indexed-object-style.md +19 -21
- package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/consistent-type-assertions.md +9 -21
- package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/consistent-type-definitions.md +15 -18
- package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/consistent-type-exports.md +9 -16
- package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/consistent-type-imports.md +9 -19
- package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/default-param-last.md +8 -24
- package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/dot-notation.md +10 -22
- package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/explicit-function-return-type.md +7 -33
- package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/explicit-member-accessibility.md +7 -26
- package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/explicit-module-boundary-types.md +7 -43
- package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/func-call-spacing.md +6 -22
- package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/indent.md +11 -23
- package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/init-declarations.md +6 -22
- package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/keyword-spacing.md +6 -22
- package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/lines-between-class-members.md +8 -24
- package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/member-delimiter-style.md +6 -2
- package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/member-ordering.md +34 -9
- package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/method-signature-style.md +6 -2
- package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/naming-convention.md +6 -2
- package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-array-constructor.md +6 -22
- package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-base-to-string.md +7 -11
- package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-confusing-non-null-assertion.md +6 -15
- package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-confusing-void-expression.md +6 -38
- package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-dupe-class-members.md +6 -22
- package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-duplicate-enum-values.md +10 -19
- package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-duplicate-imports.md +8 -28
- package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-dynamic-delete.md +6 -15
- package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-empty-function.md +6 -29
- package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-empty-interface.md +6 -2
- package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-explicit-any.md +6 -18
- package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-extra-non-null-assertion.md +6 -15
- package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-extra-parens.md +6 -22
- package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-extra-semi.md +6 -22
- package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-extraneous-class.md +6 -24
- package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-floating-promises.md +6 -18
- package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-for-in-array.md +6 -15
- package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-implicit-any-catch.md +11 -20
- package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-implied-eval.md +6 -18
- package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-inferrable-types.md +11 -27
- package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-invalid-this.md +6 -26
- package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-invalid-void-type.md +6 -14
- package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-loop-func.md +6 -22
- package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-loss-of-precision.md +6 -19
- package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-magic-numbers.md +6 -24
- package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-meaningless-void-operator.md +6 -2
- package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-misused-new.md +6 -15
- package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-misused-promises.md +6 -2
- package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-namespace.md +10 -13
- package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-non-null-asserted-nullish-coalescing.md +6 -15
- package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-non-null-asserted-optional-chain.md +6 -15
- package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-non-null-assertion.md +6 -15
- package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-parameter-properties.md +11 -2
- package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-redeclare.md +6 -19
- package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-redundant-type-constituents.md +6 -15
- package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-require-imports.md +6 -15
- package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-restricted-imports.md +6 -13
- package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-shadow.md +6 -19
- package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-this-alias.md +6 -18
- package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-throw-literal.md +25 -29
- package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-type-alias.md +6 -14
- package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-unnecessary-boolean-literal-compare.md +6 -22
- package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-unnecessary-condition.md +6 -16
- package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-unnecessary-qualifier.md +6 -15
- package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-unnecessary-type-arguments.md +6 -15
- package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-unnecessary-type-assertion.md +8 -4
- package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-unnecessary-type-constraint.md +6 -15
- package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-unsafe-argument.md +6 -15
- package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-unsafe-assignment.md +6 -15
- package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-unsafe-call.md +6 -15
- package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-unsafe-member-access.md +6 -15
- package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-unsafe-return.md +6 -15
- package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-unused-expressions.md +6 -22
- package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-unused-vars.md +6 -22
- package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-use-before-define.md +6 -23
- package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-useless-constructor.md +7 -23
- package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-useless-empty-export.md +6 -15
- package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-var-requires.md +6 -15
- package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/non-nullable-type-assertion-style.md +6 -15
- package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/object-curly-spacing.md +6 -22
- package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/padding-line-between-statements.md +10 -31
- package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/parameter-properties.md +6 -2
- package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/prefer-as-const.md +6 -15
- package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/prefer-enum-initializers.md +6 -15
- package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/prefer-for-of.md +6 -15
- package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/prefer-function-type.md +6 -15
- package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/prefer-includes.md +6 -15
- package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/prefer-literal-enum-member.md +6 -2
- package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/prefer-namespace-keyword.md +6 -15
- package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/prefer-nullish-coalescing.md +48 -2
- package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/prefer-optional-chain.md +16 -15
- package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/prefer-readonly-parameter-types.md +6 -15
- package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/prefer-readonly.md +6 -4
- package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/prefer-reduce-type-parameter.md +6 -15
- package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/prefer-regexp-exec.md +6 -15
- package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/prefer-return-this-type.md +6 -15
- package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/prefer-string-starts-ends-with.md +6 -16
- package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/prefer-ts-expect-error.md +6 -15
- package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/promise-function-async.md +6 -31
- package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/quotes.md +6 -22
- package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/require-array-sort-compare.md +6 -18
- package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/require-await.md +6 -20
- package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/restrict-plus-operands.md +6 -24
- package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/restrict-template-expressions.md +6 -27
- package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/return-await.md +6 -12
- package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/semi.md +6 -22
- package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/sort-type-union-intersection-members.md +6 -45
- package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/space-before-blocks.md +10 -22
- package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/space-before-function-paren.md +6 -22
- package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/space-infix-ops.md +7 -23
- package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/strict-boolean-expressions.md +6 -25
- package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/switch-exhaustiveness-check.md +6 -15
- package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/triple-slash-reference.md +9 -19
- package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/type-annotation-spacing.md +8 -14
- package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/typedef.md +11 -27
- package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/unbound-method.md +7 -23
- package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/unified-signatures.md +12 -18
- package/node_modules/@typescript-eslint/eslint-plugin/package.json +5 -5
- package/node_modules/@typescript-eslint/parser/README.md +1 -1
- package/node_modules/@typescript-eslint/parser/package.json +5 -5
- 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 +6 -0
- 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/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 +5 -5
- package/node_modules/@typescript-eslint/type-utils/package.json +4 -4
- package/node_modules/@typescript-eslint/types/dist/generated/ast-spec.d.ts +1 -1
- package/node_modules/@typescript-eslint/types/dist/generated/ast-spec.d.ts.map +1 -1
- package/node_modules/@typescript-eslint/types/dist/parser-options.d.ts +1 -0
- package/node_modules/@typescript-eslint/types/dist/parser-options.d.ts.map +1 -1
- package/node_modules/@typescript-eslint/types/package.json +2 -2
- package/node_modules/@typescript-eslint/typescript-estree/dist/convert.js +2 -2
- package/node_modules/@typescript-eslint/typescript-estree/dist/convert.js.map +1 -1
- package/node_modules/@typescript-eslint/typescript-estree/package.json +5 -5
- 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/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/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/package.json +5 -5
- package/node_modules/@typescript-eslint/visitor-keys/package.json +3 -3
- 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 +10 -10
- package/node_modules/@typescript-eslint/parser/_ts3.4/dist/index.d.ts +0 -4
- package/node_modules/@typescript-eslint/parser/_ts3.4/dist/parser.d.ts +0 -20
- package/node_modules/@typescript-eslint/type-utils/_ts3.4/dist/containsAllTypesByName.d.ts +0 -8
- package/node_modules/@typescript-eslint/type-utils/_ts3.4/dist/getConstrainedTypeAtLocation.d.ts +0 -6
- package/node_modules/@typescript-eslint/type-utils/_ts3.4/dist/getContextualType.d.ts +0 -8
- package/node_modules/@typescript-eslint/type-utils/_ts3.4/dist/getDeclaration.d.ts +0 -6
- package/node_modules/@typescript-eslint/type-utils/_ts3.4/dist/getSourceFileOfNode.d.ts +0 -6
- package/node_modules/@typescript-eslint/type-utils/_ts3.4/dist/getTokenAtPosition.d.ts +0 -3
- package/node_modules/@typescript-eslint/type-utils/_ts3.4/dist/getTypeArguments.d.ts +0 -3
- package/node_modules/@typescript-eslint/type-utils/_ts3.4/dist/getTypeName.d.ts +0 -8
- package/node_modules/@typescript-eslint/type-utils/_ts3.4/dist/index.d.ts +0 -15
- package/node_modules/@typescript-eslint/type-utils/_ts3.4/dist/isTypeReadonly.d.ts +0 -20
- package/node_modules/@typescript-eslint/type-utils/_ts3.4/dist/isUnsafeAssignment.d.ts +0 -17
- package/node_modules/@typescript-eslint/type-utils/_ts3.4/dist/predicates.d.ts +0 -52
- package/node_modules/@typescript-eslint/type-utils/_ts3.4/dist/propertyTypes.d.ts +0 -4
- package/node_modules/@typescript-eslint/type-utils/_ts3.4/dist/requiresQuoting.d.ts +0 -4
- package/node_modules/@typescript-eslint/type-utils/_ts3.4/dist/typeFlagUtils.d.ts +0 -11
- package/node_modules/@typescript-eslint/types/_ts3.4/dist/generated/ast-spec.d.ts +0 -1732
- package/node_modules/@typescript-eslint/types/_ts3.4/dist/index.d.ts +0 -5
- package/node_modules/@typescript-eslint/types/_ts3.4/dist/lib.d.ts +0 -3
- package/node_modules/@typescript-eslint/types/_ts3.4/dist/parser-options.d.ts +0 -35
- package/node_modules/@typescript-eslint/types/_ts3.4/dist/ts-estree.d.ts +0 -9
- package/node_modules/@typescript-eslint/typescript-estree/_ts3.4/dist/ast-converter.d.ts +0 -9
- package/node_modules/@typescript-eslint/typescript-estree/_ts3.4/dist/convert-comments.d.ts +0 -11
- package/node_modules/@typescript-eslint/typescript-estree/_ts3.4/dist/convert.d.ts +0 -157
- package/node_modules/@typescript-eslint/typescript-estree/_ts3.4/dist/create-program/WatchCompilerHostOfConfigFile.d.ts +0 -13
- package/node_modules/@typescript-eslint/typescript-estree/_ts3.4/dist/create-program/createDefaultProgram.d.ts +0 -12
- package/node_modules/@typescript-eslint/typescript-estree/_ts3.4/dist/create-program/createIsolatedProgram.d.ts +0 -9
- package/node_modules/@typescript-eslint/typescript-estree/_ts3.4/dist/create-program/createProjectProgram.d.ts +0 -11
- package/node_modules/@typescript-eslint/typescript-estree/_ts3.4/dist/create-program/createSourceFile.d.ts +0 -5
- package/node_modules/@typescript-eslint/typescript-estree/_ts3.4/dist/create-program/createWatchProgram.d.ts +0 -19
- package/node_modules/@typescript-eslint/typescript-estree/_ts3.4/dist/create-program/getScriptKind.d.ts +0 -5
- package/node_modules/@typescript-eslint/typescript-estree/_ts3.4/dist/create-program/shared.d.ts +0 -22
- package/node_modules/@typescript-eslint/typescript-estree/_ts3.4/dist/create-program/useProvidedPrograms.d.ts +0 -13
- package/node_modules/@typescript-eslint/typescript-estree/_ts3.4/dist/index.d.ts +0 -10
- package/node_modules/@typescript-eslint/typescript-estree/_ts3.4/dist/jsx/xhtml-entities.d.ts +0 -2
- package/node_modules/@typescript-eslint/typescript-estree/_ts3.4/dist/node-utils.d.ts +0 -230
- package/node_modules/@typescript-eslint/typescript-estree/_ts3.4/dist/parser-options.d.ts +0 -188
- package/node_modules/@typescript-eslint/typescript-estree/_ts3.4/dist/parser.d.ts +0 -25
- package/node_modules/@typescript-eslint/typescript-estree/_ts3.4/dist/semantic-or-syntactic-errors.d.ts +0 -13
- package/node_modules/@typescript-eslint/typescript-estree/_ts3.4/dist/simple-traverse.d.ts +0 -9
- package/node_modules/@typescript-eslint/typescript-estree/_ts3.4/dist/ts-estree/estree-to-ts-node-types.d.ts +0 -175
- package/node_modules/@typescript-eslint/typescript-estree/_ts3.4/dist/ts-estree/index.d.ts +0 -4
- package/node_modules/@typescript-eslint/typescript-estree/_ts3.4/dist/ts-estree/ts-nodes.d.ts +0 -18
- package/node_modules/@typescript-eslint/typescript-estree/_ts3.4/dist/version-check.d.ts +0 -3
- package/node_modules/@typescript-eslint/utils/_ts3.4/dist/ast-utils/eslint-utils/PatternMatcher.d.ts +0 -48
- package/node_modules/@typescript-eslint/utils/_ts3.4/dist/ast-utils/eslint-utils/ReferenceTracker.d.ts +0 -76
- package/node_modules/@typescript-eslint/utils/_ts3.4/dist/ast-utils/eslint-utils/astUtilities.d.ts +0 -76
- package/node_modules/@typescript-eslint/utils/_ts3.4/dist/ast-utils/eslint-utils/index.d.ts +0 -6
- package/node_modules/@typescript-eslint/utils/_ts3.4/dist/ast-utils/eslint-utils/predicates.d.ts +0 -32
- package/node_modules/@typescript-eslint/utils/_ts3.4/dist/ast-utils/eslint-utils/scopeAnalysis.d.ts +0 -18
- package/node_modules/@typescript-eslint/utils/_ts3.4/dist/ast-utils/helpers.d.ts +0 -47
- package/node_modules/@typescript-eslint/utils/_ts3.4/dist/ast-utils/index.d.ts +0 -5
- package/node_modules/@typescript-eslint/utils/_ts3.4/dist/ast-utils/misc.d.ts +0 -8
- package/node_modules/@typescript-eslint/utils/_ts3.4/dist/ast-utils/predicates.d.ts +0 -180
- package/node_modules/@typescript-eslint/utils/_ts3.4/dist/eslint-utils/InferTypesFromRule.d.ts +0 -11
- package/node_modules/@typescript-eslint/utils/_ts3.4/dist/eslint-utils/RuleCreator.d.ts +0 -35
- package/node_modules/@typescript-eslint/utils/_ts3.4/dist/eslint-utils/RuleTester.d.ts +0 -18
- package/node_modules/@typescript-eslint/utils/_ts3.4/dist/eslint-utils/applyDefault.d.ts +0 -10
- package/node_modules/@typescript-eslint/utils/_ts3.4/dist/eslint-utils/batchedSingleLineTests.d.ts +0 -24
- package/node_modules/@typescript-eslint/utils/_ts3.4/dist/eslint-utils/deepMerge.d.ts +0 -17
- package/node_modules/@typescript-eslint/utils/_ts3.4/dist/eslint-utils/getParserServices.d.ts +0 -8
- package/node_modules/@typescript-eslint/utils/_ts3.4/dist/eslint-utils/index.d.ts +0 -9
- package/node_modules/@typescript-eslint/utils/_ts3.4/dist/eslint-utils/nullThrows.d.ts +0 -14
- package/node_modules/@typescript-eslint/utils/_ts3.4/dist/index.d.ts +0 -8
- package/node_modules/@typescript-eslint/utils/_ts3.4/dist/json-schema.d.ts +0 -2
- package/node_modules/@typescript-eslint/utils/_ts3.4/dist/ts-eslint/AST.d.ts +0 -9
- package/node_modules/@typescript-eslint/utils/_ts3.4/dist/ts-eslint/CLIEngine.d.ts +0 -137
- package/node_modules/@typescript-eslint/utils/_ts3.4/dist/ts-eslint/ESLint.d.ts +0 -376
- package/node_modules/@typescript-eslint/utils/_ts3.4/dist/ts-eslint/Linter.d.ts +0 -326
- package/node_modules/@typescript-eslint/utils/_ts3.4/dist/ts-eslint/ParserOptions.d.ts +0 -2
- package/node_modules/@typescript-eslint/utils/_ts3.4/dist/ts-eslint/Rule.d.ts +0 -389
- package/node_modules/@typescript-eslint/utils/_ts3.4/dist/ts-eslint/RuleTester.d.ts +0 -154
- package/node_modules/@typescript-eslint/utils/_ts3.4/dist/ts-eslint/Scope.d.ts +0 -44
- package/node_modules/@typescript-eslint/utils/_ts3.4/dist/ts-eslint/SourceCode.d.ts +0 -342
- package/node_modules/@typescript-eslint/utils/_ts3.4/dist/ts-eslint/index.d.ts +0 -10
- package/node_modules/@typescript-eslint/utils/_ts3.4/dist/ts-eslint-scope/Definition.d.ts +0 -19
- package/node_modules/@typescript-eslint/utils/_ts3.4/dist/ts-eslint-scope/Options.d.ts +0 -15
- package/node_modules/@typescript-eslint/utils/_ts3.4/dist/ts-eslint-scope/PatternVisitor.d.ts +0 -25
- package/node_modules/@typescript-eslint/utils/_ts3.4/dist/ts-eslint-scope/Reference.d.ts +0 -28
- package/node_modules/@typescript-eslint/utils/_ts3.4/dist/ts-eslint-scope/Referencer.d.ts +0 -55
- package/node_modules/@typescript-eslint/utils/_ts3.4/dist/ts-eslint-scope/Scope.d.ts +0 -103
- package/node_modules/@typescript-eslint/utils/_ts3.4/dist/ts-eslint-scope/ScopeManager.d.ts +0 -50
- package/node_modules/@typescript-eslint/utils/_ts3.4/dist/ts-eslint-scope/Variable.d.ts +0 -17
- package/node_modules/@typescript-eslint/utils/_ts3.4/dist/ts-eslint-scope/analyze.d.ts +0 -16
- package/node_modules/@typescript-eslint/utils/_ts3.4/dist/ts-eslint-scope/index.d.ts +0 -11
- package/node_modules/@typescript-eslint/utils/_ts3.4/dist/ts-estree.d.ts +0 -3
- package/node_modules/@typescript-eslint/visitor-keys/_ts3.4/dist/get-keys.d.ts +0 -4
- package/node_modules/@typescript-eslint/visitor-keys/_ts3.4/dist/index.d.ts +0 -3
- package/node_modules/@typescript-eslint/visitor-keys/_ts3.4/dist/visitor-keys.d.ts +0 -6
package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/lines-between-class-members.md
CHANGED
|
@@ -1,31 +1,21 @@
|
|
|
1
|
-
|
|
1
|
+
---
|
|
2
|
+
description: 'Require or disallow an empty line between class members.'
|
|
3
|
+
---
|
|
2
4
|
|
|
3
|
-
|
|
5
|
+
> 🛑 This file is source code, not the primary documentation location! 🛑
|
|
6
|
+
>
|
|
7
|
+
> See **https://typescript-eslint.io/rules/lines-between-class-members** for documentation.
|
|
4
8
|
|
|
5
|
-
This rule improves readability by enforcing lines between class members. It will not check empty lines before the first member and after the last member. This rule require or disallow an empty line between class members.
|
|
9
|
+
This rule improves readability by enforcing lines between class members. It will not check empty lines before the first member and after the last member. This rule will require or disallow an empty line between class members.
|
|
6
10
|
|
|
7
11
|
## Rule Details
|
|
8
12
|
|
|
9
13
|
This rule extends the base [`eslint/lines-between-class-members`](https://eslint.org/docs/rules/lines-between-class-members) rule.
|
|
10
14
|
It adds support for ignoring overload methods in a class.
|
|
11
15
|
|
|
12
|
-
See the [ESLint documentation](https://eslint.org/docs/rules/lines-between-class-members) for more details on the `lines-between-class-members` rule.
|
|
13
|
-
|
|
14
|
-
## Rule Changes
|
|
15
|
-
|
|
16
|
-
```jsonc
|
|
17
|
-
{
|
|
18
|
-
// note you must disable the base rule as it can report incorrect errors
|
|
19
|
-
"lines-between-class-members": "off",
|
|
20
|
-
"@typescript-eslint/lines-between-class-members": ["error"]
|
|
21
|
-
}
|
|
22
|
-
```
|
|
23
|
-
|
|
24
|
-
In addition to the options supported by the `lines-between-class-members` rule in ESLint core, the rule adds the following options:
|
|
25
|
-
|
|
26
16
|
## Options
|
|
27
17
|
|
|
28
|
-
|
|
18
|
+
In addition to the options supported by the `lines-between-class-members` rule in ESLint core, the rule adds the following options:
|
|
29
19
|
|
|
30
20
|
- Object option:
|
|
31
21
|
|
|
@@ -71,9 +61,3 @@ class foo {
|
|
|
71
61
|
qux() {}
|
|
72
62
|
}
|
|
73
63
|
```
|
|
74
|
-
|
|
75
|
-
<sup>
|
|
76
|
-
|
|
77
|
-
Taken with ❤️ [from ESLint core](https://github.com/eslint/eslint/blob/main/docs/rules/lines-between-class-members.md)
|
|
78
|
-
|
|
79
|
-
</sup>
|
|
@@ -1,6 +1,10 @@
|
|
|
1
|
-
|
|
1
|
+
---
|
|
2
|
+
description: 'Require a specific member delimiter style for interfaces and type literals.'
|
|
3
|
+
---
|
|
2
4
|
|
|
3
|
-
|
|
5
|
+
> 🛑 This file is source code, not the primary documentation location! 🛑
|
|
6
|
+
>
|
|
7
|
+
> See **https://typescript-eslint.io/rules/member-delimiter-style** for documentation.
|
|
4
8
|
|
|
5
9
|
Enforces a consistent member delimiter style in interfaces and type literals. There are three member delimiter styles primarily used in TypeScript:
|
|
6
10
|
|
|
@@ -1,6 +1,10 @@
|
|
|
1
|
-
|
|
1
|
+
---
|
|
2
|
+
description: 'Require a consistent member declaration order.'
|
|
3
|
+
---
|
|
2
4
|
|
|
3
|
-
|
|
5
|
+
> 🛑 This file is source code, not the primary documentation location! 🛑
|
|
6
|
+
>
|
|
7
|
+
> See **https://typescript-eslint.io/rules/member-ordering** for documentation.
|
|
4
8
|
|
|
5
9
|
A consistent ordering of fields, methods and constructors can make interfaces, type literals, classes and class expressions easier to read, navigate, and edit.
|
|
6
10
|
|
|
@@ -40,7 +44,7 @@ You can configure `OrderConfig` options for:
|
|
|
40
44
|
|
|
41
45
|
The `OrderConfig` settings for each kind of construct may configure sorting on one or both two levels:
|
|
42
46
|
|
|
43
|
-
- **`
|
|
47
|
+
- **`memberTypes`**: organizing on member type groups such as methods vs. properties
|
|
44
48
|
- **`order`**: organizing based on member names, such as alphabetically
|
|
45
49
|
|
|
46
50
|
### Groups
|
|
@@ -94,6 +98,9 @@ The default configuration looks as follows:
|
|
|
94
98
|
|
|
95
99
|
"field",
|
|
96
100
|
|
|
101
|
+
// Static initialization
|
|
102
|
+
"static-initialization",
|
|
103
|
+
|
|
97
104
|
// Constructors
|
|
98
105
|
"public-constructor",
|
|
99
106
|
"protected-constructor",
|
|
@@ -908,6 +915,9 @@ The most explicit and granular form is the following:
|
|
|
908
915
|
"protected-abstract-field",
|
|
909
916
|
"private-abstract-field",
|
|
910
917
|
|
|
918
|
+
// Static initialization
|
|
919
|
+
"static-initialization",
|
|
920
|
+
|
|
911
921
|
// Constructors
|
|
912
922
|
"public-constructor",
|
|
913
923
|
"protected-constructor",
|
|
@@ -1006,6 +1016,9 @@ It is also possible to group member types by their accessibility (`static`, `ins
|
|
|
1006
1016
|
"protected-field", // = ["protected-static-field", "protected-instance-field"]
|
|
1007
1017
|
"private-field", // = ["private-static-field", "private-instance-field"]
|
|
1008
1018
|
|
|
1019
|
+
// Static initialization
|
|
1020
|
+
// No accessibility for static initialization.
|
|
1021
|
+
|
|
1009
1022
|
// Constructors
|
|
1010
1023
|
// Only the accessibility of constructors is configurable. See below.
|
|
1011
1024
|
|
|
@@ -1043,6 +1056,9 @@ their accessibility.
|
|
|
1043
1056
|
|
|
1044
1057
|
"decorated-field", // = ["public-decorated-field", "protected-decorated-field", "private-decorated-field"]
|
|
1045
1058
|
|
|
1059
|
+
// Static initialization
|
|
1060
|
+
// No decorators for static initialization.
|
|
1061
|
+
|
|
1046
1062
|
// Constructors
|
|
1047
1063
|
// There are no decorators for constructors.
|
|
1048
1064
|
|
|
@@ -1051,14 +1067,14 @@ their accessibility.
|
|
|
1051
1067
|
"protected-decorated-get",
|
|
1052
1068
|
"private-decorated-get",
|
|
1053
1069
|
|
|
1054
|
-
"decorated-get" // = ["public-decorated-get", "protected-decorated-get", "private-decorated-get"]
|
|
1070
|
+
"decorated-get", // = ["public-decorated-get", "protected-decorated-get", "private-decorated-get"]
|
|
1055
1071
|
|
|
1056
1072
|
// Setters
|
|
1057
1073
|
"public-decorated-set",
|
|
1058
1074
|
"protected-decorated-set",
|
|
1059
1075
|
"private-decorated-set",
|
|
1060
1076
|
|
|
1061
|
-
"decorated-set" // = ["public-decorated-set", "protected-decorated-set", "private-decorated-set"]
|
|
1077
|
+
"decorated-set", // = ["public-decorated-set", "protected-decorated-set", "private-decorated-set"]
|
|
1062
1078
|
|
|
1063
1079
|
// Methods
|
|
1064
1080
|
"public-decorated-method",
|
|
@@ -1083,18 +1099,21 @@ Another option is to group the member types by their scope (`public`, `protected
|
|
|
1083
1099
|
"instance-field", // = ["public-instance-field", "protected-instance-field", "private-instance-field"]
|
|
1084
1100
|
"abstract-field", // = ["public-abstract-field", "protected-abstract-field", "private-abstract-field"]
|
|
1085
1101
|
|
|
1102
|
+
// Static initialization
|
|
1103
|
+
// No scope for static initialization.
|
|
1104
|
+
|
|
1086
1105
|
// Constructors
|
|
1087
1106
|
"constructor", // = ["public-constructor", "protected-constructor", "private-constructor"]
|
|
1088
1107
|
|
|
1089
1108
|
// Getters
|
|
1090
1109
|
"static-get", // = ["public-static-get", "protected-static-get", "private-static-get"]
|
|
1091
1110
|
"instance-get", // = ["public-instance-get", "protected-instance-get", "private-instance-get"]
|
|
1092
|
-
"abstract-get" // = ["public-abstract-get", "protected-abstract-get", "private-abstract-get"]
|
|
1111
|
+
"abstract-get", // = ["public-abstract-get", "protected-abstract-get", "private-abstract-get"]
|
|
1093
1112
|
|
|
1094
1113
|
// Setters
|
|
1095
1114
|
"static-set", // = ["public-static-set", "protected-static-set", "private-static-set"]
|
|
1096
1115
|
"instance-set", // = ["public-instance-set", "protected-instance-set", "private-instance-set"]
|
|
1097
|
-
"abstract-set" // = ["public-abstract-set", "protected-abstract-set", "private-abstract-set"]
|
|
1116
|
+
"abstract-set", // = ["public-abstract-set", "protected-abstract-set", "private-abstract-set"]
|
|
1098
1117
|
|
|
1099
1118
|
// Methods
|
|
1100
1119
|
"static-method", // = ["public-static-method", "protected-static-method", "private-static-method"]
|
|
@@ -1116,15 +1135,18 @@ The third grouping option is to ignore both scope and accessibility.
|
|
|
1116
1135
|
"field", // = ["public-static-field", "protected-static-field", "private-static-field", "public-instance-field", "protected-instance-field", "private-instance-field",
|
|
1117
1136
|
// "public-abstract-field", "protected-abstract-field", private-abstract-field"]
|
|
1118
1137
|
|
|
1138
|
+
// Static initialization
|
|
1139
|
+
// No grouping for static initialization.
|
|
1140
|
+
|
|
1119
1141
|
// Constructors
|
|
1120
1142
|
// Only the accessibility of constructors is configurable.
|
|
1121
1143
|
|
|
1122
1144
|
// Getters
|
|
1123
|
-
"get" // = ["public-static-get", "protected-static-get", "private-static-get", "public-instance-get", "protected-instance-get", "private-instance-get",
|
|
1145
|
+
"get", // = ["public-static-get", "protected-static-get", "private-static-get", "public-instance-get", "protected-instance-get", "private-instance-get",
|
|
1124
1146
|
// "public-abstract-get", "protected-abstract-get", "private-abstract-get"]
|
|
1125
1147
|
|
|
1126
1148
|
// Setters
|
|
1127
|
-
"set" // = ["public-static-set", "protected-static-set", "private-static-set", "public-instance-set", "protected-instance-set", "private-instance-set",
|
|
1149
|
+
"set", // = ["public-static-set", "protected-static-set", "private-static-set", "public-instance-set", "protected-instance-set", "private-instance-set",
|
|
1128
1150
|
// "public-abstract-set", "protected-abstract-set", "private-abstract-set"]
|
|
1129
1151
|
|
|
1130
1152
|
// Methods
|
|
@@ -1145,6 +1167,9 @@ It is also possible to group different member types at the same rank.
|
|
|
1145
1167
|
// Fields
|
|
1146
1168
|
"field",
|
|
1147
1169
|
|
|
1170
|
+
// Static initialization
|
|
1171
|
+
"static-initialization",
|
|
1172
|
+
|
|
1148
1173
|
// Constructors
|
|
1149
1174
|
"constructor",
|
|
1150
1175
|
|
|
@@ -1,6 +1,10 @@
|
|
|
1
|
-
|
|
1
|
+
---
|
|
2
|
+
description: 'Enforce using a particular method signature syntax.'
|
|
3
|
+
---
|
|
2
4
|
|
|
3
|
-
|
|
5
|
+
> 🛑 This file is source code, not the primary documentation location! 🛑
|
|
6
|
+
>
|
|
7
|
+
> See **https://typescript-eslint.io/rules/method-signature-style** for documentation.
|
|
4
8
|
|
|
5
9
|
There are two ways to define an object/interface function property.
|
|
6
10
|
|
|
@@ -1,6 +1,10 @@
|
|
|
1
|
-
|
|
1
|
+
---
|
|
2
|
+
description: 'Enforce naming conventions for everything across a codebase.'
|
|
3
|
+
---
|
|
2
4
|
|
|
3
|
-
|
|
5
|
+
> 🛑 This file is source code, not the primary documentation location! 🛑
|
|
6
|
+
>
|
|
7
|
+
> See **https://typescript-eslint.io/rules/naming-convention** for documentation.
|
|
4
8
|
|
|
5
9
|
Enforcing naming conventions helps keep the codebase consistent, and reduces overhead when thinking about how to name a variable.
|
|
6
10
|
Additionally, a well-designed style guide can help communicate intent, such as by enforcing all private properties begin with an `_`, and all global-level constants are written in `UPPER_CASE`.
|
|
@@ -1,6 +1,10 @@
|
|
|
1
|
-
|
|
1
|
+
---
|
|
2
|
+
description: 'Disallow generic `Array` constructors.'
|
|
3
|
+
---
|
|
2
4
|
|
|
3
|
-
|
|
5
|
+
> 🛑 This file is source code, not the primary documentation location! 🛑
|
|
6
|
+
>
|
|
7
|
+
> See **https://typescript-eslint.io/rules/no-array-constructor** for documentation.
|
|
4
8
|
|
|
5
9
|
## Rule Details
|
|
6
10
|
|
|
@@ -29,23 +33,3 @@ new Array<Foo>(x, y, z);
|
|
|
29
33
|
Array(500);
|
|
30
34
|
new Array(someOtherArray.length);
|
|
31
35
|
```
|
|
32
|
-
|
|
33
|
-
## How to Use
|
|
34
|
-
|
|
35
|
-
```jsonc
|
|
36
|
-
{
|
|
37
|
-
// note you must disable the base rule as it can report incorrect errors
|
|
38
|
-
"no-array-constructor": "off",
|
|
39
|
-
"@typescript-eslint/no-array-constructor": ["error"]
|
|
40
|
-
}
|
|
41
|
-
```
|
|
42
|
-
|
|
43
|
-
## Options
|
|
44
|
-
|
|
45
|
-
See [`eslint/no-array-constructor` options](https://eslint.org/docs/rules/no-array-constructor#options).
|
|
46
|
-
|
|
47
|
-
<sup>
|
|
48
|
-
|
|
49
|
-
Taken with ❤️ [from ESLint core](https://github.com/eslint/eslint/blob/main/docs/rules/no-array-constructor.md)
|
|
50
|
-
|
|
51
|
-
</sup>
|
|
@@ -1,4 +1,10 @@
|
|
|
1
|
-
|
|
1
|
+
---
|
|
2
|
+
description: 'Require `.toString()` to only be called on objects which provide useful information when stringified.'
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
> 🛑 This file is source code, not the primary documentation location! 🛑
|
|
6
|
+
>
|
|
7
|
+
> See **https://typescript-eslint.io/rules/no-base-to-string** for documentation.
|
|
2
8
|
|
|
3
9
|
Requires `.toString()` to only be called on objects which provide useful information when stringified.
|
|
4
10
|
|
|
@@ -58,16 +64,6 @@ const literalWithToString = {
|
|
|
58
64
|
|
|
59
65
|
## Options
|
|
60
66
|
|
|
61
|
-
```ts
|
|
62
|
-
type Options = {
|
|
63
|
-
ignoredTypeNames?: string[];
|
|
64
|
-
};
|
|
65
|
-
|
|
66
|
-
const defaultOptions: Options = {
|
|
67
|
-
ignoredTypeNames: ['RegExp'],
|
|
68
|
-
};
|
|
69
|
-
```
|
|
70
|
-
|
|
71
67
|
### `ignoredTypeNames`
|
|
72
68
|
|
|
73
69
|
A string array of type names to ignore, this is useful for types missing `toString()` (but actually has `toString()`).
|
package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-confusing-non-null-assertion.md
CHANGED
|
@@ -1,6 +1,10 @@
|
|
|
1
|
-
|
|
1
|
+
---
|
|
2
|
+
description: 'Disallow non-null assertion in locations that may be confusing.'
|
|
3
|
+
---
|
|
2
4
|
|
|
3
|
-
|
|
5
|
+
> 🛑 This file is source code, not the primary documentation location! 🛑
|
|
6
|
+
>
|
|
7
|
+
> See **https://typescript-eslint.io/rules/no-confusing-non-null-assertion** for documentation.
|
|
4
8
|
|
|
5
9
|
## Rule Details
|
|
6
10
|
|
|
@@ -41,19 +45,6 @@ const isEqualsBar = foo.bar == 'hello';
|
|
|
41
45
|
const isEqualsNum = (1 + foo.num!) == 2;
|
|
42
46
|
```
|
|
43
47
|
|
|
44
|
-
## Options
|
|
45
|
-
|
|
46
|
-
```jsonc
|
|
47
|
-
// .eslintrc.json
|
|
48
|
-
{
|
|
49
|
-
"rules": {
|
|
50
|
-
"@typescript-eslint/no-confusing-non-null-assertion": "warn"
|
|
51
|
-
}
|
|
52
|
-
}
|
|
53
|
-
```
|
|
54
|
-
|
|
55
|
-
This rule is not configurable.
|
|
56
|
-
|
|
57
48
|
## When Not To Use It
|
|
58
49
|
|
|
59
50
|
If you don't care about this confusion, then you will not need this rule.
|
package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-confusing-void-expression.md
CHANGED
|
@@ -1,6 +1,10 @@
|
|
|
1
|
-
|
|
1
|
+
---
|
|
2
|
+
description: 'Require expressions of type void to appear in statement position.'
|
|
3
|
+
---
|
|
2
4
|
|
|
3
|
-
|
|
5
|
+
> 🛑 This file is source code, not the primary documentation location! 🛑
|
|
6
|
+
>
|
|
7
|
+
> See **https://typescript-eslint.io/rules/no-confusing-void-expression** for documentation.
|
|
4
8
|
|
|
5
9
|
Returning the results of an expression whose type is void can be misleading.
|
|
6
10
|
Attempting to do so is likely a symptom of expecting a different return type from a function.
|
|
@@ -66,33 +70,8 @@ cond ? console.log('true') : console.error('false');
|
|
|
66
70
|
|
|
67
71
|
## Options
|
|
68
72
|
|
|
69
|
-
An object option can be specified. Each boolean flag makes the rule less strict.
|
|
70
|
-
|
|
71
|
-
```ts
|
|
72
|
-
type Options = {
|
|
73
|
-
ignoreArrowShorthand?: boolean;
|
|
74
|
-
ignoreVoidOperator?: boolean;
|
|
75
|
-
};
|
|
76
|
-
|
|
77
|
-
const defaults: Options = {
|
|
78
|
-
ignoreArrowShorthand: false,
|
|
79
|
-
ignoreVoidOperator: false,
|
|
80
|
-
};
|
|
81
|
-
```
|
|
82
|
-
|
|
83
73
|
### `ignoreArrowShorthand`
|
|
84
74
|
|
|
85
|
-
`false` by default.
|
|
86
|
-
|
|
87
|
-
```json
|
|
88
|
-
{
|
|
89
|
-
"@typescript-eslint/no-confusing-void-expression": [
|
|
90
|
-
"error",
|
|
91
|
-
{ "ignoreArrowShorthand": true }
|
|
92
|
-
]
|
|
93
|
-
}
|
|
94
|
-
```
|
|
95
|
-
|
|
96
75
|
It might be undesirable to wrap every arrow function shorthand expression with braces.
|
|
97
76
|
Especially when using Prettier formatter, which spreads such code across 3 lines instead of 1.
|
|
98
77
|
|
|
@@ -104,17 +83,6 @@ promise.then(value => window.postMessage(value));
|
|
|
104
83
|
|
|
105
84
|
### `ignoreVoidOperator`
|
|
106
85
|
|
|
107
|
-
`false` by default.
|
|
108
|
-
|
|
109
|
-
```json
|
|
110
|
-
{
|
|
111
|
-
"@typescript-eslint/no-confusing-void-expression": [
|
|
112
|
-
"error",
|
|
113
|
-
{ "ignoreVoidOperator": true }
|
|
114
|
-
]
|
|
115
|
-
}
|
|
116
|
-
```
|
|
117
|
-
|
|
118
86
|
It might be preferable to only use some distinct syntax
|
|
119
87
|
to explicitly mark the confusing but valid usage of void expressions.
|
|
120
88
|
This option allows void expressions which are explicitly wrapped in the `void` operator.
|
|
@@ -1,28 +1,12 @@
|
|
|
1
|
-
|
|
1
|
+
---
|
|
2
|
+
description: 'Disallow duplicate class members.'
|
|
3
|
+
---
|
|
2
4
|
|
|
3
|
-
|
|
5
|
+
> 🛑 This file is source code, not the primary documentation location! 🛑
|
|
6
|
+
>
|
|
7
|
+
> See **https://typescript-eslint.io/rules/no-dupe-class-members** for documentation.
|
|
4
8
|
|
|
5
9
|
## Rule Details
|
|
6
10
|
|
|
7
11
|
This rule extends the base [`eslint/no-dupe-class-members`](https://eslint.org/docs/rules/no-dupe-class-members) rule.
|
|
8
12
|
It adds support for TypeScript's method overload definitions.
|
|
9
|
-
|
|
10
|
-
## How to Use
|
|
11
|
-
|
|
12
|
-
```jsonc
|
|
13
|
-
{
|
|
14
|
-
// note you must disable the base rule as it can report incorrect errors
|
|
15
|
-
"no-dupe-class-members": "off",
|
|
16
|
-
"@typescript-eslint/no-dupe-class-members": ["error"]
|
|
17
|
-
}
|
|
18
|
-
```
|
|
19
|
-
|
|
20
|
-
## Options
|
|
21
|
-
|
|
22
|
-
See [`eslint/no-dupe-class-members` options](https://eslint.org/docs/rules/no-dupe-class-members#options).
|
|
23
|
-
|
|
24
|
-
<sup>
|
|
25
|
-
|
|
26
|
-
Taken with ❤️ [from ESLint core](https://github.com/eslint/eslint/blob/main/docs/rules/no-dupe-class-members.md)
|
|
27
|
-
|
|
28
|
-
</sup>
|
package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-duplicate-enum-values.md
CHANGED
|
@@ -1,6 +1,10 @@
|
|
|
1
|
-
|
|
1
|
+
---
|
|
2
|
+
description: 'Disallow duplicate enum member values.'
|
|
3
|
+
---
|
|
2
4
|
|
|
3
|
-
|
|
5
|
+
> 🛑 This file is source code, not the primary documentation location! 🛑
|
|
6
|
+
>
|
|
7
|
+
> See **https://typescript-eslint.io/rules/no-duplicate-enum-values** for documentation.
|
|
4
8
|
|
|
5
9
|
Although TypeScript supports duplicate enum member values, people usually expect members to have unique values within the same enum. Duplicate values can lead to bugs that are hard to track down.
|
|
6
10
|
|
|
@@ -21,8 +25,8 @@ enum E {
|
|
|
21
25
|
|
|
22
26
|
```ts
|
|
23
27
|
enum E {
|
|
24
|
-
A = 'A'
|
|
25
|
-
B = 'A'
|
|
28
|
+
A = 'A',
|
|
29
|
+
B = 'A',
|
|
26
30
|
}
|
|
27
31
|
```
|
|
28
32
|
|
|
@@ -37,20 +41,7 @@ enum E {
|
|
|
37
41
|
|
|
38
42
|
```ts
|
|
39
43
|
enum E {
|
|
40
|
-
A = 'A'
|
|
41
|
-
B = 'B'
|
|
44
|
+
A = 'A',
|
|
45
|
+
B = 'B',
|
|
42
46
|
}
|
|
43
47
|
```
|
|
44
|
-
|
|
45
|
-
## Options
|
|
46
|
-
|
|
47
|
-
```jsonc
|
|
48
|
-
// .eslintrc.json
|
|
49
|
-
{
|
|
50
|
-
"rules": {
|
|
51
|
-
"@typescript-eslint/no-duplicate-enum-values": "warn"
|
|
52
|
-
}
|
|
53
|
-
}
|
|
54
|
-
```
|
|
55
|
-
|
|
56
|
-
This rule is not configurable.
|
|
@@ -1,32 +1,12 @@
|
|
|
1
|
-
|
|
1
|
+
---
|
|
2
|
+
description: 'Disallow duplicate imports.'
|
|
3
|
+
---
|
|
2
4
|
|
|
3
|
-
|
|
5
|
+
> 🛑 This file is source code, not the primary documentation location! 🛑
|
|
6
|
+
>
|
|
7
|
+
> See **https://typescript-eslint.io/rules/no-duplicate-imports** for documentation.
|
|
4
8
|
|
|
5
|
-
|
|
9
|
+
:::danger Deprecated
|
|
6
10
|
|
|
7
11
|
This rule has been deprecated in favour of the [`import/no-duplicates`](https://github.com/import-js/eslint-plugin-import/blob/HEAD/docs/rules/no-duplicates.md) rule.
|
|
8
|
-
|
|
9
|
-
## Rule Details
|
|
10
|
-
|
|
11
|
-
This rule extends the base [`eslint/no-duplicate-imports`](https://eslint.org/docs/rules/no-duplicate-imports) rule.
|
|
12
|
-
This version adds support for type-only import and export.
|
|
13
|
-
|
|
14
|
-
## How to Use
|
|
15
|
-
|
|
16
|
-
```jsonc
|
|
17
|
-
{
|
|
18
|
-
// note you must disable the base rule as it can report incorrect errors
|
|
19
|
-
"no-duplicate-imports": "off",
|
|
20
|
-
"@typescript-eslint/no-duplicate-imports": ["error"]
|
|
21
|
-
}
|
|
22
|
-
```
|
|
23
|
-
|
|
24
|
-
## Options
|
|
25
|
-
|
|
26
|
-
See [`eslint/no-duplicate-imports` options](https://eslint.org/docs/rules/no-duplicate-imports#options).
|
|
27
|
-
|
|
28
|
-
<sup>
|
|
29
|
-
|
|
30
|
-
Taken with ❤️ [from ESLint core](https://github.com/eslint/eslint/blob/main/docs/rules/no-duplicate-imports.md)
|
|
31
|
-
|
|
32
|
-
</sup>
|
|
12
|
+
:::
|
|
@@ -1,6 +1,10 @@
|
|
|
1
|
-
|
|
1
|
+
---
|
|
2
|
+
description: 'Disallow using the `delete` operator on computed key expressions.'
|
|
3
|
+
---
|
|
2
4
|
|
|
3
|
-
|
|
5
|
+
> 🛑 This file is source code, not the primary documentation location! 🛑
|
|
6
|
+
>
|
|
7
|
+
> See **https://typescript-eslint.io/rules/no-dynamic-delete** for documentation.
|
|
4
8
|
|
|
5
9
|
Deleting dynamically computed keys can be dangerous and in some cases not well optimized.
|
|
6
10
|
|
|
@@ -40,19 +44,6 @@ delete container[7];
|
|
|
40
44
|
delete container['-Infinity'];
|
|
41
45
|
```
|
|
42
46
|
|
|
43
|
-
## Options
|
|
44
|
-
|
|
45
|
-
```jsonc
|
|
46
|
-
// .eslintrc.json
|
|
47
|
-
{
|
|
48
|
-
"rules": {
|
|
49
|
-
"@typescript-eslint/no-dynamic-delete": "warn"
|
|
50
|
-
}
|
|
51
|
-
}
|
|
52
|
-
```
|
|
53
|
-
|
|
54
|
-
This rule is not configurable.
|
|
55
|
-
|
|
56
47
|
## When Not To Use It
|
|
57
48
|
|
|
58
49
|
When you know your keys are safe to delete, this rule can be unnecessary.
|
|
@@ -1,6 +1,10 @@
|
|
|
1
|
-
|
|
1
|
+
---
|
|
2
|
+
description: 'Disallow empty functions.'
|
|
3
|
+
---
|
|
2
4
|
|
|
3
|
-
|
|
5
|
+
> 🛑 This file is source code, not the primary documentation location! 🛑
|
|
6
|
+
>
|
|
7
|
+
> See **https://typescript-eslint.io/rules/no-empty-function** for documentation.
|
|
4
8
|
|
|
5
9
|
## Rule Details
|
|
6
10
|
|
|
@@ -9,19 +13,8 @@ It adds support for handling TypeScript specific code that would otherwise trigg
|
|
|
9
13
|
|
|
10
14
|
One example of valid TypeScript specific code that would otherwise trigger the `no-empty-function` rule is the use of [parameter properties](https://www.typescriptlang.org/docs/handbook/classes.html#parameter-properties) in constructor functions.
|
|
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-empty-function": "off",
|
|
18
|
-
"@typescript-eslint/no-empty-function": ["error"]
|
|
19
|
-
}
|
|
20
|
-
```
|
|
21
|
-
|
|
22
16
|
## Options
|
|
23
17
|
|
|
24
|
-
See [`eslint/no-empty-function` options](https://eslint.org/docs/rules/no-empty-function#options).
|
|
25
18
|
This rule adds the following options:
|
|
26
19
|
|
|
27
20
|
```ts
|
|
@@ -93,19 +86,3 @@ class Foo extends Base {
|
|
|
93
86
|
protected override greet(): void {}
|
|
94
87
|
}
|
|
95
88
|
```
|
|
96
|
-
|
|
97
|
-
## How to Use
|
|
98
|
-
|
|
99
|
-
```jsonc
|
|
100
|
-
{
|
|
101
|
-
// note you must disable the base rule as it can report incorrect errors
|
|
102
|
-
"no-empty-function": "off",
|
|
103
|
-
"@typescript-eslint/no-empty-function": ["error"]
|
|
104
|
-
}
|
|
105
|
-
```
|
|
106
|
-
|
|
107
|
-
<sup>
|
|
108
|
-
|
|
109
|
-
Taken with ❤️ [from ESLint core](https://github.com/eslint/eslint/blob/main/docs/rules/no-empty-function.md)
|
|
110
|
-
|
|
111
|
-
</sup>
|
|
@@ -1,6 +1,10 @@
|
|
|
1
|
-
|
|
1
|
+
---
|
|
2
|
+
description: 'Disallow the declaration of empty interfaces.'
|
|
3
|
+
---
|
|
2
4
|
|
|
3
|
-
|
|
5
|
+
> 🛑 This file is source code, not the primary documentation location! 🛑
|
|
6
|
+
>
|
|
7
|
+
> See **https://typescript-eslint.io/rules/no-empty-interface** for documentation.
|
|
4
8
|
|
|
5
9
|
An empty interface is equivalent to its supertype. If the interface does not implement a supertype, then
|
|
6
10
|
the interface is equivalent to an empty object (`{}`). In both cases it can be omitted.
|
|
@@ -1,6 +1,10 @@
|
|
|
1
|
-
|
|
1
|
+
---
|
|
2
|
+
description: 'Disallow the `any` type.'
|
|
3
|
+
---
|
|
2
4
|
|
|
3
|
-
|
|
5
|
+
> 🛑 This file is source code, not the primary documentation location! 🛑
|
|
6
|
+
>
|
|
7
|
+
> See **https://typescript-eslint.io/rules/no-explicit-any** for documentation.
|
|
4
8
|
|
|
5
9
|
Using the `any` type defeats the purpose of using TypeScript.
|
|
6
10
|
When `any` is used, all compiler type checks around that value are ignored.
|
|
@@ -93,22 +97,6 @@ function greet(param: Array<string>): Array<string> {}
|
|
|
93
97
|
|
|
94
98
|
## Options
|
|
95
99
|
|
|
96
|
-
The rule accepts an options object with the following properties:
|
|
97
|
-
|
|
98
|
-
```ts
|
|
99
|
-
type Options = {
|
|
100
|
-
// if true, auto-fixing will be made available in which the "any" type is converted to an "unknown" type
|
|
101
|
-
fixToUnknown: boolean;
|
|
102
|
-
// specify if arrays from the rest operator are considered okay
|
|
103
|
-
ignoreRestArgs: boolean;
|
|
104
|
-
};
|
|
105
|
-
|
|
106
|
-
const defaults = {
|
|
107
|
-
fixToUnknown: false,
|
|
108
|
-
ignoreRestArgs: false,
|
|
109
|
-
};
|
|
110
|
-
```
|
|
111
|
-
|
|
112
100
|
### `ignoreRestArgs`
|
|
113
101
|
|
|
114
102
|
A boolean to specify if arrays from the rest operator are considered okay. `false` by default.
|