xo 0.52.4 → 0.53.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cli.js +1 -0
- 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
|
@@ -6,82 +6,29 @@ description: 'Require a specific member delimiter style for interfaces and type
|
|
|
6
6
|
>
|
|
7
7
|
> See **https://typescript-eslint.io/rules/member-delimiter-style** for documentation.
|
|
8
8
|
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
- Semicolon style (default, preferred in TypeScript).
|
|
9
|
+
TypeScript allows three delimiters between members in interfaces and type aliases:
|
|
12
10
|
|
|
13
11
|
<!-- prettier-ignore -->
|
|
14
12
|
```ts
|
|
15
13
|
interface Foo {
|
|
14
|
+
// Semicolons (default, preferred in TypeScript):
|
|
16
15
|
name: string;
|
|
17
|
-
greet(): void;
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
type Bar = {
|
|
21
|
-
name: string;
|
|
22
|
-
greet(): void;
|
|
23
|
-
}
|
|
24
|
-
```
|
|
25
|
-
|
|
26
|
-
- Comma style (JSON style).
|
|
27
16
|
|
|
28
|
-
|
|
29
|
-
```ts
|
|
30
|
-
interface Foo {
|
|
31
|
-
name: string,
|
|
32
|
-
greet(): void,
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
type Bar = {
|
|
17
|
+
// Commas (JSON-like):
|
|
36
18
|
name: string,
|
|
37
|
-
greet(): void,
|
|
38
|
-
}
|
|
39
|
-
```
|
|
40
19
|
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
<!-- prettier-ignore -->
|
|
44
|
-
```ts
|
|
45
|
-
interface Foo {
|
|
20
|
+
// Line breaks (none):
|
|
46
21
|
name: string
|
|
47
|
-
greet(): void
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
type Bar = {
|
|
51
|
-
name: string
|
|
52
|
-
greet(): void
|
|
53
22
|
}
|
|
54
23
|
```
|
|
55
24
|
|
|
56
|
-
|
|
57
|
-
Finally, this rule can enforce separate delimiter syntax for single line declarations.
|
|
25
|
+
For code readability, it's generally best to use the same style consistently in your codebase.
|
|
58
26
|
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
This rule aims to standardize the way interface and type literal members are delimited.
|
|
27
|
+
This rule enforces keeping to one configurable code style.
|
|
28
|
+
It can also standardize the presence (or absence) of a delimiter in the last member of a construct, as well as a separate delimiter syntax for single line declarations.
|
|
62
29
|
|
|
63
30
|
## Options
|
|
64
31
|
|
|
65
|
-
```ts
|
|
66
|
-
interface BaseConfig {
|
|
67
|
-
multiline?: {
|
|
68
|
-
delimiter?: 'none' | 'semi' | 'comma';
|
|
69
|
-
requireLast?: boolean;
|
|
70
|
-
};
|
|
71
|
-
singleline?: {
|
|
72
|
-
delimiter?: 'semi' | 'comma';
|
|
73
|
-
requireLast?: boolean;
|
|
74
|
-
};
|
|
75
|
-
}
|
|
76
|
-
type Config = BaseConfig & {
|
|
77
|
-
overrides?: {
|
|
78
|
-
interface?: BaseConfig;
|
|
79
|
-
typeLiteral?: BaseConfig;
|
|
80
|
-
};
|
|
81
|
-
multilineDetection?: 'brackets' | 'last-member';
|
|
82
|
-
};
|
|
83
|
-
```
|
|
84
|
-
|
|
85
32
|
Default config:
|
|
86
33
|
|
|
87
34
|
```json
|
|
@@ -6,11 +6,8 @@ description: 'Require a consistent member declaration order.'
|
|
|
6
6
|
>
|
|
7
7
|
> See **https://typescript-eslint.io/rules/member-ordering** for documentation.
|
|
8
8
|
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
## Rule Details
|
|
12
|
-
|
|
13
|
-
This rule aims to standardize the way class declarations, class expressions, interfaces and type literals are structured and ordered.
|
|
9
|
+
This rule aims to standardize the way classes, interfaces, and type literals are structured and ordered.
|
|
10
|
+
A consistent ordering of fields, methods and constructors can make code easier to read, navigate, and edit.
|
|
14
11
|
|
|
15
12
|
## Options
|
|
16
13
|
|
|
@@ -27,7 +24,12 @@ type OrderConfig = MemberType[] | SortedOrderConfig | 'never';
|
|
|
27
24
|
|
|
28
25
|
interface SortedOrderConfig {
|
|
29
26
|
memberTypes?: MemberType[] | 'never';
|
|
30
|
-
order:
|
|
27
|
+
order:
|
|
28
|
+
| 'alphabetically'
|
|
29
|
+
| 'alphabetically-case-insensitive'
|
|
30
|
+
| 'as-written'
|
|
31
|
+
| 'natural'
|
|
32
|
+
| 'natural-case-insensitive';
|
|
31
33
|
}
|
|
32
34
|
|
|
33
35
|
// See below for the more specific MemberType strings
|
|
@@ -59,6 +61,17 @@ The supported member attributes are, in order:
|
|
|
59
61
|
Member attributes may be joined with a `'-'` to combine into more specific groups.
|
|
60
62
|
For example, `'public-field'` would come before `'private-field'`.
|
|
61
63
|
|
|
64
|
+
### Orders
|
|
65
|
+
|
|
66
|
+
The `order` value specifies what order members should be within a group.
|
|
67
|
+
It defaults to `as-written`, meaning any order is fine.
|
|
68
|
+
Other allowed values are:
|
|
69
|
+
|
|
70
|
+
- `alphabetically`: Sorted in a-z alphabetical order, directly using string `<` comparison (so `B` comes before `a`)
|
|
71
|
+
- `alphabetically-case-insensitive`: Sorted in a-z alphabetical order, ignoring case (so `a` comes before `B`)
|
|
72
|
+
- `natural`: Same as `alphabetically`, but using [`natural-compare-lite`](https://github.com/litejs/natural-compare-lite) for more friendly sorting of numbers
|
|
73
|
+
- `natural-case-insensitive`: Same as `alphabetically-case-insensitive`, but using [`natural-compare-lite`](https://github.com/litejs/natural-compare-lite) for more friendly sorting of numbers
|
|
74
|
+
|
|
62
75
|
### Default configuration
|
|
63
76
|
|
|
64
77
|
The default configuration looks as follows:
|
|
@@ -6,20 +6,20 @@ description: 'Enforce using a particular method signature syntax.'
|
|
|
6
6
|
>
|
|
7
7
|
> See **https://typescript-eslint.io/rules/method-signature-style** for documentation.
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
TypeScript provides two ways to define an object/interface function property:
|
|
10
10
|
|
|
11
11
|
```ts
|
|
12
|
-
|
|
13
|
-
|
|
12
|
+
interface Example {
|
|
13
|
+
// method shorthand syntax
|
|
14
14
|
func(arg: string): number;
|
|
15
|
-
}
|
|
16
15
|
|
|
17
|
-
// regular property with function type
|
|
18
|
-
interface T2 {
|
|
16
|
+
// regular property with function type
|
|
19
17
|
func: (arg: string) => number;
|
|
20
18
|
}
|
|
21
19
|
```
|
|
22
20
|
|
|
21
|
+
The two are very similar; most of the time it doesn't matter which one you use.
|
|
22
|
+
|
|
23
23
|
A good practice is to use the TypeScript's `strict` option (which implies `strictFunctionTypes`) which enables correct typechecking for function properties only (method signatures get old behavior).
|
|
24
24
|
|
|
25
25
|
TypeScript FAQ:
|
|
@@ -9,9 +9,7 @@ description: 'Enforce naming conventions for everything across a codebase.'
|
|
|
9
9
|
Enforcing naming conventions helps keep the codebase consistent, and reduces overhead when thinking about how to name a variable.
|
|
10
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`.
|
|
11
11
|
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
## Rule Details
|
|
12
|
+
## Examples
|
|
15
13
|
|
|
16
14
|
This rule allows you to enforce conventions for any identifier, using granular selectors to create a fine-grained style guide.
|
|
17
15
|
|
|
@@ -151,7 +149,7 @@ The `leadingUnderscore` / `trailingUnderscore` options control whether leading/t
|
|
|
151
149
|
|
|
152
150
|
The `prefix` / `suffix` options control which prefix/suffix strings must exist for the identifier. Accepts an array of strings.
|
|
153
151
|
|
|
154
|
-
If these are provided, the identifier must start with one of the provided values. For example, if you provide `{ prefix: ['
|
|
152
|
+
If these are provided, the identifier must start with one of the provided values. For example, if you provide `{ prefix: ['Class', 'IFace', 'Type'] }`, then the following names are valid: `ClassBar`, `IFaceFoo`, `TypeBaz`, but the name `Bang` is not valid, as it contains none of the prefixes.
|
|
155
153
|
|
|
156
154
|
**Note:** As [documented above](#format-options), the prefix is trimmed before format is validated, therefore PascalCase must be used to allow variables such as `isEnabled` using the prefix `is`.
|
|
157
155
|
|
|
@@ -159,11 +157,11 @@ If these are provided, the identifier must start with one of the provided values
|
|
|
159
157
|
|
|
160
158
|
- `selector` allows you to specify what types of identifiers to target.
|
|
161
159
|
- Accepts one or array of selectors to define an option block that applies to one or multiple selectors.
|
|
162
|
-
- For example, if you provide `{ selector: ['
|
|
160
|
+
- For example, if you provide `{ selector: ['function', 'variable'] }`, then it will apply the same option to variable and function nodes.
|
|
163
161
|
- See [Allowed Selectors, Modifiers and Types](#allowed-selectors-modifiers-and-types) below for the complete list of allowed selectors.
|
|
164
|
-
- `modifiers` allows you to specify which modifiers to granularly apply to, such as the accessibility (`private`/`public
|
|
162
|
+
- `modifiers` allows you to specify which modifiers to granularly apply to, such as the accessibility (`private`/`protected`/`public`), or if the thing is `static`, etc.
|
|
165
163
|
- The name must match _all_ of the modifiers.
|
|
166
|
-
- For example, if you provide `{ modifiers: ['private',
|
|
164
|
+
- For example, if you provide `{ modifiers: ['private','readonly','static'] }`, then it will only match something that is `private static readonly`, and something that is just `private` will not match.
|
|
167
165
|
- The following `modifiers` are allowed:
|
|
168
166
|
- `const` - matches a variable declared as being `const` (`const x = 1`).
|
|
169
167
|
- `destructured` - matches a variable declared via an object destructuring pattern (`const {x, z = 2}`).
|
|
@@ -173,8 +171,9 @@ If these are provided, the identifier must start with one of the provided values
|
|
|
173
171
|
- `unused` - matches anything that is not used.
|
|
174
172
|
- `requiresQuotes` - matches any name that requires quotes as it is not a valid identifier (i.e. has a space, a dash, etc in it).
|
|
175
173
|
- `public` - matches any member that is either explicitly declared as `public`, or has no visibility modifier (i.e. implicitly public).
|
|
176
|
-
- `readonly
|
|
177
|
-
- `
|
|
174
|
+
- `abstract`,`override`,`private`,`protected`,`readonly`,`static` - matches any member explicitly declared with the given modifier.
|
|
175
|
+
- `async` - matches any method, function, or function variable which is async via the `async` keyword (e.g. does not match functions that return promises without using `async` keyword)
|
|
176
|
+
- `types` allows you to specify which types to match. This option supports simple, primitive types only (`array`,`boolean`,`function`,`number`,`string`).
|
|
178
177
|
- The name must match _one_ of the types.
|
|
179
178
|
- **_NOTE - Using this option will require that you lint with type information._**
|
|
180
179
|
- For example, this lets you do things like enforce that `boolean` variables are prefixed with a verb.
|
|
@@ -195,39 +194,39 @@ There are two types of selectors, individual selectors, and grouped selectors.
|
|
|
195
194
|
|
|
196
195
|
Individual Selectors match specific, well-defined sets. There is no overlap between each of the individual selectors.
|
|
197
196
|
|
|
198
|
-
- `variable` - matches any `
|
|
199
|
-
- Allowed `modifiers`: `const`, `destructured`, `
|
|
200
|
-
- Allowed `types`: `
|
|
197
|
+
- `variable` - matches any `let` / `const` / `var` variable name.
|
|
198
|
+
- Allowed `modifiers`: `async`, `const`, `destructured`, `exported`, `global`, `unused`.
|
|
199
|
+
- Allowed `types`: `array`, `boolean`, `function`, `number`, `string`.
|
|
201
200
|
- `function` - matches any named function declaration or named function expression.
|
|
202
|
-
- Allowed `modifiers`: `
|
|
201
|
+
- Allowed `modifiers`: `async`, `exported`, `global`, `unused`.
|
|
203
202
|
- Allowed `types`: none.
|
|
204
203
|
- `parameter` - matches any function parameter. Does not match parameter properties.
|
|
205
204
|
- Allowed `modifiers`: `destructured`, `unused`.
|
|
206
205
|
- Allowed `types`: `boolean`, `string`, `number`, `function`, `array`.
|
|
207
206
|
- `classProperty` - matches any class property. Does not match properties that have direct function expression or arrow function expression values.
|
|
208
|
-
- Allowed `modifiers`: `abstract`, `private`, `protected`, `public`, `readonly`, `requiresQuotes`, `static`.
|
|
209
|
-
- Allowed `types`: `
|
|
207
|
+
- Allowed `modifiers`: `abstract`, `override`, `private`, `protected`, `public`, `readonly`, `requiresQuotes`, `static`.
|
|
208
|
+
- Allowed `types`: `array`, `boolean`, `function`, `number`, `string`.
|
|
210
209
|
- `objectLiteralProperty` - matches any object literal property. Does not match properties that have direct function expression or arrow function expression values.
|
|
211
210
|
- Allowed `modifiers`: `public`, `requiresQuotes`.
|
|
212
|
-
- Allowed `types`: `
|
|
211
|
+
- Allowed `types`: `array`, `boolean`, `function`, `number`, `string`.
|
|
213
212
|
- `typeProperty` - matches any object type property. Does not match properties that have direct function expression or arrow function expression values.
|
|
214
213
|
- Allowed `modifiers`: `public`, `readonly`, `requiresQuotes`.
|
|
215
|
-
- Allowed `types`: `
|
|
214
|
+
- Allowed `types`: `array`, `boolean`, `function`, `number`, `string`.
|
|
216
215
|
- `parameterProperty` - matches any parameter property.
|
|
217
216
|
- Allowed `modifiers`: `private`, `protected`, `public`, `readonly`.
|
|
218
|
-
- Allowed `types`: `
|
|
217
|
+
- Allowed `types`: `array`, `boolean`, `function`, `number`, `string`.
|
|
219
218
|
- `classMethod` - matches any class method. Also matches properties that have direct function expression or arrow function expression values. Does not match accessors.
|
|
220
|
-
- Allowed `modifiers`: `abstract`, `private`, `protected`, `public`, `requiresQuotes`, `static`.
|
|
219
|
+
- Allowed `modifiers`: `abstract`, `async`, `override`, `private`, `protected`, `public`, `requiresQuotes`, `static`.
|
|
221
220
|
- Allowed `types`: none.
|
|
222
221
|
- `objectLiteralMethod` - matches any object literal method. Also matches properties that have direct function expression or arrow function expression values. Does not match accessors.
|
|
223
|
-
- Allowed `modifiers`: `public`, `requiresQuotes`.
|
|
222
|
+
- Allowed `modifiers`: `async`, `public`, `requiresQuotes`.
|
|
224
223
|
- Allowed `types`: none.
|
|
225
224
|
- `typeMethod` - matches any object type method. Also matches properties that have direct function expression or arrow function expression values. Does not match accessors.
|
|
226
225
|
- Allowed `modifiers`: `public`, `requiresQuotes`.
|
|
227
226
|
- Allowed `types`: none.
|
|
228
227
|
- `accessor` - matches any accessor.
|
|
229
|
-
- Allowed `modifiers`: `abstract`, `private`, `protected`, `public`, `requiresQuotes`, `static`.
|
|
230
|
-
- Allowed `types`: `
|
|
228
|
+
- Allowed `modifiers`: `abstract`, `override`, `private`, `protected`, `public`, `requiresQuotes`, `static`.
|
|
229
|
+
- Allowed `types`: `array`, `boolean`, `function`, `number`, `string`.
|
|
231
230
|
- `enumMember` - matches any enum member.
|
|
232
231
|
- Allowed `modifiers`: `requiresQuotes`.
|
|
233
232
|
- Allowed `types`: none.
|
|
@@ -254,20 +253,20 @@ Group Selectors are provided for convenience, and essentially bundle up sets of
|
|
|
254
253
|
- `default` - matches everything.
|
|
255
254
|
- Allowed `modifiers`: all modifiers.
|
|
256
255
|
- Allowed `types`: none.
|
|
257
|
-
- `variableLike` - matches the same as `
|
|
258
|
-
- Allowed `modifiers`: `unused`.
|
|
256
|
+
- `variableLike` - matches the same as `function`, `parameter` and `variable`.
|
|
257
|
+
- Allowed `modifiers`: `async`, `unused`.
|
|
259
258
|
- Allowed `types`: none.
|
|
260
|
-
- `memberLike` - matches the same as `
|
|
261
|
-
- Allowed `modifiers`: `private`, `protected`, `public`, `
|
|
259
|
+
- `memberLike` - matches the same as `accessor`, `enumMember`, `method`, `parameterProperty`, `property`.
|
|
260
|
+
- Allowed `modifiers`: `abstract`, `async`, `override`, `private`, `protected`, `public`, `readonly`, `requiresQuotes`, `static`.
|
|
262
261
|
- Allowed `types`: none.
|
|
263
|
-
- `typeLike` - matches the same as `class`, `
|
|
262
|
+
- `typeLike` - matches the same as `class`, `enum`, `interface`, `typeAlias`, `typeParameter`.
|
|
264
263
|
- Allowed `modifiers`: `abstract`, `unused`.
|
|
265
264
|
- Allowed `types`: none.
|
|
266
265
|
- `property` - matches the same as `classProperty`, `objectLiteralProperty`, `typeProperty`.
|
|
267
|
-
- Allowed `modifiers`: `private`, `protected`, `public`, `
|
|
268
|
-
- Allowed `types`: `
|
|
266
|
+
- Allowed `modifiers`: `abstract`, `async`, `override`, `private`, `protected`, `public`, `readonly`, `requiresQuotes`, `static`.
|
|
267
|
+
- Allowed `types`: `array`, `boolean`, `function`, `number`, `string`.
|
|
269
268
|
- `method` - matches the same as `classMethod`, `objectLiteralMethod`, `typeMethod`.
|
|
270
|
-
- Allowed `modifiers`: `private`, `protected`, `public`, `
|
|
269
|
+
- Allowed `modifiers`: `abstract`, `async`, `override`, `private`, `protected`, `public`, `readonly`, `requiresQuotes`, `static`.
|
|
271
270
|
- Allowed `types`: none.
|
|
272
271
|
|
|
273
272
|
## FAQ
|
|
@@ -6,7 +6,7 @@ description: 'Disallow generic `Array` constructors.'
|
|
|
6
6
|
>
|
|
7
7
|
> See **https://typescript-eslint.io/rules/no-array-constructor** for documentation.
|
|
8
8
|
|
|
9
|
-
##
|
|
9
|
+
## Examples
|
|
10
10
|
|
|
11
11
|
This rule extends the base [`eslint/no-array-constructor`](https://eslint.org/docs/rules/no-array-constructor) rule.
|
|
12
12
|
It adds support for the generically typed `Array` constructor (`new Array<Foo>()`).
|
|
@@ -6,20 +6,14 @@ description: 'Require `.toString()` to only be called on objects which provide u
|
|
|
6
6
|
>
|
|
7
7
|
> See **https://typescript-eslint.io/rules/no-base-to-string** for documentation.
|
|
8
8
|
|
|
9
|
-
Requires `.toString()` to only be called on objects which provide useful information when stringified.
|
|
10
|
-
|
|
11
9
|
JavaScript will call `toString()` on an object when it is converted to a string, such as when `+` adding to a string or in `${}` template literals.
|
|
10
|
+
The default Object `.toString()` returns `"[object Object]"`, which is often not what was intended.
|
|
11
|
+
This rule reports on stringified values that aren't primitives and don't define a more useful `.toString()` method.
|
|
12
12
|
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
Note that `Function` provides its own `.toString()` that returns the function's code.
|
|
16
|
-
Functions are not flagged by this rule.
|
|
17
|
-
|
|
18
|
-
This rule has some overlap with [`restrict-plus-operands`](./restrict-plus-operands.md) and [`restrict-template-expressions`](./restrict-template-expressions.md).
|
|
19
|
-
|
|
20
|
-
## Rule Details
|
|
13
|
+
> Note that `Function` provides its own `.toString()` that returns the function's code.
|
|
14
|
+
> Functions are not flagged by this rule.
|
|
21
15
|
|
|
22
|
-
|
|
16
|
+
## Examples
|
|
23
17
|
|
|
24
18
|
<!--tabs-->
|
|
25
19
|
|
|
@@ -84,4 +78,11 @@ let text = `${value}`;
|
|
|
84
78
|
|
|
85
79
|
If you don't mind `"[object Object]"` in your strings, then you will not need this rule.
|
|
86
80
|
|
|
81
|
+
## Related To
|
|
82
|
+
|
|
83
|
+
- [`restrict-plus-operands`](./restrict-plus-operands.md)
|
|
84
|
+
- [`restrict-template-expressions`](./restrict-template-expressions.md)
|
|
85
|
+
|
|
86
|
+
## Further Reading
|
|
87
|
+
|
|
87
88
|
- [`Object.prototype.toString()` MDN documentation](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/toString)
|
package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-confusing-non-null-assertion.md
CHANGED
|
@@ -6,8 +6,6 @@ description: 'Disallow non-null assertion in locations that may be confusing.'
|
|
|
6
6
|
>
|
|
7
7
|
> See **https://typescript-eslint.io/rules/no-confusing-non-null-assertion** for documentation.
|
|
8
8
|
|
|
9
|
-
## Rule Details
|
|
10
|
-
|
|
11
9
|
Using a non-null assertion (`!`) next to an assign or equals check (`=` or `==` or `===`) creates code that is confusing as it looks similar to a not equals check (`!=` `!==`).
|
|
12
10
|
|
|
13
11
|
```typescript
|
|
@@ -16,6 +14,10 @@ a !== b; // not equals test(`!==`)
|
|
|
16
14
|
a! === b; // a non-null assertions(`!`) and an triple equals test(`===`)
|
|
17
15
|
```
|
|
18
16
|
|
|
17
|
+
This rule flags confusing `!` assertions and suggests either removing them or wrapping the asserted expression in `()` parenthesis.
|
|
18
|
+
|
|
19
|
+
## Examples
|
|
20
|
+
|
|
19
21
|
<!--tabs-->
|
|
20
22
|
|
|
21
23
|
### ❌ Incorrect
|
package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-confusing-void-expression.md
CHANGED
|
@@ -6,12 +6,11 @@ description: 'Require expressions of type void to appear in statement position.'
|
|
|
6
6
|
>
|
|
7
7
|
> See **https://typescript-eslint.io/rules/no-confusing-void-expression** for documentation.
|
|
8
8
|
|
|
9
|
-
|
|
10
|
-
Attempting to
|
|
11
|
-
|
|
12
|
-
who don't know what a particular function does and if its result matters.
|
|
9
|
+
`void` in TypeScript refers to a function return that is meant to be ignored.
|
|
10
|
+
Attempting to use a `void`-typed value, such as storing the result of a called function in a variable, is often a sign of a programmer error.
|
|
11
|
+
`void` can also be misleading for other developers even if used correctly.
|
|
13
12
|
|
|
14
|
-
This rule
|
|
13
|
+
This rule prevents `void` type expressions from being used in misleading locations such as being assigned to a variable, provided as a function argument, or returned from a function.
|
|
15
14
|
|
|
16
15
|
## Examples
|
|
17
16
|
|
|
@@ -6,7 +6,7 @@ description: 'Disallow duplicate class members.'
|
|
|
6
6
|
>
|
|
7
7
|
> See **https://typescript-eslint.io/rules/no-dupe-class-members** for documentation.
|
|
8
8
|
|
|
9
|
-
##
|
|
9
|
+
## Examples
|
|
10
10
|
|
|
11
11
|
This rule extends the base [`eslint/no-dupe-class-members`](https://eslint.org/docs/rules/no-dupe-class-members) rule.
|
|
12
12
|
It adds support for TypeScript's method overload definitions.
|
package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-duplicate-enum-values.md
CHANGED
|
@@ -8,9 +8,12 @@ description: 'Disallow duplicate enum member values.'
|
|
|
8
8
|
|
|
9
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.
|
|
10
10
|
|
|
11
|
-
##
|
|
11
|
+
## Examples
|
|
12
12
|
|
|
13
|
-
This rule disallows defining an enum with multiple members initialized to the same value.
|
|
13
|
+
This rule disallows defining an enum with multiple members initialized to the same value.
|
|
14
|
+
|
|
15
|
+
> This rule only enforces on enum members initialized with string or number literals.
|
|
16
|
+
> Members without an initializer or initialized with an expression are not checked by this rule.
|
|
14
17
|
|
|
15
18
|
<!--tabs-->
|
|
16
19
|
|
|
@@ -7,12 +7,12 @@ description: 'Disallow using the `delete` operator on computed key expressions.'
|
|
|
7
7
|
> See **https://typescript-eslint.io/rules/no-dynamic-delete** for documentation.
|
|
8
8
|
|
|
9
9
|
Deleting dynamically computed keys can be dangerous and in some cases not well optimized.
|
|
10
|
-
|
|
11
|
-
## Rule Details
|
|
12
|
-
|
|
13
10
|
Using the `delete` operator on keys that aren't runtime constants could be a sign that you're using the wrong data structures.
|
|
14
11
|
Using `Object`s with added and removed keys can cause occasional edge case bugs, such as if a key is named `"hasOwnProperty"`.
|
|
15
|
-
|
|
12
|
+
|
|
13
|
+
> Consider using a `Map` or `Set` if you’re storing collections of objects.
|
|
14
|
+
|
|
15
|
+
## Examples
|
|
16
16
|
|
|
17
17
|
<!--tabs-->
|
|
18
18
|
|
|
@@ -6,7 +6,7 @@ description: 'Disallow empty functions.'
|
|
|
6
6
|
>
|
|
7
7
|
> See **https://typescript-eslint.io/rules/no-empty-function** for documentation.
|
|
8
8
|
|
|
9
|
-
##
|
|
9
|
+
## Examples
|
|
10
10
|
|
|
11
11
|
This rule extends the base [`eslint/no-empty-function`](https://eslint.org/docs/rules/no-empty-function) rule.
|
|
12
12
|
It adds support for handling TypeScript specific code that would otherwise trigger the rule.
|
|
@@ -6,13 +6,13 @@ description: 'Disallow the declaration of empty interfaces.'
|
|
|
6
6
|
>
|
|
7
7
|
> See **https://typescript-eslint.io/rules/no-empty-interface** for documentation.
|
|
8
8
|
|
|
9
|
-
An empty interface
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
## Rule Details
|
|
9
|
+
An empty interface in TypeScript does very little: any non-nullable value is assignable to `{}`.
|
|
10
|
+
Using an empty interface is often a sign of programmer error, such as misunderstanding the concept of `{}` or forgetting to fill in fields.
|
|
13
11
|
|
|
14
12
|
This rule aims to ensure that only meaningful interfaces are declared in the code.
|
|
15
13
|
|
|
14
|
+
## Examples
|
|
15
|
+
|
|
16
16
|
<!--tabs-->
|
|
17
17
|
|
|
18
18
|
### ❌ Incorrect
|
|
@@ -48,7 +48,7 @@ interface Baz extends Foo, Bar {}
|
|
|
48
48
|
|
|
49
49
|
<!--/tabs-->
|
|
50
50
|
|
|
51
|
-
|
|
51
|
+
## Options
|
|
52
52
|
|
|
53
53
|
This rule accepts a single object option with the following default configuration:
|
|
54
54
|
|
|
@@ -6,16 +6,13 @@ description: 'Disallow the `any` type.'
|
|
|
6
6
|
>
|
|
7
7
|
> See **https://typescript-eslint.io/rules/no-explicit-any** for documentation.
|
|
8
8
|
|
|
9
|
-
|
|
10
|
-
|
|
9
|
+
The `any` type in TypeScript is a dangerous "escape hatch" from the type system.
|
|
10
|
+
Using `any` disables many type checking rules and is generally best used only as a last resort or when prototyping code.
|
|
11
|
+
This rule reports on explicit uses of the `any` keyword as a type annotation.
|
|
11
12
|
|
|
12
|
-
|
|
13
|
+
> TypeScript's `--noImplicitAny` compiler option prevents an implied `any`, but doesn't prevent `any` from being explicitly used the way this rule does.
|
|
13
14
|
|
|
14
|
-
|
|
15
|
-
It aims to keep TypeScript maximally useful.
|
|
16
|
-
TypeScript has a compiler flag for `--noImplicitAny` that will prevent
|
|
17
|
-
an `any` type from being implied by the compiler, but doesn't prevent
|
|
18
|
-
`any` from being explicitly used.
|
|
15
|
+
## Examples
|
|
19
16
|
|
|
20
17
|
<!--tabs-->
|
|
21
18
|
|
|
@@ -164,6 +161,14 @@ interface Garply {
|
|
|
164
161
|
If an unknown type or a library without typings is used
|
|
165
162
|
and you want to be able to specify `any`.
|
|
166
163
|
|
|
164
|
+
## Related To
|
|
165
|
+
|
|
166
|
+
- [`no-unsafe-argument`](./no-unsafe-argument.md)
|
|
167
|
+
- [`no-unsafe-assignment`](./no-unsafe-assignment.md)
|
|
168
|
+
- [`no-unsafe-call`](./no-unsafe-call.md)
|
|
169
|
+
- [`no-unsafe-member-access`](./no-unsafe-member-access.md)
|
|
170
|
+
- [`no-unsafe-return`](./no-unsafe-return.md)
|
|
171
|
+
|
|
167
172
|
## Further Reading
|
|
168
173
|
|
|
169
174
|
- TypeScript [any type](https://www.typescriptlang.org/docs/handbook/basic-types.html#any)
|
package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-extra-non-null-assertion.md
CHANGED
|
@@ -1,14 +1,15 @@
|
|
|
1
1
|
---
|
|
2
|
-
description: 'Disallow extra non-null
|
|
2
|
+
description: 'Disallow extra non-null assertions.'
|
|
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/no-extra-non-null-assertion** for documentation.
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
The `!` non-null assertion operator in TypeScript is used to assert that a value's type does not include `null` or `undefined`.
|
|
10
|
+
Using the operator any more than once on a single value does nothing.
|
|
10
11
|
|
|
11
|
-
Examples
|
|
12
|
+
## Examples
|
|
12
13
|
|
|
13
14
|
<!--tabs-->
|
|
14
15
|
|
|
@@ -6,7 +6,7 @@ description: 'Disallow unnecessary parentheses.'
|
|
|
6
6
|
>
|
|
7
7
|
> See **https://typescript-eslint.io/rules/no-extra-parens** for documentation.
|
|
8
8
|
|
|
9
|
-
##
|
|
9
|
+
## Examples
|
|
10
10
|
|
|
11
11
|
This rule extends the base [`eslint/no-extra-parens`](https://eslint.org/docs/rules/no-extra-parens) rule.
|
|
12
12
|
It adds support for TypeScript type assertions.
|
|
@@ -6,7 +6,7 @@ description: 'Disallow unnecessary semicolons.'
|
|
|
6
6
|
>
|
|
7
7
|
> See **https://typescript-eslint.io/rules/no-extra-semi** for documentation.
|
|
8
8
|
|
|
9
|
-
##
|
|
9
|
+
## Examples
|
|
10
10
|
|
|
11
11
|
This rule extends the base [`eslint/no-extra-semi`](https://eslint.org/docs/rules/no-extra-semi) rule.
|
|
12
12
|
It adds support for class properties.
|
|
@@ -6,23 +6,21 @@ description: 'Disallow classes used as namespaces.'
|
|
|
6
6
|
>
|
|
7
7
|
> See **https://typescript-eslint.io/rules/no-extraneous-class** for documentation.
|
|
8
8
|
|
|
9
|
-
This rule
|
|
10
|
-
|
|
11
|
-
## Rule Details
|
|
9
|
+
This rule reports when a class has no non-static members, such as for a class used exclusively as a static namespace.
|
|
12
10
|
|
|
13
11
|
Users who come from a [OOP](https://en.wikipedia.org/wiki/Object-oriented_programming) paradigm may wrap their utility functions in an extra class, instead of putting them at the top level of an ECMAScript module.
|
|
14
12
|
Doing so is generally unnecessary in JavaScript and TypeScript projects.
|
|
15
13
|
|
|
16
14
|
- Wrapper classes add extra cognitive complexity to code without adding any structural improvements
|
|
17
15
|
- Whatever would be put on them, such as utility functions, are already organized by virtue of being in a module.
|
|
18
|
-
- As an alternative, you can
|
|
16
|
+
- As an alternative, you can `import * as ...` the module to get all of them in a single object.
|
|
19
17
|
- IDEs can't provide as good suggestions for static class or namespace imported properties when you start typing property names
|
|
20
18
|
- It's more difficult to statically analyze code for unused variables, etc. when they're all on the class (see: [Finding dead code (and dead types) in TypeScript](https://effectivetypescript.com/2020/10/20/tsprune)).
|
|
21
19
|
|
|
22
|
-
This rule also
|
|
20
|
+
This rule also reports classes that have only a constructor and no fields.
|
|
23
21
|
Those classes can generally be replaced with a standalone function.
|
|
24
22
|
|
|
25
|
-
Examples
|
|
23
|
+
## Examples
|
|
26
24
|
|
|
27
25
|
<!--tabs-->
|
|
28
26
|
|
|
@@ -7,9 +7,9 @@ description: 'Require Promise-like statements to be handled appropriately.'
|
|
|
7
7
|
> See **https://typescript-eslint.io/rules/no-floating-promises** for documentation.
|
|
8
8
|
|
|
9
9
|
A "floating" Promise is one that is created without any code set up to handle any errors it might throw.
|
|
10
|
-
|
|
11
10
|
Floating Promises can cause several issues, such as improperly sequenced operations, ignored Promise rejections, and more.
|
|
12
11
|
|
|
12
|
+
This rule reports when a Promise is created and not properly handled.
|
|
13
13
|
Valid ways of handling a Promise-valued statement include:
|
|
14
14
|
|
|
15
15
|
- `await`ing it
|
|
@@ -22,9 +22,7 @@ Valid ways of handling a Promise-valued statement include:
|
|
|
22
22
|
See [`no-misused-promises`](./no-misused-promises.md) for detecting code that provides Promises to _logical_ locations such as if statements.
|
|
23
23
|
:::
|
|
24
24
|
|
|
25
|
-
##
|
|
26
|
-
|
|
27
|
-
Examples of code for this rule:
|
|
25
|
+
## Examples
|
|
28
26
|
|
|
29
27
|
<!--tabs-->
|
|
30
28
|
|