xo 0.52.4 → 0.53.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cli.js +1 -0
- package/index.js +6 -11
- package/node_modules/@types/semver/LICENSE +21 -0
- package/node_modules/@types/semver/README.md +16 -0
- package/node_modules/@types/semver/classes/comparator.d.ts +17 -0
- package/node_modules/@types/semver/classes/range.d.ts +21 -0
- package/node_modules/@types/semver/classes/semver.d.ts +62 -0
- package/node_modules/@types/semver/functions/clean.d.ts +8 -0
- package/node_modules/@types/semver/functions/cmp.d.ts +16 -0
- package/node_modules/@types/semver/functions/coerce.d.ts +12 -0
- package/node_modules/@types/semver/functions/compare-build.d.ts +21 -0
- package/node_modules/@types/semver/functions/compare-loose.d.ts +5 -0
- package/node_modules/@types/semver/functions/compare.d.ts +20 -0
- package/node_modules/@types/semver/functions/diff.d.ts +9 -0
- package/node_modules/@types/semver/functions/eq.d.ts +9 -0
- package/node_modules/@types/semver/functions/gt.d.ts +9 -0
- package/node_modules/@types/semver/functions/gte.d.ts +9 -0
- package/node_modules/@types/semver/functions/inc.d.ts +15 -0
- package/node_modules/@types/semver/functions/lt.d.ts +9 -0
- package/node_modules/@types/semver/functions/lte.d.ts +8 -0
- package/node_modules/@types/semver/functions/major.d.ts +9 -0
- package/node_modules/@types/semver/functions/minor.d.ts +9 -0
- package/node_modules/@types/semver/functions/neq.d.ts +9 -0
- package/node_modules/@types/semver/functions/parse.d.ts +12 -0
- package/node_modules/@types/semver/functions/patch.d.ts +9 -0
- package/node_modules/@types/semver/functions/prerelease.d.ts +12 -0
- package/node_modules/@types/semver/functions/rcompare.d.ts +15 -0
- package/node_modules/@types/semver/functions/rsort.d.ts +9 -0
- package/node_modules/@types/semver/functions/satisfies.d.ts +14 -0
- package/node_modules/@types/semver/functions/sort.d.ts +9 -0
- package/node_modules/@types/semver/functions/valid.d.ts +11 -0
- package/node_modules/@types/semver/index.d.ts +136 -0
- package/node_modules/@types/semver/internals/identifiers.d.ts +13 -0
- package/node_modules/@types/semver/package.json +50 -0
- package/node_modules/@types/semver/preload.d.ts +2 -0
- package/node_modules/@types/semver/ranges/gtr.d.ts +14 -0
- package/node_modules/@types/semver/ranges/intersects.d.ts +13 -0
- package/node_modules/@types/semver/ranges/ltr.d.ts +14 -0
- package/node_modules/@types/semver/ranges/max-satisfying.d.ts +14 -0
- package/node_modules/@types/semver/ranges/min-satisfying.d.ts +14 -0
- package/node_modules/@types/semver/ranges/min-version.d.ts +10 -0
- package/node_modules/@types/semver/ranges/outside.d.ts +15 -0
- package/node_modules/@types/semver/ranges/simplify.d.ts +14 -0
- package/node_modules/@types/semver/ranges/subset.d.ts +9 -0
- package/node_modules/@types/semver/ranges/to-comparators.d.ts +9 -0
- package/node_modules/@types/semver/ranges/valid.d.ts +12 -0
- package/node_modules/@typescript-eslint/eslint-plugin/dist/configs/all.js +2 -1
- package/node_modules/@typescript-eslint/eslint-plugin/dist/configs/all.js.map +1 -1
- package/node_modules/@typescript-eslint/eslint-plugin/dist/configs/strict.js +1 -0
- package/node_modules/@typescript-eslint/eslint-plugin/dist/configs/strict.js.map +1 -1
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/adjacent-overload-signatures.js +1 -1
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/adjacent-overload-signatures.js.map +1 -1
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/array-type.js +1 -1
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/array-type.js.map +1 -1
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/ban-ts-comment.js +1 -1
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/ban-ts-comment.js.map +1 -1
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/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-indexed-object-style.js +1 -1
- 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-imports.js +99 -24
- 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/index.js +4 -0
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/index.js.map +1 -1
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/member-delimiter-style.js +2 -2
- 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 +29 -10
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/member-ordering.js.map +1 -1
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/naming-convention-utils/enums.js +4 -0
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/naming-convention-utils/enums.js.map +1 -1
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/naming-convention-utils/schema.js +19 -2
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/naming-convention-utils/schema.js.map +1 -1
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/naming-convention.js +29 -0
- 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 +1 -1
- 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-extra-non-null-assertion.js +1 -1
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-extra-non-null-assertion.js.map +1 -1
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-extra-parens.js +14 -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-invalid-void-type.js +11 -5
- 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-misused-promises.js +51 -11
- 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 +2 -2
- 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-shadow.js +1 -2
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-shadow.js.map +1 -1
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-unnecessary-condition.js +4 -3
- 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-unsafe-declaration-merging.js +78 -0
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-unsafe-declaration-merging.js.map +1 -0
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-nullish-coalescing.js +0 -3
- 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 +167 -68
- 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 -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/restrict-plus-operands.js +1 -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/sort-type-constituents.js +245 -0
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/sort-type-constituents.js.map +1 -0
- 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/docs/rules/TEMPLATE.md +1 -1
- package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/adjacent-overload-signatures.md +5 -5
- package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/array-type.md +4 -6
- package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/await-thenable.md +5 -4
- package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/ban-ts-comment.md +3 -4
- package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/ban-tslint-comment.md +2 -2
- package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/ban-types.md +2 -2
- package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/brace-style.md +1 -1
- package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/class-literal-property-style.md +4 -4
- package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/comma-dangle.md +1 -1
- package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/comma-spacing.md +1 -1
- package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/consistent-generic-constructors.md +3 -3
- package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/consistent-indexed-object-style.md +1 -3
- package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/consistent-type-assertions.md +12 -5
- package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/consistent-type-definitions.md +4 -1
- package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/consistent-type-exports.md +7 -13
- package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/consistent-type-imports.md +47 -6
- package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/default-param-last.md +1 -1
- package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/dot-notation.md +1 -1
- package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/explicit-function-return-type.md +7 -6
- package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/explicit-member-accessibility.md +10 -6
- package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/explicit-module-boundary-types.md +3 -3
- package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/func-call-spacing.md +1 -1
- package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/indent.md +1 -1
- package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/init-declarations.md +1 -1
- package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/keyword-spacing.md +1 -1
- package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/lines-between-class-members.md +1 -1
- package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/member-delimiter-style.md +7 -60
- package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/member-ordering.md +19 -6
- package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/method-signature-style.md +6 -6
- package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/naming-convention.md +29 -30
- package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-array-constructor.md +1 -1
- package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-base-to-string.md +12 -11
- package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-confusing-non-null-assertion.md +4 -2
- package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-confusing-void-expression.md +4 -5
- package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-dupe-class-members.md +1 -1
- package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-duplicate-enum-values.md +5 -2
- package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-dynamic-delete.md +4 -4
- package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-empty-function.md +1 -1
- package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-empty-interface.md +5 -5
- package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-explicit-any.md +13 -8
- package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-extra-non-null-assertion.md +4 -3
- package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-extra-parens.md +1 -1
- package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-extra-semi.md +1 -1
- package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-extraneous-class.md +4 -6
- package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-floating-promises.md +2 -4
- package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-for-in-array.md +26 -18
- package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-implicit-any-catch.md +1 -3
- package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-implied-eval.md +1 -3
- package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-inferrable-types.md +12 -43
- package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-invalid-this.md +1 -1
- package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-invalid-void-type.md +6 -13
- package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-loop-func.md +1 -1
- package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-loss-of-precision.md +1 -1
- package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-magic-numbers.md +1 -1
- package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-meaningless-void-operator.md +8 -21
- package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-misused-new.md +13 -6
- package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-misused-promises.md +53 -91
- package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-namespace.md +6 -7
- package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-non-null-asserted-nullish-coalescing.md +3 -13
- package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-non-null-asserted-optional-chain.md +4 -27
- package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-non-null-assertion.md +14 -13
- package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-parameter-properties.md +1 -1
- package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-redeclare.md +1 -1
- package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-redundant-type-constituents.md +1 -6
- package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-require-imports.md +12 -15
- package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-restricted-imports.md +1 -1
- package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-shadow.md +1 -1
- package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-this-alias.md +9 -15
- package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-throw-literal.md +1 -3
- package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-type-alias.md +1 -1
- package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-unnecessary-boolean-literal-compare.md +15 -14
- package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-unnecessary-condition.md +3 -4
- package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-unnecessary-qualifier.md +12 -46
- package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-unnecessary-type-arguments.md +22 -8
- package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-unnecessary-type-assertion.md +4 -6
- package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-unnecessary-type-constraint.md +6 -20
- package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-unsafe-argument.md +10 -7
- package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-unsafe-assignment.md +9 -6
- package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-unsafe-call.md +6 -5
- package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-unsafe-declaration-merging.md +54 -0
- package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-unsafe-member-access.md +5 -4
- package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-unsafe-return.md +9 -6
- package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-unused-expressions.md +1 -1
- package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-unused-vars.md +1 -1
- package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-use-before-define.md +1 -1
- package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-useless-constructor.md +1 -1
- package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-useless-empty-export.md +4 -4
- package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-var-requires.md +6 -4
- package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/non-nullable-type-assertion-style.md +7 -3
- package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/object-curly-spacing.md +1 -1
- package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/padding-line-between-statements.md +1 -1
- package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/parameter-properties.md +3 -6
- package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/prefer-as-const.md +7 -3
- package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/prefer-enum-initializers.md +5 -23
- package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/prefer-for-of.md +15 -16
- package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/prefer-function-type.md +22 -22
- package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/prefer-includes.md +28 -30
- package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/prefer-literal-enum-member.md +12 -13
- package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/prefer-namespace-keyword.md +27 -4
- package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/prefer-nullish-coalescing.md +6 -54
- package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/prefer-optional-chain.md +21 -49
- package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/prefer-readonly-parameter-types.md +1 -3
- package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/prefer-readonly.md +3 -5
- package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/prefer-reduce-type-parameter.md +6 -8
- package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/prefer-regexp-exec.md +6 -11
- package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/prefer-return-this-type.md +10 -25
- package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/prefer-string-starts-ends-with.md +10 -6
- package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/prefer-ts-expect-error.md +5 -11
- package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/promise-function-async.md +1 -1
- package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/quotes.md +1 -1
- package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/require-array-sort-compare.md +5 -14
- package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/require-await.md +1 -1
- package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/restrict-plus-operands.md +18 -4
- package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/restrict-template-expressions.md +9 -2
- package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/return-await.md +1 -1
- package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/semi.md +1 -1
- package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/sort-type-constituents.md +101 -0
- package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/sort-type-union-intersection-members.md +8 -16
- package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/space-before-blocks.md +1 -1
- package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/space-before-function-paren.md +1 -1
- package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/strict-boolean-expressions.md +0 -2
- package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/switch-exhaustiveness-check.md +15 -24
- package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/triple-slash-reference.md +4 -2
- package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/type-annotation-spacing.md +1 -1
- package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/typedef.md +5 -7
- package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/unbound-method.md +7 -4
- package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/unified-signatures.md +5 -3
- package/node_modules/@typescript-eslint/eslint-plugin/package.json +7 -5
- package/node_modules/@typescript-eslint/parser/README.md +2 -0
- package/node_modules/@typescript-eslint/parser/package.json +5 -5
- package/node_modules/@typescript-eslint/scope-manager/package.json +5 -5
- package/node_modules/@typescript-eslint/type-utils/dist/isTypeReadonly.d.ts.map +1 -1
- package/node_modules/@typescript-eslint/type-utils/dist/isTypeReadonly.js +3 -0
- package/node_modules/@typescript-eslint/type-utils/dist/isTypeReadonly.js.map +1 -1
- package/node_modules/@typescript-eslint/type-utils/package.json +5 -5
- package/node_modules/@typescript-eslint/types/_ts3.4/dist/generated/ast-spec.d.ts +3 -3
- package/node_modules/@typescript-eslint/types/dist/generated/ast-spec.d.ts +3 -3
- package/node_modules/@typescript-eslint/types/dist/generated/ast-spec.d.ts.map +1 -1
- package/node_modules/@typescript-eslint/types/package.json +2 -2
- package/node_modules/@typescript-eslint/typescript-estree/_ts3.4/dist/ast-converter.d.ts +2 -2
- package/node_modules/@typescript-eslint/typescript-estree/_ts3.4/dist/create-program/createDefaultProgram.d.ts +3 -6
- package/node_modules/@typescript-eslint/typescript-estree/_ts3.4/dist/create-program/createIsolatedProgram.d.ts +2 -2
- package/node_modules/@typescript-eslint/typescript-estree/_ts3.4/dist/create-program/createProjectProgram.d.ts +4 -6
- package/node_modules/@typescript-eslint/typescript-estree/_ts3.4/dist/create-program/createSourceFile.d.ts +2 -2
- package/node_modules/@typescript-eslint/typescript-estree/_ts3.4/dist/create-program/createWatchProgram.d.ts +4 -7
- package/node_modules/@typescript-eslint/typescript-estree/_ts3.4/dist/create-program/shared.d.ts +5 -4
- package/node_modules/@typescript-eslint/typescript-estree/_ts3.4/dist/create-program/useProvidedPrograms.d.ts +2 -2
- package/node_modules/@typescript-eslint/typescript-estree/_ts3.4/dist/parseSettings/createParseSettings.d.ts +4 -0
- package/node_modules/@typescript-eslint/typescript-estree/_ts3.4/dist/parseSettings/index.d.ts +102 -0
- package/node_modules/@typescript-eslint/typescript-estree/_ts3.4/dist/parseSettings/inferSingleRun.d.ts +15 -0
- package/node_modules/@typescript-eslint/typescript-estree/_ts3.4/dist/parseSettings/warnAboutTSVersion.d.ts +3 -0
- package/node_modules/@typescript-eslint/typescript-estree/_ts3.4/dist/parser-options.d.ts +0 -26
- package/node_modules/@typescript-eslint/typescript-estree/dist/ast-converter.d.ts +2 -2
- package/node_modules/@typescript-eslint/typescript-estree/dist/ast-converter.d.ts.map +1 -1
- package/node_modules/@typescript-eslint/typescript-estree/dist/ast-converter.js +8 -8
- package/node_modules/@typescript-eslint/typescript-estree/dist/ast-converter.js.map +1 -1
- package/node_modules/@typescript-eslint/typescript-estree/dist/create-program/createDefaultProgram.d.ts +3 -6
- package/node_modules/@typescript-eslint/typescript-estree/dist/create-program/createDefaultProgram.d.ts.map +1 -1
- package/node_modules/@typescript-eslint/typescript-estree/dist/create-program/createDefaultProgram.js +13 -15
- package/node_modules/@typescript-eslint/typescript-estree/dist/create-program/createDefaultProgram.js.map +1 -1
- package/node_modules/@typescript-eslint/typescript-estree/dist/create-program/createIsolatedProgram.d.ts +2 -2
- 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 +7 -7
- 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 +4 -6
- 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 +51 -38
- 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.d.ts +2 -2
- package/node_modules/@typescript-eslint/typescript-estree/dist/create-program/createSourceFile.d.ts.map +1 -1
- package/node_modules/@typescript-eslint/typescript-estree/dist/create-program/createSourceFile.js +4 -4
- 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/createWatchProgram.d.ts +4 -7
- package/node_modules/@typescript-eslint/typescript-estree/dist/create-program/createWatchProgram.d.ts.map +1 -1
- package/node_modules/@typescript-eslint/typescript-estree/dist/create-program/createWatchProgram.js +21 -22
- package/node_modules/@typescript-eslint/typescript-estree/dist/create-program/createWatchProgram.js.map +1 -1
- package/node_modules/@typescript-eslint/typescript-estree/dist/create-program/shared.d.ts +5 -4
- 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 +7 -7
- package/node_modules/@typescript-eslint/typescript-estree/dist/create-program/shared.js.map +1 -1
- package/node_modules/@typescript-eslint/typescript-estree/dist/create-program/useProvidedPrograms.d.ts +2 -2
- package/node_modules/@typescript-eslint/typescript-estree/dist/create-program/useProvidedPrograms.d.ts.map +1 -1
- package/node_modules/@typescript-eslint/typescript-estree/dist/create-program/useProvidedPrograms.js +4 -4
- package/node_modules/@typescript-eslint/typescript-estree/dist/create-program/useProvidedPrograms.js.map +1 -1
- package/node_modules/@typescript-eslint/typescript-estree/dist/parseSettings/createParseSettings.d.ts +4 -0
- package/node_modules/@typescript-eslint/typescript-estree/dist/parseSettings/createParseSettings.d.ts.map +1 -0
- package/node_modules/@typescript-eslint/typescript-estree/dist/parseSettings/createParseSettings.js +145 -0
- package/node_modules/@typescript-eslint/typescript-estree/dist/parseSettings/createParseSettings.js.map +1 -0
- package/node_modules/@typescript-eslint/typescript-estree/dist/parseSettings/index.d.ts +102 -0
- package/node_modules/@typescript-eslint/typescript-estree/dist/parseSettings/index.d.ts.map +1 -0
- package/node_modules/@typescript-eslint/typescript-estree/dist/parseSettings/index.js +3 -0
- package/node_modules/@typescript-eslint/typescript-estree/dist/parseSettings/index.js.map +1 -0
- package/node_modules/@typescript-eslint/typescript-estree/dist/parseSettings/inferSingleRun.d.ts +15 -0
- package/node_modules/@typescript-eslint/typescript-estree/dist/parseSettings/inferSingleRun.d.ts.map +1 -0
- package/node_modules/@typescript-eslint/typescript-estree/dist/parseSettings/inferSingleRun.js +53 -0
- package/node_modules/@typescript-eslint/typescript-estree/dist/parseSettings/inferSingleRun.js.map +1 -0
- package/node_modules/@typescript-eslint/typescript-estree/dist/parseSettings/warnAboutTSVersion.d.ts +3 -0
- package/node_modules/@typescript-eslint/typescript-estree/dist/parseSettings/warnAboutTSVersion.d.ts.map +1 -0
- package/node_modules/@typescript-eslint/typescript-estree/dist/parseSettings/warnAboutTSVersion.js +68 -0
- package/node_modules/@typescript-eslint/typescript-estree/dist/parseSettings/warnAboutTSVersion.js.map +1 -0
- package/node_modules/@typescript-eslint/typescript-estree/dist/parser-options.d.ts +0 -26
- package/node_modules/@typescript-eslint/typescript-estree/dist/parser-options.d.ts.map +1 -1
- package/node_modules/@typescript-eslint/typescript-estree/dist/parser.d.ts.map +1 -1
- package/node_modules/@typescript-eslint/typescript-estree/dist/parser.js +32 -388
- package/node_modules/@typescript-eslint/typescript-estree/dist/parser.js.map +1 -1
- package/node_modules/@typescript-eslint/typescript-estree/package.json +5 -5
- package/node_modules/@typescript-eslint/utils/_ts3.4/dist/eslint-utils/batchedSingleLineTests.d.ts +1 -1
- package/node_modules/@typescript-eslint/utils/_ts3.4/dist/eslint-utils/index.d.ts +1 -1
- package/node_modules/@typescript-eslint/utils/_ts3.4/dist/eslint-utils/rule-tester/RuleTester.d.ts +48 -0
- package/node_modules/@typescript-eslint/utils/_ts3.4/dist/eslint-utils/rule-tester/dependencyConstraints.d.ts +17 -0
- package/node_modules/@typescript-eslint/utils/_ts3.4/dist/ts-eslint/RuleTester.d.ts +21 -17
- package/node_modules/@typescript-eslint/utils/dist/eslint-utils/batchedSingleLineTests.d.ts +1 -1
- package/node_modules/@typescript-eslint/utils/dist/eslint-utils/batchedSingleLineTests.d.ts.map +1 -1
- package/node_modules/@typescript-eslint/utils/dist/eslint-utils/batchedSingleLineTests.js.map +1 -1
- package/node_modules/@typescript-eslint/utils/dist/eslint-utils/index.d.ts +1 -1
- package/node_modules/@typescript-eslint/utils/dist/eslint-utils/index.d.ts.map +1 -1
- package/node_modules/@typescript-eslint/utils/dist/eslint-utils/index.js +1 -1
- package/node_modules/@typescript-eslint/utils/dist/eslint-utils/index.js.map +1 -1
- package/node_modules/@typescript-eslint/utils/dist/eslint-utils/rule-tester/RuleTester.d.ts +49 -0
- package/node_modules/@typescript-eslint/utils/dist/eslint-utils/rule-tester/RuleTester.d.ts.map +1 -0
- package/node_modules/@typescript-eslint/utils/dist/eslint-utils/rule-tester/RuleTester.js +238 -0
- package/node_modules/@typescript-eslint/utils/dist/eslint-utils/rule-tester/RuleTester.js.map +1 -0
- package/node_modules/@typescript-eslint/utils/dist/eslint-utils/rule-tester/dependencyConstraints.d.ts +17 -0
- package/node_modules/@typescript-eslint/utils/dist/eslint-utils/rule-tester/dependencyConstraints.d.ts.map +1 -0
- package/node_modules/@typescript-eslint/utils/dist/eslint-utils/rule-tester/dependencyConstraints.js +52 -0
- package/node_modules/@typescript-eslint/utils/dist/eslint-utils/rule-tester/dependencyConstraints.js.map +1 -0
- package/node_modules/@typescript-eslint/utils/dist/ts-eslint/RuleTester.d.ts +16 -9
- package/node_modules/@typescript-eslint/utils/dist/ts-eslint/RuleTester.d.ts.map +1 -1
- package/node_modules/@typescript-eslint/utils/dist/ts-eslint/RuleTester.js.map +1 -1
- package/node_modules/@typescript-eslint/utils/package.json +9 -6
- package/node_modules/@typescript-eslint/visitor-keys/package.json +3 -3
- package/node_modules/eslint-config-xo-typescript/index.js +7 -1
- package/node_modules/eslint-config-xo-typescript/package.json +5 -5
- package/node_modules/natural-compare-lite/README.md +126 -0
- package/node_modules/natural-compare-lite/index.js +57 -0
- package/node_modules/natural-compare-lite/package.json +42 -0
- package/node_modules/semver/classes/range.js +3 -0
- package/node_modules/semver/index.js +81 -41
- package/node_modules/{lru-cache → semver/node_modules/lru-cache}/LICENSE +0 -0
- package/node_modules/{lru-cache → semver/node_modules/lru-cache}/README.md +0 -0
- package/node_modules/{lru-cache → semver/node_modules/lru-cache}/index.js +0 -0
- package/node_modules/{lru-cache → semver/node_modules/lru-cache}/package.json +0 -0
- package/node_modules/semver/package.json +21 -10
- package/package.json +24 -24
- package/readme.md +1 -1
- package/node_modules/@typescript-eslint/utils/_ts3.4/dist/eslint-utils/RuleTester.d.ts +0 -18
- package/node_modules/@typescript-eslint/utils/dist/eslint-utils/RuleTester.d.ts +0 -18
- package/node_modules/@typescript-eslint/utils/dist/eslint-utils/RuleTester.d.ts.map +0 -1
- package/node_modules/@typescript-eslint/utils/dist/eslint-utils/RuleTester.js +0 -133
- package/node_modules/@typescript-eslint/utils/dist/eslint-utils/RuleTester.js.map +0 -1
|
@@ -75,6 +75,7 @@ function getGroup(node) {
|
|
|
75
75
|
case utils_1.AST_NODE_TYPES.TSIndexedAccessType:
|
|
76
76
|
case utils_1.AST_NODE_TYPES.TSInferType:
|
|
77
77
|
case utils_1.AST_NODE_TYPES.TSTypeReference:
|
|
78
|
+
case utils_1.AST_NODE_TYPES.TSQualifiedName:
|
|
78
79
|
return Group.named;
|
|
79
80
|
case utils_1.AST_NODE_TYPES.TSMappedType:
|
|
80
81
|
case utils_1.AST_NODE_TYPES.TSTypeLiteral:
|
|
@@ -111,6 +112,7 @@ function requiresParentheses(node) {
|
|
|
111
112
|
exports.default = util.createRule({
|
|
112
113
|
name: 'sort-type-union-intersection-members',
|
|
113
114
|
meta: {
|
|
115
|
+
deprecated: true,
|
|
114
116
|
type: 'suggestion',
|
|
115
117
|
docs: {
|
|
116
118
|
description: 'Enforce members of a type union/intersection to be sorted alphabetically',
|
|
@@ -123,6 +125,7 @@ exports.default = util.createRule({
|
|
|
123
125
|
notSortedNamed: '{{type}} type {{name}} members must be sorted.',
|
|
124
126
|
suggestFix: 'Sort members of type (removes all comments).',
|
|
125
127
|
},
|
|
128
|
+
replacedBy: ['@typescript-eslint/sort-type-constituents'],
|
|
126
129
|
schema: [
|
|
127
130
|
{
|
|
128
131
|
type: 'object',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sort-type-union-intersection-members.js","sourceRoot":"","sources":["../../src/rules/sort-type-union-intersection-members.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AACA,oDAA0D;AAE1D,8CAAgC;AAChC,kCAAuC;AAEvC,IAAK,KAaJ;AAbD,WAAK,KAAK;IACR,oCAA2B,CAAA;IAC3B,8BAAqB,CAAA;IACrB,0BAAiB,CAAA;IACjB,sCAA6B,CAAA;IAC7B,4BAAmB,CAAA;IACnB,4BAAmB,CAAA;IACnB,4BAAmB,CAAA;IACnB,wBAAe,CAAA;IACf,0BAAiB,CAAA;IACjB,8BAAqB,CAAA;IACrB,wBAAe,CAAA;IACf,wBAAe,CAAA;AACjB,CAAC,EAbI,KAAK,KAAL,KAAK,QAaT;AAED,SAAS,QAAQ,CAAC,IAAuB;IACvC,QAAQ,IAAI,CAAC,IAAI,EAAE;QACjB,KAAK,sBAAc,CAAC,iBAAiB;YACnC,OAAO,KAAK,CAAC,WAAW,CAAC;QAE3B,KAAK,sBAAc,CAAC,iBAAiB,CAAC;QACtC,KAAK,sBAAc,CAAC,cAAc;YAChC,OAAO,KAAK,CAAC,QAAQ,CAAC;QAExB,KAAK,sBAAc,CAAC,YAAY;YAC9B,OAAO,KAAK,CAAC,MAAM,CAAC;QAEtB,KAAK,sBAAc,CAAC,kBAAkB;YACpC,OAAO,KAAK,CAAC,YAAY,CAAC;QAE5B,KAAK,sBAAc,CAAC,YAAY,CAAC;QACjC,KAAK,sBAAc,CAAC,eAAe,CAAC;QACpC,KAAK,sBAAc,CAAC,gBAAgB,CAAC;QACrC,KAAK,sBAAc,CAAC,cAAc,CAAC;QACnC,KAAK,sBAAc,CAAC,eAAe,CAAC;QACpC,KAAK,sBAAc,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,CAAC;CACF,CAAC,CAAC"}
|
|
1
|
+
{"version":3,"file":"sort-type-union-intersection-members.js","sourceRoot":"","sources":["../../src/rules/sort-type-union-intersection-members.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AACA,oDAA0D;AAE1D,8CAAgC;AAChC,kCAAuC;AAEvC,IAAK,KAaJ;AAbD,WAAK,KAAK;IACR,oCAA2B,CAAA;IAC3B,8BAAqB,CAAA;IACrB,0BAAiB,CAAA;IACjB,sCAA6B,CAAA;IAC7B,4BAAmB,CAAA;IACnB,4BAAmB,CAAA;IACnB,4BAAmB,CAAA;IACnB,wBAAe,CAAA;IACf,0BAAiB,CAAA;IACjB,8BAAqB,CAAA;IACrB,wBAAe,CAAA;IACf,wBAAe,CAAA;AACjB,CAAC,EAbI,KAAK,KAAL,KAAK,QAaT;AAED,SAAS,QAAQ,CAAC,IAAuB;IACvC,QAAQ,IAAI,CAAC,IAAI,EAAE;QACjB,KAAK,sBAAc,CAAC,iBAAiB;YACnC,OAAO,KAAK,CAAC,WAAW,CAAC;QAE3B,KAAK,sBAAc,CAAC,iBAAiB,CAAC;QACtC,KAAK,sBAAc,CAAC,cAAc;YAChC,OAAO,KAAK,CAAC,QAAQ,CAAC;QAExB,KAAK,sBAAc,CAAC,YAAY;YAC9B,OAAO,KAAK,CAAC,MAAM,CAAC;QAEtB,KAAK,sBAAc,CAAC,kBAAkB;YACpC,OAAO,KAAK,CAAC,YAAY,CAAC;QAE5B,KAAK,sBAAc,CAAC,YAAY,CAAC;QACjC,KAAK,sBAAc,CAAC,eAAe,CAAC;QACpC,KAAK,sBAAc,CAAC,gBAAgB,CAAC;QACrC,KAAK,sBAAc,CAAC,cAAc,CAAC;QACnC,KAAK,sBAAc,CAAC,eAAe,CAAC;QACpC,KAAK,sBAAc,CAAC,eAAe,CAAC;QACpC,KAAK,sBAAc,CAAC,eAAe,CAAC;QACpC,KAAK,sBAAc,CAAC,eAAe,CAAC;QACpC,KAAK,sBAAc,CAA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C,CAAC"}
|
package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/adjacent-overload-signatures.md
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
---
|
|
2
|
-
description: 'Require that
|
|
2
|
+
description: 'Require that function overload signatures be consecutive.'
|
|
3
3
|
---
|
|
4
4
|
|
|
5
5
|
> 🛑 This file is source code, not the primary documentation location! 🛑
|
|
6
6
|
>
|
|
7
7
|
> See **https://typescript-eslint.io/rules/adjacent-overload-signatures** for documentation.
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
Function overload signatures represent multiple ways a function can be called, potentially with different return types.
|
|
10
|
+
It's typical for an interface or type alias describing a function to place all overload signatures next to each other.
|
|
11
|
+
If Signatures placed elsewhere in the type are easier to be missed by future developers reading the code.
|
|
10
12
|
|
|
11
|
-
##
|
|
12
|
-
|
|
13
|
-
This rule aims to standardize the way overloaded members are organized.
|
|
13
|
+
## Examples
|
|
14
14
|
|
|
15
15
|
<!--tabs-->
|
|
16
16
|
|
|
@@ -1,16 +1,14 @@
|
|
|
1
1
|
---
|
|
2
|
-
description: 'Require using either `T[]` or `Array<T>` for arrays.'
|
|
2
|
+
description: 'Require consistently using either `T[]` or `Array<T>` for arrays.'
|
|
3
3
|
---
|
|
4
4
|
|
|
5
5
|
> 🛑 This file is source code, not the primary documentation location! 🛑
|
|
6
6
|
>
|
|
7
7
|
> See **https://typescript-eslint.io/rules/array-type** for documentation.
|
|
8
8
|
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
This rule aims to standardize usage of array types within your codebase.
|
|
9
|
+
TypeScript provides two equivalent ways to define an array type: `T[]` and `Array<T>`.
|
|
10
|
+
The two styles are functionally equivalent.
|
|
11
|
+
Using the same style consistently across your codebase makes it easier for developers to read and understand array types.
|
|
14
12
|
|
|
15
13
|
## Options
|
|
16
14
|
|
|
@@ -6,12 +6,13 @@ description: 'Disallow awaiting a value that is not a Thenable.'
|
|
|
6
6
|
>
|
|
7
7
|
> See **https://typescript-eslint.io/rules/await-thenable** for documentation.
|
|
8
8
|
|
|
9
|
-
|
|
10
|
-
|
|
9
|
+
A "Thenable" value is an object with has a `then` method, such as a Promise.
|
|
10
|
+
The `await` keyword is generally used to retrieve the result of calling a Thenable's `then` method.
|
|
11
11
|
|
|
12
|
-
|
|
12
|
+
If the `await` keyword is used on a value that is not a Thenable, the value is directly resolved immediately.
|
|
13
|
+
While doing so is valid JavaScript, it is often a programmer error, such as forgetting to add parenthesis to call a function that returns a Promise.
|
|
13
14
|
|
|
14
|
-
Examples
|
|
15
|
+
## Examples
|
|
15
16
|
|
|
16
17
|
<!--tabs-->
|
|
17
18
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
---
|
|
2
|
-
description: 'Disallow `@ts-<directive>` comments or require descriptions after
|
|
2
|
+
description: 'Disallow `@ts-<directive>` comments or require descriptions after directives.'
|
|
3
3
|
---
|
|
4
4
|
|
|
5
5
|
> 🛑 This file is source code, not the primary documentation location! 🛑
|
|
@@ -7,7 +7,8 @@ description: 'Disallow `@ts-<directive>` comments or require descriptions after
|
|
|
7
7
|
> See **https://typescript-eslint.io/rules/ban-ts-comment** for documentation.
|
|
8
8
|
|
|
9
9
|
TypeScript provides several directive comments that can be used to alter how it processes files.
|
|
10
|
-
Using these to suppress TypeScript
|
|
10
|
+
Using these to suppress TypeScript compiler errors reduces the effectiveness of TypeScript overall.
|
|
11
|
+
Instead, it's generally better to correct the types of code, to make directives unnecessary.
|
|
11
12
|
|
|
12
13
|
The directive comments supported by TypeScript are:
|
|
13
14
|
|
|
@@ -18,8 +19,6 @@ The directive comments supported by TypeScript are:
|
|
|
18
19
|
// @ts-check
|
|
19
20
|
```
|
|
20
21
|
|
|
21
|
-
## Rule Details
|
|
22
|
-
|
|
23
22
|
This rule lets you set which directive comments you want to allow in your codebase.
|
|
24
23
|
|
|
25
24
|
## Options
|
|
@@ -8,9 +8,9 @@ description: 'Disallow `// tslint:<rule-flag>` comments.'
|
|
|
8
8
|
|
|
9
9
|
Useful when migrating from TSLint to ESLint. Once TSLint has been removed, this rule helps locate TSLint annotations (e.g. `// tslint:disable`).
|
|
10
10
|
|
|
11
|
-
|
|
11
|
+
> See the [TSLint rule flags docs](https://palantir.github.io/tslint/usage/rule-flags) for reference.
|
|
12
12
|
|
|
13
|
-
|
|
13
|
+
## Examples
|
|
14
14
|
|
|
15
15
|
<!--tabs-->
|
|
16
16
|
|
|
@@ -9,11 +9,11 @@ description: 'Disallow certain types.'
|
|
|
9
9
|
Some built-in types have aliases, while some types are considered dangerous or harmful.
|
|
10
10
|
It's often a good idea to ban certain types to help with consistency and safety.
|
|
11
11
|
|
|
12
|
-
## Rule Details
|
|
13
|
-
|
|
14
12
|
This rule bans specific types and can suggest alternatives.
|
|
15
13
|
Note that it does not ban the corresponding runtime objects from being used.
|
|
16
14
|
|
|
15
|
+
## Examples
|
|
16
|
+
|
|
17
17
|
Examples of code with the default options:
|
|
18
18
|
|
|
19
19
|
<!--tabs-->
|
|
@@ -6,7 +6,7 @@ description: 'Enforce consistent brace style for blocks.'
|
|
|
6
6
|
>
|
|
7
7
|
> See **https://typescript-eslint.io/rules/brace-style** for documentation.
|
|
8
8
|
|
|
9
|
-
##
|
|
9
|
+
## Examples
|
|
10
10
|
|
|
11
11
|
This rule extends the base [`eslint/brace-style`](https://eslint.org/docs/rules/brace-style) rule.
|
|
12
12
|
It adds support for `enum`, `interface`, `namespace` and `module` declarations.
|
package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/class-literal-property-style.md
CHANGED
|
@@ -6,14 +6,14 @@ description: 'Enforce that literals on classes are exposed in a consistent style
|
|
|
6
6
|
>
|
|
7
7
|
> See **https://typescript-eslint.io/rules/class-literal-property-style** for documentation.
|
|
8
8
|
|
|
9
|
-
|
|
10
|
-
When writing TypeScript libraries that could be used by JavaScript users however, it's typically safer to expose these literals using `getter`s, since the `readonly` modifier is enforced at compile type.
|
|
11
|
-
|
|
12
|
-
## Options
|
|
9
|
+
Some TypeScript applications store literal values on classes using fields with the `readonly` modifier to prevent them from being reassigned.
|
|
10
|
+
When writing TypeScript libraries that could be used by JavaScript users, however, it's typically safer to expose these literals using `getter`s, since the `readonly` modifier is enforced at compile type.
|
|
13
11
|
|
|
14
12
|
This rule aims to ensure that literals exposed by classes are done so consistently, in one of the two style described above.
|
|
15
13
|
By default this rule prefers the `fields` style as it means JS doesn't have to setup & teardown a function closure.
|
|
16
14
|
|
|
15
|
+
## Options
|
|
16
|
+
|
|
17
17
|
:::note
|
|
18
18
|
|
|
19
19
|
This rule only checks for constant _literal_ values (string, template string, number, bigint, boolean, regexp, null). It does not check objects or arrays, because a readonly field behaves differently to a getter in those cases. It also does not check functions, as it is a common pattern to use readonly fields with arrow function values as auto-bound methods.
|
|
@@ -6,7 +6,7 @@ description: 'Require or disallow trailing commas.'
|
|
|
6
6
|
>
|
|
7
7
|
> See **https://typescript-eslint.io/rules/comma-dangle** for documentation.
|
|
8
8
|
|
|
9
|
-
##
|
|
9
|
+
## Examples
|
|
10
10
|
|
|
11
11
|
This rule extends the base [`eslint/comma-dangle`](https://eslint.org/docs/rules/comma-dangle) rule.
|
|
12
12
|
It adds support for TypeScript syntax.
|
|
@@ -6,7 +6,7 @@ description: 'Enforce consistent spacing before and after commas.'
|
|
|
6
6
|
>
|
|
7
7
|
> See **https://typescript-eslint.io/rules/comma-spacing** for documentation.
|
|
8
8
|
|
|
9
|
-
##
|
|
9
|
+
## Examples
|
|
10
10
|
|
|
11
11
|
This rule extends the base [`eslint/comma-spacing`](https://eslint.org/docs/rules/comma-spacing) rule.
|
|
12
12
|
It adds support for trailing comma in a types parameters list.
|
package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/consistent-generic-constructors.md
CHANGED
|
@@ -17,10 +17,10 @@ const map = new Map<string, number>();
|
|
|
17
17
|
```
|
|
18
18
|
|
|
19
19
|
This rule ensures that type arguments appear consistently on one side of the declaration.
|
|
20
|
+
Keeping to one side consistently improve code readability.
|
|
20
21
|
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
The rule never reports when there are type parameters on both sides, or neither sides of the declaration. It also doesn't report if the names of the type annotation and the constructor don't match.
|
|
22
|
+
> The rule never reports when there are type parameters on both sides, or neither sides of the declaration.
|
|
23
|
+
> It also doesn't report if the names of the type annotation and the constructor don't match.
|
|
24
24
|
|
|
25
25
|
## Options
|
|
26
26
|
|
package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/consistent-type-assertions.md
CHANGED
|
@@ -6,15 +6,22 @@ description: 'Enforce consistent usage of type assertions.'
|
|
|
6
6
|
>
|
|
7
7
|
> See **https://typescript-eslint.io/rules/consistent-type-assertions** for documentation.
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
TypeScript provides two syntaxes for "type assertions":
|
|
10
10
|
|
|
11
|
-
|
|
11
|
+
- Angle brackets: `<Type>value`
|
|
12
|
+
- As: `value as Type`
|
|
12
13
|
|
|
13
|
-
|
|
14
|
+
This rule aims to standardize the use of type assertion style across the codebase.
|
|
15
|
+
Keeping to one syntax consistently helps with code readability.
|
|
14
16
|
|
|
15
|
-
|
|
17
|
+
:::note
|
|
18
|
+
Type assertions are also commonly referred as "type casting" in TypeScript.
|
|
19
|
+
However, that term is technically slightly different to what is understood by type casting in other languages.
|
|
20
|
+
Type assertions are a way to say to the TypeScript compiler, _"I know better than you, it's actually this different type!"_.
|
|
21
|
+
:::
|
|
16
22
|
|
|
17
|
-
[`const` assertions](https://www.typescriptlang.org/docs/handbook/release-notes/typescript-3-4.html#const-assertions) are always allowed by this rule.
|
|
23
|
+
[`const` assertions](https://www.typescriptlang.org/docs/handbook/release-notes/typescript-3-4.html#const-assertions) are always allowed by this rule.
|
|
24
|
+
Examples of them include `let x = "hello" as const;` and `let x = <const>"hello";`.
|
|
18
25
|
|
|
19
26
|
## Options
|
|
20
27
|
|
package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/consistent-type-definitions.md
CHANGED
|
@@ -6,7 +6,7 @@ description: 'Enforce type definitions to consistently use either `interface` or
|
|
|
6
6
|
>
|
|
7
7
|
> See **https://typescript-eslint.io/rules/consistent-type-definitions** for documentation.
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
TypeScript provides two common ways to define an object type: `interface` and `type`.
|
|
10
10
|
|
|
11
11
|
```ts
|
|
12
12
|
// type alias
|
|
@@ -22,6 +22,9 @@ interface T2 {
|
|
|
22
22
|
}
|
|
23
23
|
```
|
|
24
24
|
|
|
25
|
+
The two are generally very similar, and can often be used interchangeably.
|
|
26
|
+
Using the same type declaration style consistently helps with code readability.
|
|
27
|
+
|
|
25
28
|
## Options
|
|
26
29
|
|
|
27
30
|
- `"interface"` _(default)_: enforce using `interface`s for object type definitions.
|
|
@@ -6,14 +6,10 @@ description: 'Enforce consistent usage of type exports.'
|
|
|
6
6
|
>
|
|
7
7
|
> See **https://typescript-eslint.io/rules/consistent-type-exports** for documentation.
|
|
8
8
|
|
|
9
|
-
|
|
10
|
-
transpilers to drop exports without knowing the types of the dependencies.
|
|
9
|
+
TypeScript allows specifying a `type` keyword on exports to indicate that the export exists only in the type system, not at runtime.
|
|
10
|
+
This allows transpilers to drop exports without knowing the types of the dependencies.
|
|
11
11
|
|
|
12
|
-
##
|
|
13
|
-
|
|
14
|
-
This rule aims to standardize the use of type exports style.
|
|
15
|
-
|
|
16
|
-
Given a class `Button`, and an interface `ButtonProps`, examples of code:
|
|
12
|
+
## Examples
|
|
17
13
|
|
|
18
14
|
<!--tabs-->
|
|
19
15
|
|
|
@@ -25,9 +21,7 @@ interface ButtonProps {
|
|
|
25
21
|
}
|
|
26
22
|
|
|
27
23
|
class Button implements ButtonProps {
|
|
28
|
-
onClick()
|
|
29
|
-
console.log('button!');
|
|
30
|
-
}
|
|
24
|
+
onClick = () => console.log('button!');
|
|
31
25
|
}
|
|
32
26
|
|
|
33
27
|
export { Button, ButtonProps };
|
|
@@ -39,11 +33,11 @@ export { Button, ButtonProps };
|
|
|
39
33
|
interface ButtonProps {
|
|
40
34
|
onClick: () => void;
|
|
41
35
|
}
|
|
36
|
+
|
|
42
37
|
class Button implements ButtonProps {
|
|
43
|
-
onClick()
|
|
44
|
-
console.log('button!');
|
|
45
|
-
}
|
|
38
|
+
onClick = () => console.log('button!');
|
|
46
39
|
}
|
|
40
|
+
|
|
47
41
|
export { Button };
|
|
48
42
|
export type { ButtonProps };
|
|
49
43
|
```
|
|
@@ -6,11 +6,8 @@ description: 'Enforce consistent usage of type imports.'
|
|
|
6
6
|
>
|
|
7
7
|
> See **https://typescript-eslint.io/rules/consistent-type-imports** for documentation.
|
|
8
8
|
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
## Rule Details
|
|
12
|
-
|
|
13
|
-
This rule aims to standardize the use of type imports style.
|
|
9
|
+
TypeScript allows specifying a `type` keyword on imports to indicate that the export exists only in the type system, not at runtime.
|
|
10
|
+
This allows transpilers to drop imports without knowing the types of the dependencies.
|
|
14
11
|
|
|
15
12
|
## Options
|
|
16
13
|
|
|
@@ -18,7 +15,7 @@ This rule aims to standardize the use of type imports style.
|
|
|
18
15
|
|
|
19
16
|
This option defines the expected import kind for type-only imports. Valid values for `prefer` are:
|
|
20
17
|
|
|
21
|
-
- `type-imports` will enforce that you always use `import type Foo from '...'` except referenced by metadata of decorators. It is default.
|
|
18
|
+
- `type-imports` will enforce that you always use `import type Foo from '...'` except referenced by metadata of decorators. It is the default.
|
|
22
19
|
- `no-type-imports` will enforce that you always use `import Foo from '...'`.
|
|
23
20
|
|
|
24
21
|
Examples of **correct** code with `{prefer: 'type-imports'}`, and **incorrect** code with `{prefer: 'no-type-imports'}`.
|
|
@@ -39,6 +36,44 @@ type T = Foo;
|
|
|
39
36
|
const x: Bar = 1;
|
|
40
37
|
```
|
|
41
38
|
|
|
39
|
+
### `fixStyle`
|
|
40
|
+
|
|
41
|
+
This option defines the expected type modifier to be added when an import is detected as used only in the type position. Valid values for `fixStyle` are:
|
|
42
|
+
|
|
43
|
+
- `separate-type-imports` will add the type keyword after the import keyword `import type { A } from '...'`. It is the default.
|
|
44
|
+
- `inline-type-imports` will inline the type keyword `import { type A } from '...'` and is only available in TypeScript 4.5 and onwards. See [documentation here](https://www.typescriptlang.org/docs/handbook/release-notes/typescript-4-5.html#type-modifiers-on-import-names 'TypeScript 4.5 documentation on type modifiers and import names').
|
|
45
|
+
|
|
46
|
+
<!--tabs-->
|
|
47
|
+
|
|
48
|
+
#### ❌ Incorrect
|
|
49
|
+
|
|
50
|
+
```ts
|
|
51
|
+
import { Foo } from 'Foo';
|
|
52
|
+
import Bar from 'Bar';
|
|
53
|
+
type T = Foo;
|
|
54
|
+
const x: Bar = 1;
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
#### ✅ With `separate-type-imports`
|
|
58
|
+
|
|
59
|
+
```ts
|
|
60
|
+
import type { Foo } from 'Foo';
|
|
61
|
+
import type Bar from 'Bar';
|
|
62
|
+
type T = Foo;
|
|
63
|
+
const x: Bar = 1;
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
#### ✅ With `inline-type-imports`
|
|
67
|
+
|
|
68
|
+
```ts
|
|
69
|
+
import { type Foo } from 'Foo';
|
|
70
|
+
import type Bar from 'Bar';
|
|
71
|
+
type T = Foo;
|
|
72
|
+
const x: Bar = 1;
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
<!--tabs-->
|
|
76
|
+
|
|
42
77
|
### `disallowTypeAnnotations`
|
|
43
78
|
|
|
44
79
|
If `true`, type imports in type annotations (`import()`) are not allowed.
|
|
@@ -51,6 +86,12 @@ type T = import('Foo').Foo;
|
|
|
51
86
|
const x: import('Bar') = 1;
|
|
52
87
|
```
|
|
53
88
|
|
|
89
|
+
## Usage with `emitDecoratorMetadata`
|
|
90
|
+
|
|
91
|
+
The `emitDecoratorMetadata` compiler option changes the code the TypeScript emits. In short - it causes TypeScript to create references to value imports when they are used in a type-only location. If you are using `emitDecoratorMetadata` then our tooling will require additional information in order for the rule to work correctly.
|
|
92
|
+
|
|
93
|
+
If you are using [type-aware linting](https://typescript-eslint.io/docs/linting/typed-linting), then you just need to ensure that the `tsconfig.json` you've configured for `parserOptions.project` has `emitDecoratorMetadata` turned on. Otherwise you can explicitly tell our tooling to analyze your code as if the compiler option was turned on [by setting `parserOptions.emitDecoratorMetadata` to `true`](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/parser/README.md#parseroptionsemitdecoratormetadata).
|
|
94
|
+
|
|
54
95
|
## When Not To Use It
|
|
55
96
|
|
|
56
97
|
- If you specifically want to use both import kinds for stylistic reasons, you can disable this rule.
|
|
@@ -6,7 +6,7 @@ description: 'Enforce default parameters to be last.'
|
|
|
6
6
|
>
|
|
7
7
|
> See **https://typescript-eslint.io/rules/default-param-last** for documentation.
|
|
8
8
|
|
|
9
|
-
##
|
|
9
|
+
## Examples
|
|
10
10
|
|
|
11
11
|
This rule extends the base [`eslint/default-param-last`](https://eslint.org/docs/rules/default-param-last) rule.
|
|
12
12
|
It adds support for optional parameters.
|
|
@@ -6,7 +6,7 @@ description: 'Enforce dot notation whenever possible.'
|
|
|
6
6
|
>
|
|
7
7
|
> See **https://typescript-eslint.io/rules/dot-notation** for documentation.
|
|
8
8
|
|
|
9
|
-
##
|
|
9
|
+
## Examples
|
|
10
10
|
|
|
11
11
|
This rule extends the base [`eslint/dot-notation`](https://eslint.org/docs/rules/dot-notation) rule.
|
|
12
12
|
It adds:
|
package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/explicit-function-return-type.md
CHANGED
|
@@ -6,14 +6,15 @@ description: 'Require explicit return types on functions and class methods.'
|
|
|
6
6
|
>
|
|
7
7
|
> See **https://typescript-eslint.io/rules/explicit-function-return-type** for documentation.
|
|
8
8
|
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
where there is no return value, that the calling code doesn't try to use the undefined value when it
|
|
12
|
-
shouldn't.
|
|
9
|
+
Functions in TypeScript often don't need to be given an explicit return type annotation.
|
|
10
|
+
Leaving off the return type is less code to read or write and allows the compiler to infer it from the contents of the function.
|
|
13
11
|
|
|
14
|
-
|
|
12
|
+
However, explicit return types do make it visually more clear what type is returned by a function.
|
|
13
|
+
They can also speed up TypeScript type checking performance in large codebases with many large functions.
|
|
15
14
|
|
|
16
|
-
This rule
|
|
15
|
+
This rule enforces that functions do have an explicit return type annotation.
|
|
16
|
+
|
|
17
|
+
## Examples
|
|
17
18
|
|
|
18
19
|
<!--tabs-->
|
|
19
20
|
|
package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/explicit-member-accessibility.md
CHANGED
|
@@ -6,12 +6,16 @@ description: 'Require explicit accessibility modifiers on class properties and m
|
|
|
6
6
|
>
|
|
7
7
|
> See **https://typescript-eslint.io/rules/explicit-member-accessibility** for documentation.
|
|
8
8
|
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
If you make all internal pieces private or protected, your interface will
|
|
12
|
-
be easier to use.
|
|
9
|
+
TypeScript allows placing explicit `public`, `protected`, and `private` accessibility modifiers in front of class members.
|
|
10
|
+
The modifiers exist solely in the type system and just server to describe who is allowed to access those members.
|
|
13
11
|
|
|
14
|
-
|
|
12
|
+
Leaving off accessibility modifiers makes for less code to read and write.
|
|
13
|
+
Members are `public` by default.
|
|
14
|
+
|
|
15
|
+
However, adding in explicit accessibility modifiers can be helpful in codebases with many classes for enforcing proper privacy of members.
|
|
16
|
+
Some developers also find it preferable for code readability to keep member publicity explicit.
|
|
17
|
+
|
|
18
|
+
## Examples
|
|
15
19
|
|
|
16
20
|
This rule aims to make code more readable and explicit about who can use
|
|
17
21
|
which properties.
|
|
@@ -324,4 +328,4 @@ If you think defaulting to public is a good default, then you should consider us
|
|
|
324
328
|
|
|
325
329
|
## Further Reading
|
|
326
330
|
|
|
327
|
-
- TypeScript [Accessibility Modifiers](https://www.typescriptlang.org/docs/handbook/classes.html#
|
|
331
|
+
- TypeScript [Accessibility Modifiers Handbook Docs](https://www.typescriptlang.org/docs/handbook/2/classes.html#member-visibility)
|
package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/explicit-module-boundary-types.md
CHANGED
|
@@ -7,10 +7,10 @@ description: "Require explicit return and argument types on exported functions'
|
|
|
7
7
|
> See **https://typescript-eslint.io/rules/explicit-module-boundary-types** for documentation.
|
|
8
8
|
|
|
9
9
|
Explicit types for function return values and arguments makes it clear to any calling code what is the module boundary's input and output.
|
|
10
|
+
Adding explicit type annotations for those types can help improve code readability.
|
|
11
|
+
It can also improve TypeScript type checking performance on larger codebases.
|
|
10
12
|
|
|
11
|
-
##
|
|
12
|
-
|
|
13
|
-
This rule aims to ensure that the values returned from a module are of the expected type.
|
|
13
|
+
## Examples
|
|
14
14
|
|
|
15
15
|
<!--tabs-->
|
|
16
16
|
|
|
@@ -6,7 +6,7 @@ description: 'Require or disallow spacing between function identifiers and their
|
|
|
6
6
|
>
|
|
7
7
|
> See **https://typescript-eslint.io/rules/func-call-spacing** for documentation.
|
|
8
8
|
|
|
9
|
-
##
|
|
9
|
+
## Examples
|
|
10
10
|
|
|
11
11
|
This rule extends the base [`eslint/func-call-spacing`](https://eslint.org/docs/rules/func-call-spacing) rule.
|
|
12
12
|
It adds support for generic type parameters on function calls.
|
|
@@ -14,7 +14,7 @@ Please read [Issue #1824: Problems with the indent rule](https://github.com/type
|
|
|
14
14
|
|
|
15
15
|
:::
|
|
16
16
|
|
|
17
|
-
##
|
|
17
|
+
## Examples
|
|
18
18
|
|
|
19
19
|
This rule extends the base [`eslint/indent`](https://eslint.org/docs/rules/indent) rule.
|
|
20
20
|
It adds support for TypeScript nodes.
|
|
@@ -6,7 +6,7 @@ description: 'Require or disallow initialization in variable declarations.'
|
|
|
6
6
|
>
|
|
7
7
|
> See **https://typescript-eslint.io/rules/init-declarations** for documentation.
|
|
8
8
|
|
|
9
|
-
##
|
|
9
|
+
## Examples
|
|
10
10
|
|
|
11
11
|
This rule extends the base [`eslint/init-declarations`](https://eslint.org/docs/rules/init-declarations) rule.
|
|
12
12
|
It adds support for TypeScript's `declare` variables.
|
|
@@ -6,7 +6,7 @@ description: 'Enforce consistent spacing before and after keywords.'
|
|
|
6
6
|
>
|
|
7
7
|
> See **https://typescript-eslint.io/rules/keyword-spacing** for documentation.
|
|
8
8
|
|
|
9
|
-
##
|
|
9
|
+
## Examples
|
|
10
10
|
|
|
11
11
|
This rule extends the base [`eslint/keyword-spacing`](https://eslint.org/docs/rules/keyword-spacing) rule.
|
|
12
12
|
This version adds support for generic type parameters on function calls.
|
package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/lines-between-class-members.md
CHANGED
|
@@ -8,7 +8,7 @@ description: 'Require or disallow an empty line between class members.'
|
|
|
8
8
|
|
|
9
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.
|
|
10
10
|
|
|
11
|
-
##
|
|
11
|
+
## Examples
|
|
12
12
|
|
|
13
13
|
This rule extends the base [`eslint/lines-between-class-members`](https://eslint.org/docs/rules/lines-between-class-members) rule.
|
|
14
14
|
It adds support for ignoring overload methods in a class.
|