From 63cba5f4c1884e102927b3b14b18a00e96ac63a1 Mon Sep 17 00:00:00 2001 From: Josh Goldberg Date: Sun, 7 Aug 2022 11:53:38 -0400 Subject: [PATCH] fix(website): add explicit frontmatter description to rule docs (#5429) --- .../rules/adjacent-overload-signatures.md | 4 ++ .../eslint-plugin/docs/rules/array-type.md | 4 ++ .../docs/rules/await-thenable.md | 4 ++ .../docs/rules/ban-ts-comment.md | 4 ++ .../docs/rules/ban-tslint-comment.md | 4 ++ .../eslint-plugin/docs/rules/ban-types.md | 4 ++ .../eslint-plugin/docs/rules/brace-style.md | 4 ++ .../rules/class-literal-property-style.md | 4 ++ .../eslint-plugin/docs/rules/comma-dangle.md | 4 ++ .../eslint-plugin/docs/rules/comma-spacing.md | 4 ++ .../rules/consistent-generic-constructors.md | 4 ++ .../rules/consistent-indexed-object-style.md | 4 ++ .../docs/rules/consistent-type-assertions.md | 4 ++ .../docs/rules/consistent-type-definitions.md | 4 ++ .../docs/rules/consistent-type-exports.md | 4 ++ .../docs/rules/consistent-type-imports.md | 4 ++ .../docs/rules/default-param-last.md | 4 ++ .../eslint-plugin/docs/rules/dot-notation.md | 4 ++ .../rules/explicit-function-return-type.md | 4 ++ .../rules/explicit-member-accessibility.md | 4 ++ .../rules/explicit-module-boundary-types.md | 4 ++ .../docs/rules/func-call-spacing.md | 4 ++ packages/eslint-plugin/docs/rules/indent.md | 4 ++ .../docs/rules/init-declarations.md | 4 ++ .../docs/rules/keyword-spacing.md | 4 ++ .../docs/rules/lines-between-class-members.md | 4 ++ .../docs/rules/member-delimiter-style.md | 4 ++ .../docs/rules/member-ordering.md | 4 ++ .../docs/rules/method-signature-style.md | 4 ++ .../docs/rules/naming-convention.md | 4 ++ .../docs/rules/no-array-constructor.md | 4 ++ .../docs/rules/no-base-to-string.md | 4 ++ .../rules/no-confusing-non-null-assertion.md | 4 ++ .../rules/no-confusing-void-expression.md | 4 ++ .../docs/rules/no-dupe-class-members.md | 4 ++ .../docs/rules/no-duplicate-enum-values.md | 4 ++ .../docs/rules/no-duplicate-imports.md | 4 ++ .../docs/rules/no-dynamic-delete.md | 4 ++ .../docs/rules/no-empty-function.md | 4 ++ .../docs/rules/no-empty-interface.md | 4 ++ .../docs/rules/no-explicit-any.md | 4 ++ .../docs/rules/no-extra-non-null-assertion.md | 4 ++ .../docs/rules/no-extra-parens.md | 4 ++ .../eslint-plugin/docs/rules/no-extra-semi.md | 4 ++ .../docs/rules/no-extraneous-class.md | 4 ++ .../docs/rules/no-floating-promises.md | 4 ++ .../docs/rules/no-for-in-array.md | 4 ++ .../docs/rules/no-implicit-any-catch.md | 4 ++ .../docs/rules/no-implied-eval.md | 4 ++ .../docs/rules/no-inferrable-types.md | 4 ++ .../docs/rules/no-invalid-this.md | 4 ++ .../docs/rules/no-invalid-void-type.md | 4 ++ .../eslint-plugin/docs/rules/no-loop-func.md | 4 ++ .../docs/rules/no-loss-of-precision.md | 4 ++ .../docs/rules/no-magic-numbers.md | 4 ++ .../rules/no-meaningless-void-operator.md | 4 ++ .../docs/rules/no-misused-new.md | 4 ++ .../docs/rules/no-misused-promises.md | 4 ++ .../eslint-plugin/docs/rules/no-namespace.md | 4 ++ ...no-non-null-asserted-nullish-coalescing.md | 4 ++ .../no-non-null-asserted-optional-chain.md | 4 ++ .../docs/rules/no-non-null-assertion.md | 4 ++ .../docs/rules/no-parameter-properties.md | 4 ++ .../eslint-plugin/docs/rules/no-redeclare.md | 4 ++ .../rules/no-redundant-type-constituents.md | 4 ++ .../docs/rules/no-require-imports.md | 4 ++ .../docs/rules/no-restricted-imports.md | 4 ++ .../eslint-plugin/docs/rules/no-shadow.md | 4 ++ .../eslint-plugin/docs/rules/no-this-alias.md | 4 ++ .../docs/rules/no-throw-literal.md | 4 ++ .../eslint-plugin/docs/rules/no-type-alias.md | 4 ++ .../no-unnecessary-boolean-literal-compare.md | 4 ++ .../docs/rules/no-unnecessary-condition.md | 4 ++ .../docs/rules/no-unnecessary-qualifier.md | 4 ++ .../rules/no-unnecessary-type-arguments.md | 4 ++ .../rules/no-unnecessary-type-assertion.md | 4 ++ .../rules/no-unnecessary-type-constraint.md | 4 ++ .../docs/rules/no-unsafe-argument.md | 4 ++ .../docs/rules/no-unsafe-assignment.md | 4 ++ .../docs/rules/no-unsafe-call.md | 4 ++ .../docs/rules/no-unsafe-member-access.md | 4 ++ .../docs/rules/no-unsafe-return.md | 4 ++ .../docs/rules/no-unused-expressions.md | 4 ++ .../docs/rules/no-unused-vars.md | 4 ++ .../docs/rules/no-use-before-define.md | 4 ++ .../docs/rules/no-useless-constructor.md | 4 ++ .../docs/rules/no-useless-empty-export.md | 4 ++ .../docs/rules/no-var-requires.md | 4 ++ .../non-nullable-type-assertion-style.md | 4 ++ .../docs/rules/object-curly-spacing.md | 4 ++ .../rules/padding-line-between-statements.md | 4 ++ .../docs/rules/parameter-properties.md | 4 ++ .../docs/rules/prefer-as-const.md | 4 ++ .../docs/rules/prefer-enum-initializers.md | 4 ++ .../eslint-plugin/docs/rules/prefer-for-of.md | 4 ++ .../docs/rules/prefer-function-type.md | 4 ++ .../docs/rules/prefer-includes.md | 4 ++ .../docs/rules/prefer-literal-enum-member.md | 4 ++ .../docs/rules/prefer-namespace-keyword.md | 4 ++ .../docs/rules/prefer-nullish-coalescing.md | 4 ++ .../docs/rules/prefer-optional-chain.md | 4 ++ .../rules/prefer-readonly-parameter-types.md | 4 ++ .../docs/rules/prefer-readonly.md | 4 ++ .../rules/prefer-reduce-type-parameter.md | 4 ++ .../docs/rules/prefer-regexp-exec.md | 4 ++ .../docs/rules/prefer-return-this-type.md | 4 ++ .../rules/prefer-string-starts-ends-with.md | 4 ++ .../docs/rules/prefer-ts-expect-error.md | 4 ++ .../docs/rules/promise-function-async.md | 4 ++ packages/eslint-plugin/docs/rules/quotes.md | 4 ++ .../docs/rules/require-array-sort-compare.md | 4 ++ .../eslint-plugin/docs/rules/require-await.md | 4 ++ .../docs/rules/restrict-plus-operands.md | 4 ++ .../rules/restrict-template-expressions.md | 4 ++ .../eslint-plugin/docs/rules/return-await.md | 4 ++ packages/eslint-plugin/docs/rules/semi.md | 4 ++ .../sort-type-union-intersection-members.md | 4 ++ .../docs/rules/space-before-blocks.md | 4 ++ .../docs/rules/space-before-function-paren.md | 4 ++ .../docs/rules/space-infix-ops.md | 4 ++ .../docs/rules/strict-boolean-expressions.md | 4 ++ .../docs/rules/switch-exhaustiveness-check.md | 4 ++ .../docs/rules/triple-slash-reference.md | 4 ++ .../docs/rules/type-annotation-spacing.md | 4 ++ packages/eslint-plugin/docs/rules/typedef.md | 4 ++ .../docs/rules/unbound-method.md | 4 ++ .../docs/rules/unified-signatures.md | 4 ++ packages/eslint-plugin/tests/docs.test.ts | 37 +++++++++++++------ 128 files changed, 534 insertions(+), 11 deletions(-) diff --git a/packages/eslint-plugin/docs/rules/adjacent-overload-signatures.md b/packages/eslint-plugin/docs/rules/adjacent-overload-signatures.md index 57677bd4ac1..27fc807e555 100644 --- a/packages/eslint-plugin/docs/rules/adjacent-overload-signatures.md +++ b/packages/eslint-plugin/docs/rules/adjacent-overload-signatures.md @@ -1,3 +1,7 @@ +--- +description: 'Require that member overloads be consecutive.' +--- + > 🛑 This file is source code, not the primary documentation location! 🛑 > > See **https://typescript-eslint.io/rules/adjacent-overload-signatures** for documentation. diff --git a/packages/eslint-plugin/docs/rules/array-type.md b/packages/eslint-plugin/docs/rules/array-type.md index 9a9ac0985bc..e72266ff31c 100644 --- a/packages/eslint-plugin/docs/rules/array-type.md +++ b/packages/eslint-plugin/docs/rules/array-type.md @@ -1,3 +1,7 @@ +--- +description: 'Require using either `T[]` or `Array` for arrays.' +--- + > 🛑 This file is source code, not the primary documentation location! 🛑 > > See **https://typescript-eslint.io/rules/array-type** for documentation. diff --git a/packages/eslint-plugin/docs/rules/await-thenable.md b/packages/eslint-plugin/docs/rules/await-thenable.md index d0d3d5f7d52..b47107e48df 100644 --- a/packages/eslint-plugin/docs/rules/await-thenable.md +++ b/packages/eslint-plugin/docs/rules/await-thenable.md @@ -1,3 +1,7 @@ +--- +description: 'Disallow awaiting a value that is not a Thenable.' +--- + > 🛑 This file is source code, not the primary documentation location! 🛑 > > See **https://typescript-eslint.io/rules/await-thenable** for documentation. diff --git a/packages/eslint-plugin/docs/rules/ban-ts-comment.md b/packages/eslint-plugin/docs/rules/ban-ts-comment.md index f560c55ff05..d658b599a00 100644 --- a/packages/eslint-plugin/docs/rules/ban-ts-comment.md +++ b/packages/eslint-plugin/docs/rules/ban-ts-comment.md @@ -1,3 +1,7 @@ +--- +description: 'Disallow `@ts-` comments or require descriptions after directive.' +--- + > 🛑 This file is source code, not the primary documentation location! 🛑 > > See **https://typescript-eslint.io/rules/ban-ts-comment** for documentation. diff --git a/packages/eslint-plugin/docs/rules/ban-tslint-comment.md b/packages/eslint-plugin/docs/rules/ban-tslint-comment.md index 3e5789bc005..9b37077d74b 100644 --- a/packages/eslint-plugin/docs/rules/ban-tslint-comment.md +++ b/packages/eslint-plugin/docs/rules/ban-tslint-comment.md @@ -1,3 +1,7 @@ +--- +description: 'Disallow `// tslint:` comments.' +--- + > 🛑 This file is source code, not the primary documentation location! 🛑 > > See **https://typescript-eslint.io/rules/ban-tslint-comment** for documentation. diff --git a/packages/eslint-plugin/docs/rules/ban-types.md b/packages/eslint-plugin/docs/rules/ban-types.md index 256b12372fe..ca557b88dab 100644 --- a/packages/eslint-plugin/docs/rules/ban-types.md +++ b/packages/eslint-plugin/docs/rules/ban-types.md @@ -1,3 +1,7 @@ +--- +description: 'Disallow certain types.' +--- + > 🛑 This file is source code, not the primary documentation location! 🛑 > > See **https://typescript-eslint.io/rules/ban-types** for documentation. diff --git a/packages/eslint-plugin/docs/rules/brace-style.md b/packages/eslint-plugin/docs/rules/brace-style.md index 923a841fcbd..3487df67fb3 100644 --- a/packages/eslint-plugin/docs/rules/brace-style.md +++ b/packages/eslint-plugin/docs/rules/brace-style.md @@ -1,3 +1,7 @@ +--- +description: 'Enforce consistent brace style for blocks.' +--- + > 🛑 This file is source code, not the primary documentation location! 🛑 > > See **https://typescript-eslint.io/rules/brace-style** for documentation. diff --git a/packages/eslint-plugin/docs/rules/class-literal-property-style.md b/packages/eslint-plugin/docs/rules/class-literal-property-style.md index 5b577e16136..787a496eb64 100644 --- a/packages/eslint-plugin/docs/rules/class-literal-property-style.md +++ b/packages/eslint-plugin/docs/rules/class-literal-property-style.md @@ -1,3 +1,7 @@ +--- +description: 'Enforce that literals on classes are exposed in a consistent style.' +--- + > 🛑 This file is source code, not the primary documentation location! 🛑 > > See **https://typescript-eslint.io/rules/class-literal-property-style** for documentation. diff --git a/packages/eslint-plugin/docs/rules/comma-dangle.md b/packages/eslint-plugin/docs/rules/comma-dangle.md index 0af19151a0e..839347cb7d2 100644 --- a/packages/eslint-plugin/docs/rules/comma-dangle.md +++ b/packages/eslint-plugin/docs/rules/comma-dangle.md @@ -1,3 +1,7 @@ +--- +description: 'Require or disallow trailing commas.' +--- + > 🛑 This file is source code, not the primary documentation location! 🛑 > > See **https://typescript-eslint.io/rules/comma-dangle** for documentation. diff --git a/packages/eslint-plugin/docs/rules/comma-spacing.md b/packages/eslint-plugin/docs/rules/comma-spacing.md index 28ea99602d9..0ff484dac16 100644 --- a/packages/eslint-plugin/docs/rules/comma-spacing.md +++ b/packages/eslint-plugin/docs/rules/comma-spacing.md @@ -1,3 +1,7 @@ +--- +description: 'Enforce consistent spacing before and after commas.' +--- + > 🛑 This file is source code, not the primary documentation location! 🛑 > > See **https://typescript-eslint.io/rules/comma-spacing** for documentation. diff --git a/packages/eslint-plugin/docs/rules/consistent-generic-constructors.md b/packages/eslint-plugin/docs/rules/consistent-generic-constructors.md index e62ba44bbb9..b16e411121c 100644 --- a/packages/eslint-plugin/docs/rules/consistent-generic-constructors.md +++ b/packages/eslint-plugin/docs/rules/consistent-generic-constructors.md @@ -1,3 +1,7 @@ +--- +description: 'Enforce specifying generic type arguments on type annotation or constructor name of a constructor call.' +--- + > 🛑 This file is source code, not the primary documentation location! 🛑 > > See **https://typescript-eslint.io/rules/consistent-generic-constructors** for documentation. diff --git a/packages/eslint-plugin/docs/rules/consistent-indexed-object-style.md b/packages/eslint-plugin/docs/rules/consistent-indexed-object-style.md index 56c22fec4db..474d7352632 100644 --- a/packages/eslint-plugin/docs/rules/consistent-indexed-object-style.md +++ b/packages/eslint-plugin/docs/rules/consistent-indexed-object-style.md @@ -1,3 +1,7 @@ +--- +description: 'Require or disallow the `Record` type.' +--- + > 🛑 This file is source code, not the primary documentation location! 🛑 > > See **https://typescript-eslint.io/rules/consistent-indexed-object-style** for documentation. diff --git a/packages/eslint-plugin/docs/rules/consistent-type-assertions.md b/packages/eslint-plugin/docs/rules/consistent-type-assertions.md index bb624e83b9d..c8c19225917 100644 --- a/packages/eslint-plugin/docs/rules/consistent-type-assertions.md +++ b/packages/eslint-plugin/docs/rules/consistent-type-assertions.md @@ -1,3 +1,7 @@ +--- +description: 'Enforce consistent usage of type assertions.' +--- + > 🛑 This file is source code, not the primary documentation location! 🛑 > > See **https://typescript-eslint.io/rules/consistent-type-assertions** for documentation. diff --git a/packages/eslint-plugin/docs/rules/consistent-type-definitions.md b/packages/eslint-plugin/docs/rules/consistent-type-definitions.md index 625bb7ba493..f662841bfd5 100644 --- a/packages/eslint-plugin/docs/rules/consistent-type-definitions.md +++ b/packages/eslint-plugin/docs/rules/consistent-type-definitions.md @@ -1,3 +1,7 @@ +--- +description: 'Enforce type definitions to consistently use either `interface` or `type`.' +--- + > 🛑 This file is source code, not the primary documentation location! 🛑 > > See **https://typescript-eslint.io/rules/consistent-type-definitions** for documentation. diff --git a/packages/eslint-plugin/docs/rules/consistent-type-exports.md b/packages/eslint-plugin/docs/rules/consistent-type-exports.md index 5383a1225b1..2f5f7280251 100644 --- a/packages/eslint-plugin/docs/rules/consistent-type-exports.md +++ b/packages/eslint-plugin/docs/rules/consistent-type-exports.md @@ -1,3 +1,7 @@ +--- +description: 'Enforce consistent usage of type exports.' +--- + > 🛑 This file is source code, not the primary documentation location! 🛑 > > See **https://typescript-eslint.io/rules/consistent-type-exports** for documentation. diff --git a/packages/eslint-plugin/docs/rules/consistent-type-imports.md b/packages/eslint-plugin/docs/rules/consistent-type-imports.md index be63fff5551..192454f13e7 100644 --- a/packages/eslint-plugin/docs/rules/consistent-type-imports.md +++ b/packages/eslint-plugin/docs/rules/consistent-type-imports.md @@ -1,3 +1,7 @@ +--- +description: 'Enforce consistent usage of type imports.' +--- + > 🛑 This file is source code, not the primary documentation location! 🛑 > > See **https://typescript-eslint.io/rules/consistent-type-imports** for documentation. diff --git a/packages/eslint-plugin/docs/rules/default-param-last.md b/packages/eslint-plugin/docs/rules/default-param-last.md index 3de8f8c8cd7..ff5ad9facc3 100644 --- a/packages/eslint-plugin/docs/rules/default-param-last.md +++ b/packages/eslint-plugin/docs/rules/default-param-last.md @@ -1,3 +1,7 @@ +--- +description: 'Enforce default parameters to be last.' +--- + > 🛑 This file is source code, not the primary documentation location! 🛑 > > See **https://typescript-eslint.io/rules/default-param-last** for documentation. diff --git a/packages/eslint-plugin/docs/rules/dot-notation.md b/packages/eslint-plugin/docs/rules/dot-notation.md index e0c7b390e5a..6051e369c79 100644 --- a/packages/eslint-plugin/docs/rules/dot-notation.md +++ b/packages/eslint-plugin/docs/rules/dot-notation.md @@ -1,3 +1,7 @@ +--- +description: 'Enforce dot notation whenever possible.' +--- + > 🛑 This file is source code, not the primary documentation location! 🛑 > > See **https://typescript-eslint.io/rules/dot-notation** for documentation. diff --git a/packages/eslint-plugin/docs/rules/explicit-function-return-type.md b/packages/eslint-plugin/docs/rules/explicit-function-return-type.md index d42e793a5cb..e0b96592eda 100644 --- a/packages/eslint-plugin/docs/rules/explicit-function-return-type.md +++ b/packages/eslint-plugin/docs/rules/explicit-function-return-type.md @@ -1,3 +1,7 @@ +--- +description: 'Require explicit return types on functions and class methods.' +--- + > 🛑 This file is source code, not the primary documentation location! 🛑 > > See **https://typescript-eslint.io/rules/explicit-function-return-type** for documentation. diff --git a/packages/eslint-plugin/docs/rules/explicit-member-accessibility.md b/packages/eslint-plugin/docs/rules/explicit-member-accessibility.md index 98f297000bd..d32100f534e 100644 --- a/packages/eslint-plugin/docs/rules/explicit-member-accessibility.md +++ b/packages/eslint-plugin/docs/rules/explicit-member-accessibility.md @@ -1,3 +1,7 @@ +--- +description: 'Require explicit accessibility modifiers on class properties and methods.' +--- + > 🛑 This file is source code, not the primary documentation location! 🛑 > > See **https://typescript-eslint.io/rules/explicit-member-accessibility** for documentation. diff --git a/packages/eslint-plugin/docs/rules/explicit-module-boundary-types.md b/packages/eslint-plugin/docs/rules/explicit-module-boundary-types.md index 9aa84b23a7c..6c0525688c0 100644 --- a/packages/eslint-plugin/docs/rules/explicit-module-boundary-types.md +++ b/packages/eslint-plugin/docs/rules/explicit-module-boundary-types.md @@ -1,3 +1,7 @@ +--- +description: "Require explicit return and argument types on exported functions' and classes' public class methods." +--- + > 🛑 This file is source code, not the primary documentation location! 🛑 > > See **https://typescript-eslint.io/rules/explicit-module-boundary-types** for documentation. diff --git a/packages/eslint-plugin/docs/rules/func-call-spacing.md b/packages/eslint-plugin/docs/rules/func-call-spacing.md index 315e5388240..772c86e7c70 100644 --- a/packages/eslint-plugin/docs/rules/func-call-spacing.md +++ b/packages/eslint-plugin/docs/rules/func-call-spacing.md @@ -1,3 +1,7 @@ +--- +description: 'Require or disallow spacing between function identifiers and their invocations.' +--- + > 🛑 This file is source code, not the primary documentation location! 🛑 > > See **https://typescript-eslint.io/rules/func-call-spacing** for documentation. diff --git a/packages/eslint-plugin/docs/rules/indent.md b/packages/eslint-plugin/docs/rules/indent.md index 063087231a5..7f937d3747c 100644 --- a/packages/eslint-plugin/docs/rules/indent.md +++ b/packages/eslint-plugin/docs/rules/indent.md @@ -1,3 +1,7 @@ +--- +description: 'Enforce consistent indentation.' +--- + > 🛑 This file is source code, not the primary documentation location! 🛑 > > See **https://typescript-eslint.io/rules/indent** for documentation. diff --git a/packages/eslint-plugin/docs/rules/init-declarations.md b/packages/eslint-plugin/docs/rules/init-declarations.md index 3569bd70602..b03db42de89 100644 --- a/packages/eslint-plugin/docs/rules/init-declarations.md +++ b/packages/eslint-plugin/docs/rules/init-declarations.md @@ -1,3 +1,7 @@ +--- +description: 'Require or disallow initialization in variable declarations.' +--- + > 🛑 This file is source code, not the primary documentation location! 🛑 > > See **https://typescript-eslint.io/rules/init-declarations** for documentation. diff --git a/packages/eslint-plugin/docs/rules/keyword-spacing.md b/packages/eslint-plugin/docs/rules/keyword-spacing.md index 6bf0de5e187..062da325307 100644 --- a/packages/eslint-plugin/docs/rules/keyword-spacing.md +++ b/packages/eslint-plugin/docs/rules/keyword-spacing.md @@ -1,3 +1,7 @@ +--- +description: 'Enforce consistent spacing before and after keywords.' +--- + > 🛑 This file is source code, not the primary documentation location! 🛑 > > See **https://typescript-eslint.io/rules/keyword-spacing** for documentation. diff --git a/packages/eslint-plugin/docs/rules/lines-between-class-members.md b/packages/eslint-plugin/docs/rules/lines-between-class-members.md index 2d9de3a73ce..c1e3f773455 100644 --- a/packages/eslint-plugin/docs/rules/lines-between-class-members.md +++ b/packages/eslint-plugin/docs/rules/lines-between-class-members.md @@ -1,3 +1,7 @@ +--- +description: 'Require or disallow an empty line between class members.' +--- + > 🛑 This file is source code, not the primary documentation location! 🛑 > > See **https://typescript-eslint.io/rules/lines-between-class-members** for documentation. diff --git a/packages/eslint-plugin/docs/rules/member-delimiter-style.md b/packages/eslint-plugin/docs/rules/member-delimiter-style.md index 3935222e1c7..1437e97ba60 100644 --- a/packages/eslint-plugin/docs/rules/member-delimiter-style.md +++ b/packages/eslint-plugin/docs/rules/member-delimiter-style.md @@ -1,3 +1,7 @@ +--- +description: 'Require a specific member delimiter style for interfaces and type literals.' +--- + > 🛑 This file is source code, not the primary documentation location! 🛑 > > See **https://typescript-eslint.io/rules/member-delimiter-style** for documentation. diff --git a/packages/eslint-plugin/docs/rules/member-ordering.md b/packages/eslint-plugin/docs/rules/member-ordering.md index 35cc8ef6860..2765aeb5dd6 100644 --- a/packages/eslint-plugin/docs/rules/member-ordering.md +++ b/packages/eslint-plugin/docs/rules/member-ordering.md @@ -1,3 +1,7 @@ +--- +description: 'Require a consistent member declaration order.' +--- + > 🛑 This file is source code, not the primary documentation location! 🛑 > > See **https://typescript-eslint.io/rules/member-ordering** for documentation. diff --git a/packages/eslint-plugin/docs/rules/method-signature-style.md b/packages/eslint-plugin/docs/rules/method-signature-style.md index ad947db3261..4d6bea7ebdf 100644 --- a/packages/eslint-plugin/docs/rules/method-signature-style.md +++ b/packages/eslint-plugin/docs/rules/method-signature-style.md @@ -1,3 +1,7 @@ +--- +description: 'Enforce using a particular method signature syntax.' +--- + > 🛑 This file is source code, not the primary documentation location! 🛑 > > See **https://typescript-eslint.io/rules/method-signature-style** for documentation. diff --git a/packages/eslint-plugin/docs/rules/naming-convention.md b/packages/eslint-plugin/docs/rules/naming-convention.md index 08da84d15b4..ef6d82e8302 100644 --- a/packages/eslint-plugin/docs/rules/naming-convention.md +++ b/packages/eslint-plugin/docs/rules/naming-convention.md @@ -1,3 +1,7 @@ +--- +description: 'Enforce naming conventions for everything across a codebase.' +--- + > 🛑 This file is source code, not the primary documentation location! 🛑 > > See **https://typescript-eslint.io/rules/naming-convention** for documentation. diff --git a/packages/eslint-plugin/docs/rules/no-array-constructor.md b/packages/eslint-plugin/docs/rules/no-array-constructor.md index 6251ddf53dc..6d301cca2bd 100644 --- a/packages/eslint-plugin/docs/rules/no-array-constructor.md +++ b/packages/eslint-plugin/docs/rules/no-array-constructor.md @@ -1,3 +1,7 @@ +--- +description: 'Disallow generic `Array` constructors.' +--- + > 🛑 This file is source code, not the primary documentation location! 🛑 > > See **https://typescript-eslint.io/rules/no-array-constructor** for documentation. diff --git a/packages/eslint-plugin/docs/rules/no-base-to-string.md b/packages/eslint-plugin/docs/rules/no-base-to-string.md index 8e64d5eac78..cfc9007ca12 100644 --- a/packages/eslint-plugin/docs/rules/no-base-to-string.md +++ b/packages/eslint-plugin/docs/rules/no-base-to-string.md @@ -1,3 +1,7 @@ +--- +description: 'Require `.toString()` to only be called on objects which provide useful information when stringified.' +--- + > 🛑 This file is source code, not the primary documentation location! 🛑 > > See **https://typescript-eslint.io/rules/no-base-to-string** for documentation. diff --git a/packages/eslint-plugin/docs/rules/no-confusing-non-null-assertion.md b/packages/eslint-plugin/docs/rules/no-confusing-non-null-assertion.md index f77d111bc8c..43f2a34558e 100644 --- a/packages/eslint-plugin/docs/rules/no-confusing-non-null-assertion.md +++ b/packages/eslint-plugin/docs/rules/no-confusing-non-null-assertion.md @@ -1,3 +1,7 @@ +--- +description: 'Disallow non-null assertion in locations that may be confusing.' +--- + > 🛑 This file is source code, not the primary documentation location! 🛑 > > See **https://typescript-eslint.io/rules/no-confusing-non-null-assertion** for documentation. diff --git a/packages/eslint-plugin/docs/rules/no-confusing-void-expression.md b/packages/eslint-plugin/docs/rules/no-confusing-void-expression.md index b4d1503d306..7e5d8458468 100644 --- a/packages/eslint-plugin/docs/rules/no-confusing-void-expression.md +++ b/packages/eslint-plugin/docs/rules/no-confusing-void-expression.md @@ -1,3 +1,7 @@ +--- +description: 'Require expressions of type void to appear in statement position.' +--- + > 🛑 This file is source code, not the primary documentation location! 🛑 > > See **https://typescript-eslint.io/rules/no-confusing-void-expression** for documentation. diff --git a/packages/eslint-plugin/docs/rules/no-dupe-class-members.md b/packages/eslint-plugin/docs/rules/no-dupe-class-members.md index 32e6c5dfdfb..0e099a252cf 100644 --- a/packages/eslint-plugin/docs/rules/no-dupe-class-members.md +++ b/packages/eslint-plugin/docs/rules/no-dupe-class-members.md @@ -1,3 +1,7 @@ +--- +description: 'Disallow duplicate class members.' +--- + > 🛑 This file is source code, not the primary documentation location! 🛑 > > See **https://typescript-eslint.io/rules/no-dupe-class-members** for documentation. diff --git a/packages/eslint-plugin/docs/rules/no-duplicate-enum-values.md b/packages/eslint-plugin/docs/rules/no-duplicate-enum-values.md index 3e284d3eec6..f4f24cb2213 100644 --- a/packages/eslint-plugin/docs/rules/no-duplicate-enum-values.md +++ b/packages/eslint-plugin/docs/rules/no-duplicate-enum-values.md @@ -1,3 +1,7 @@ +--- +description: 'Disallow duplicate enum member values.' +--- + > 🛑 This file is source code, not the primary documentation location! 🛑 > > See **https://typescript-eslint.io/rules/no-duplicate-enum-values** for documentation. diff --git a/packages/eslint-plugin/docs/rules/no-duplicate-imports.md b/packages/eslint-plugin/docs/rules/no-duplicate-imports.md index 613043bedb4..d6ac06cac78 100644 --- a/packages/eslint-plugin/docs/rules/no-duplicate-imports.md +++ b/packages/eslint-plugin/docs/rules/no-duplicate-imports.md @@ -1,3 +1,7 @@ +--- +description: 'Disallow duplicate imports.' +--- + > 🛑 This file is source code, not the primary documentation location! 🛑 > > See **https://typescript-eslint.io/rules/no-duplicate-imports** for documentation. diff --git a/packages/eslint-plugin/docs/rules/no-dynamic-delete.md b/packages/eslint-plugin/docs/rules/no-dynamic-delete.md index 7c6090f812f..2ba81ffd88a 100644 --- a/packages/eslint-plugin/docs/rules/no-dynamic-delete.md +++ b/packages/eslint-plugin/docs/rules/no-dynamic-delete.md @@ -1,3 +1,7 @@ +--- +description: 'Disallow using the `delete` operator on computed key expressions.' +--- + > 🛑 This file is source code, not the primary documentation location! 🛑 > > See **https://typescript-eslint.io/rules/no-dynamic-delete** for documentation. diff --git a/packages/eslint-plugin/docs/rules/no-empty-function.md b/packages/eslint-plugin/docs/rules/no-empty-function.md index 121db4ff878..91335c1cb87 100644 --- a/packages/eslint-plugin/docs/rules/no-empty-function.md +++ b/packages/eslint-plugin/docs/rules/no-empty-function.md @@ -1,3 +1,7 @@ +--- +description: 'Disallow empty functions.' +--- + > 🛑 This file is source code, not the primary documentation location! 🛑 > > See **https://typescript-eslint.io/rules/no-empty-function** for documentation. diff --git a/packages/eslint-plugin/docs/rules/no-empty-interface.md b/packages/eslint-plugin/docs/rules/no-empty-interface.md index beed5a85ecc..17bebea168f 100644 --- a/packages/eslint-plugin/docs/rules/no-empty-interface.md +++ b/packages/eslint-plugin/docs/rules/no-empty-interface.md @@ -1,3 +1,7 @@ +--- +description: 'Disallow the declaration of empty interfaces.' +--- + > 🛑 This file is source code, not the primary documentation location! 🛑 > > See **https://typescript-eslint.io/rules/no-empty-interface** for documentation. diff --git a/packages/eslint-plugin/docs/rules/no-explicit-any.md b/packages/eslint-plugin/docs/rules/no-explicit-any.md index f8e42896dbd..1f9723aedba 100644 --- a/packages/eslint-plugin/docs/rules/no-explicit-any.md +++ b/packages/eslint-plugin/docs/rules/no-explicit-any.md @@ -1,3 +1,7 @@ +--- +description: 'Disallow the `any` type.' +--- + > 🛑 This file is source code, not the primary documentation location! 🛑 > > See **https://typescript-eslint.io/rules/no-explicit-any** for documentation. diff --git a/packages/eslint-plugin/docs/rules/no-extra-non-null-assertion.md b/packages/eslint-plugin/docs/rules/no-extra-non-null-assertion.md index 6c7068b693b..1a54ecc8c8d 100644 --- a/packages/eslint-plugin/docs/rules/no-extra-non-null-assertion.md +++ b/packages/eslint-plugin/docs/rules/no-extra-non-null-assertion.md @@ -1,3 +1,7 @@ +--- +description: 'Disallow extra non-null assertion.' +--- + > 🛑 This file is source code, not the primary documentation location! 🛑 > > See **https://typescript-eslint.io/rules/no-extra-non-null-assertion** for documentation. diff --git a/packages/eslint-plugin/docs/rules/no-extra-parens.md b/packages/eslint-plugin/docs/rules/no-extra-parens.md index 8bd5ac2c7d6..8707c381047 100644 --- a/packages/eslint-plugin/docs/rules/no-extra-parens.md +++ b/packages/eslint-plugin/docs/rules/no-extra-parens.md @@ -1,3 +1,7 @@ +--- +description: 'Disallow unnecessary parentheses.' +--- + > 🛑 This file is source code, not the primary documentation location! 🛑 > > See **https://typescript-eslint.io/rules/no-extra-parens** for documentation. diff --git a/packages/eslint-plugin/docs/rules/no-extra-semi.md b/packages/eslint-plugin/docs/rules/no-extra-semi.md index 0b94c91de59..4cf29eaaee3 100644 --- a/packages/eslint-plugin/docs/rules/no-extra-semi.md +++ b/packages/eslint-plugin/docs/rules/no-extra-semi.md @@ -1,3 +1,7 @@ +--- +description: 'Disallow unnecessary semicolons.' +--- + > 🛑 This file is source code, not the primary documentation location! 🛑 > > See **https://typescript-eslint.io/rules/no-extra-semi** for documentation. diff --git a/packages/eslint-plugin/docs/rules/no-extraneous-class.md b/packages/eslint-plugin/docs/rules/no-extraneous-class.md index fa990f2cebf..ecc01b9db50 100644 --- a/packages/eslint-plugin/docs/rules/no-extraneous-class.md +++ b/packages/eslint-plugin/docs/rules/no-extraneous-class.md @@ -1,3 +1,7 @@ +--- +description: 'Disallow classes used as namespaces.' +--- + > 🛑 This file is source code, not the primary documentation location! 🛑 > > See **https://typescript-eslint.io/rules/no-extraneous-class** for documentation. diff --git a/packages/eslint-plugin/docs/rules/no-floating-promises.md b/packages/eslint-plugin/docs/rules/no-floating-promises.md index 45fddc3c621..597ebcd7b50 100644 --- a/packages/eslint-plugin/docs/rules/no-floating-promises.md +++ b/packages/eslint-plugin/docs/rules/no-floating-promises.md @@ -1,3 +1,7 @@ +--- +description: 'Require Promise-like statements to be handled appropriately.' +--- + > 🛑 This file is source code, not the primary documentation location! 🛑 > > See **https://typescript-eslint.io/rules/no-floating-promises** for documentation. diff --git a/packages/eslint-plugin/docs/rules/no-for-in-array.md b/packages/eslint-plugin/docs/rules/no-for-in-array.md index 29d0c2548a4..2f4a5c699cc 100644 --- a/packages/eslint-plugin/docs/rules/no-for-in-array.md +++ b/packages/eslint-plugin/docs/rules/no-for-in-array.md @@ -1,3 +1,7 @@ +--- +description: 'Disallow iterating over an array with a for-in loop.' +--- + > 🛑 This file is source code, not the primary documentation location! 🛑 > > See **https://typescript-eslint.io/rules/no-for-in-array** for documentation. diff --git a/packages/eslint-plugin/docs/rules/no-implicit-any-catch.md b/packages/eslint-plugin/docs/rules/no-implicit-any-catch.md index 97afdfd5787..6b3d00db3ce 100644 --- a/packages/eslint-plugin/docs/rules/no-implicit-any-catch.md +++ b/packages/eslint-plugin/docs/rules/no-implicit-any-catch.md @@ -1,3 +1,7 @@ +--- +description: 'Disallow usage of the implicit `any` type in catch clauses.' +--- + > 🛑 This file is source code, not the primary documentation location! 🛑 > > See **https://typescript-eslint.io/rules/no-implicit-any-catch** for documentation. diff --git a/packages/eslint-plugin/docs/rules/no-implied-eval.md b/packages/eslint-plugin/docs/rules/no-implied-eval.md index 5cd9a9113a5..4bc269775c0 100644 --- a/packages/eslint-plugin/docs/rules/no-implied-eval.md +++ b/packages/eslint-plugin/docs/rules/no-implied-eval.md @@ -1,3 +1,7 @@ +--- +description: 'Disallow the use of `eval()`-like methods.' +--- + > 🛑 This file is source code, not the primary documentation location! 🛑 > > See **https://typescript-eslint.io/rules/no-implied-eval** for documentation. diff --git a/packages/eslint-plugin/docs/rules/no-inferrable-types.md b/packages/eslint-plugin/docs/rules/no-inferrable-types.md index 73fcfd7ae52..743efe03515 100644 --- a/packages/eslint-plugin/docs/rules/no-inferrable-types.md +++ b/packages/eslint-plugin/docs/rules/no-inferrable-types.md @@ -1,3 +1,7 @@ +--- +description: 'Disallow explicit type declarations for variables or parameters initialized to a number, string, or boolean.' +--- + > 🛑 This file is source code, not the primary documentation location! 🛑 > > See **https://typescript-eslint.io/rules/no-inferrable-types** for documentation. diff --git a/packages/eslint-plugin/docs/rules/no-invalid-this.md b/packages/eslint-plugin/docs/rules/no-invalid-this.md index 22e7de7260b..17cff6a0af4 100644 --- a/packages/eslint-plugin/docs/rules/no-invalid-this.md +++ b/packages/eslint-plugin/docs/rules/no-invalid-this.md @@ -1,3 +1,7 @@ +--- +description: 'Disallow `this` keywords outside of classes or class-like objects.' +--- + > 🛑 This file is source code, not the primary documentation location! 🛑 > > See **https://typescript-eslint.io/rules/no-invalid-this** for documentation. diff --git a/packages/eslint-plugin/docs/rules/no-invalid-void-type.md b/packages/eslint-plugin/docs/rules/no-invalid-void-type.md index 0b4f9338522..c39e932a778 100644 --- a/packages/eslint-plugin/docs/rules/no-invalid-void-type.md +++ b/packages/eslint-plugin/docs/rules/no-invalid-void-type.md @@ -1,3 +1,7 @@ +--- +description: 'Disallow `void` type outside of generic or return types.' +--- + > 🛑 This file is source code, not the primary documentation location! 🛑 > > See **https://typescript-eslint.io/rules/no-invalid-void-type** for documentation. diff --git a/packages/eslint-plugin/docs/rules/no-loop-func.md b/packages/eslint-plugin/docs/rules/no-loop-func.md index 906ab28e856..7a63fd52c7c 100644 --- a/packages/eslint-plugin/docs/rules/no-loop-func.md +++ b/packages/eslint-plugin/docs/rules/no-loop-func.md @@ -1,3 +1,7 @@ +--- +description: 'Disallow function declarations that contain unsafe references inside loop statements.' +--- + > 🛑 This file is source code, not the primary documentation location! 🛑 > > See **https://typescript-eslint.io/rules/no-loop-func** for documentation. diff --git a/packages/eslint-plugin/docs/rules/no-loss-of-precision.md b/packages/eslint-plugin/docs/rules/no-loss-of-precision.md index bf0ed85f39d..21ac3c6abb5 100644 --- a/packages/eslint-plugin/docs/rules/no-loss-of-precision.md +++ b/packages/eslint-plugin/docs/rules/no-loss-of-precision.md @@ -1,3 +1,7 @@ +--- +description: 'Disallow literal numbers that lose precision.' +--- + > 🛑 This file is source code, not the primary documentation location! 🛑 > > See **https://typescript-eslint.io/rules/no-loss-of-precision** for documentation. diff --git a/packages/eslint-plugin/docs/rules/no-magic-numbers.md b/packages/eslint-plugin/docs/rules/no-magic-numbers.md index b352b892ffc..1690ea371a7 100644 --- a/packages/eslint-plugin/docs/rules/no-magic-numbers.md +++ b/packages/eslint-plugin/docs/rules/no-magic-numbers.md @@ -1,3 +1,7 @@ +--- +description: 'Disallow magic numbers.' +--- + > 🛑 This file is source code, not the primary documentation location! 🛑 > > See **https://typescript-eslint.io/rules/no-magic-numbers** for documentation. diff --git a/packages/eslint-plugin/docs/rules/no-meaningless-void-operator.md b/packages/eslint-plugin/docs/rules/no-meaningless-void-operator.md index e0aba22a723..d99347a7514 100644 --- a/packages/eslint-plugin/docs/rules/no-meaningless-void-operator.md +++ b/packages/eslint-plugin/docs/rules/no-meaningless-void-operator.md @@ -1,3 +1,7 @@ +--- +description: 'Disallow the `void` operator except when used to discard a value.' +--- + > 🛑 This file is source code, not the primary documentation location! 🛑 > > See **https://typescript-eslint.io/rules/no-meaningless-void-operator** for documentation. diff --git a/packages/eslint-plugin/docs/rules/no-misused-new.md b/packages/eslint-plugin/docs/rules/no-misused-new.md index b79af1f3eb3..bc602bcc6e8 100644 --- a/packages/eslint-plugin/docs/rules/no-misused-new.md +++ b/packages/eslint-plugin/docs/rules/no-misused-new.md @@ -1,3 +1,7 @@ +--- +description: 'Enforce valid definition of `new` and `constructor`.' +--- + > 🛑 This file is source code, not the primary documentation location! 🛑 > > See **https://typescript-eslint.io/rules/no-misused-new** for documentation. diff --git a/packages/eslint-plugin/docs/rules/no-misused-promises.md b/packages/eslint-plugin/docs/rules/no-misused-promises.md index 62156bc8f13..6e75b5db103 100644 --- a/packages/eslint-plugin/docs/rules/no-misused-promises.md +++ b/packages/eslint-plugin/docs/rules/no-misused-promises.md @@ -1,3 +1,7 @@ +--- +description: 'Disallow Promises in places not designed to handle them.' +--- + > 🛑 This file is source code, not the primary documentation location! 🛑 > > See **https://typescript-eslint.io/rules/no-misused-promises** for documentation. diff --git a/packages/eslint-plugin/docs/rules/no-namespace.md b/packages/eslint-plugin/docs/rules/no-namespace.md index f59c865c5b7..665bf273d26 100644 --- a/packages/eslint-plugin/docs/rules/no-namespace.md +++ b/packages/eslint-plugin/docs/rules/no-namespace.md @@ -1,3 +1,7 @@ +--- +description: 'Disallow custom TypeScript modules and namespaces.' +--- + > 🛑 This file is source code, not the primary documentation location! 🛑 > > See **https://typescript-eslint.io/rules/no-namespace** for documentation. diff --git a/packages/eslint-plugin/docs/rules/no-non-null-asserted-nullish-coalescing.md b/packages/eslint-plugin/docs/rules/no-non-null-asserted-nullish-coalescing.md index b9008a8f78c..68a33404263 100644 --- a/packages/eslint-plugin/docs/rules/no-non-null-asserted-nullish-coalescing.md +++ b/packages/eslint-plugin/docs/rules/no-non-null-asserted-nullish-coalescing.md @@ -1,3 +1,7 @@ +--- +description: 'Disallow non-null assertions in the left operand of a nullish coalescing operator.' +--- + > 🛑 This file is source code, not the primary documentation location! 🛑 > > See **https://typescript-eslint.io/rules/no-non-null-asserted-nullish-coalescing** for documentation. diff --git a/packages/eslint-plugin/docs/rules/no-non-null-asserted-optional-chain.md b/packages/eslint-plugin/docs/rules/no-non-null-asserted-optional-chain.md index aff4d5b47c4..b68e55a8256 100644 --- a/packages/eslint-plugin/docs/rules/no-non-null-asserted-optional-chain.md +++ b/packages/eslint-plugin/docs/rules/no-non-null-asserted-optional-chain.md @@ -1,3 +1,7 @@ +--- +description: 'Disallow non-null assertions after an optional chain expression.' +--- + > 🛑 This file is source code, not the primary documentation location! 🛑 > > See **https://typescript-eslint.io/rules/no-non-null-asserted-optional-chain** for documentation. diff --git a/packages/eslint-plugin/docs/rules/no-non-null-assertion.md b/packages/eslint-plugin/docs/rules/no-non-null-assertion.md index 0eb9b4970c5..3b23982fd28 100644 --- a/packages/eslint-plugin/docs/rules/no-non-null-assertion.md +++ b/packages/eslint-plugin/docs/rules/no-non-null-assertion.md @@ -1,3 +1,7 @@ +--- +description: 'Disallow non-null assertions using the `!` postfix operator.' +--- + > 🛑 This file is source code, not the primary documentation location! 🛑 > > See **https://typescript-eslint.io/rules/no-non-null-assertion** for documentation. diff --git a/packages/eslint-plugin/docs/rules/no-parameter-properties.md b/packages/eslint-plugin/docs/rules/no-parameter-properties.md index 3eaf0605503..329ecbb732e 100644 --- a/packages/eslint-plugin/docs/rules/no-parameter-properties.md +++ b/packages/eslint-plugin/docs/rules/no-parameter-properties.md @@ -1,3 +1,7 @@ +--- +description: 'Disallow the use of parameter properties in class constructors.' +--- + > 🛑 This file is source code, not the primary documentation location! 🛑 > > See **https://typescript-eslint.io/rules/no-parameter-properties** for documentation. diff --git a/packages/eslint-plugin/docs/rules/no-redeclare.md b/packages/eslint-plugin/docs/rules/no-redeclare.md index 4ebaba2ee5e..1ba99ea379c 100644 --- a/packages/eslint-plugin/docs/rules/no-redeclare.md +++ b/packages/eslint-plugin/docs/rules/no-redeclare.md @@ -1,3 +1,7 @@ +--- +description: 'Disallow variable redeclaration.' +--- + > 🛑 This file is source code, not the primary documentation location! 🛑 > > See **https://typescript-eslint.io/rules/no-redeclare** for documentation. diff --git a/packages/eslint-plugin/docs/rules/no-redundant-type-constituents.md b/packages/eslint-plugin/docs/rules/no-redundant-type-constituents.md index cbfde25358f..be06806c681 100644 --- a/packages/eslint-plugin/docs/rules/no-redundant-type-constituents.md +++ b/packages/eslint-plugin/docs/rules/no-redundant-type-constituents.md @@ -1,3 +1,7 @@ +--- +description: 'Disallow members of unions and intersections that do nothing or override type information.' +--- + > 🛑 This file is source code, not the primary documentation location! 🛑 > > See **https://typescript-eslint.io/rules/no-redundant-type-constituents** for documentation. diff --git a/packages/eslint-plugin/docs/rules/no-require-imports.md b/packages/eslint-plugin/docs/rules/no-require-imports.md index 0a3ddd5d2f9..b5bd6f136c4 100644 --- a/packages/eslint-plugin/docs/rules/no-require-imports.md +++ b/packages/eslint-plugin/docs/rules/no-require-imports.md @@ -1,3 +1,7 @@ +--- +description: 'Disallow invocation of `require()`.' +--- + > 🛑 This file is source code, not the primary documentation location! 🛑 > > See **https://typescript-eslint.io/rules/no-require-imports** for documentation. diff --git a/packages/eslint-plugin/docs/rules/no-restricted-imports.md b/packages/eslint-plugin/docs/rules/no-restricted-imports.md index 89f615c194e..3329ca58842 100644 --- a/packages/eslint-plugin/docs/rules/no-restricted-imports.md +++ b/packages/eslint-plugin/docs/rules/no-restricted-imports.md @@ -1,3 +1,7 @@ +--- +description: 'Disallow specified modules when loaded by `import`.' +--- + > 🛑 This file is source code, not the primary documentation location! 🛑 > > See **https://typescript-eslint.io/rules/no-restricted-imports** for documentation. diff --git a/packages/eslint-plugin/docs/rules/no-shadow.md b/packages/eslint-plugin/docs/rules/no-shadow.md index 3da0a6bc6fb..4487ecccc0a 100644 --- a/packages/eslint-plugin/docs/rules/no-shadow.md +++ b/packages/eslint-plugin/docs/rules/no-shadow.md @@ -1,3 +1,7 @@ +--- +description: 'Disallow variable declarations from shadowing variables declared in the outer scope.' +--- + > 🛑 This file is source code, not the primary documentation location! 🛑 > > See **https://typescript-eslint.io/rules/no-shadow** for documentation. diff --git a/packages/eslint-plugin/docs/rules/no-this-alias.md b/packages/eslint-plugin/docs/rules/no-this-alias.md index 3433ae28eb0..5cd741ac3ac 100644 --- a/packages/eslint-plugin/docs/rules/no-this-alias.md +++ b/packages/eslint-plugin/docs/rules/no-this-alias.md @@ -1,3 +1,7 @@ +--- +description: 'Disallow aliasing `this`.' +--- + > 🛑 This file is source code, not the primary documentation location! 🛑 > > See **https://typescript-eslint.io/rules/no-this-alias** for documentation. diff --git a/packages/eslint-plugin/docs/rules/no-throw-literal.md b/packages/eslint-plugin/docs/rules/no-throw-literal.md index a95aeb1a06b..9cefca0cee9 100644 --- a/packages/eslint-plugin/docs/rules/no-throw-literal.md +++ b/packages/eslint-plugin/docs/rules/no-throw-literal.md @@ -1,3 +1,7 @@ +--- +description: 'Disallow throwing literals as exceptions.' +--- + > 🛑 This file is source code, not the primary documentation location! 🛑 > > See **https://typescript-eslint.io/rules/no-throw-literal** for documentation. diff --git a/packages/eslint-plugin/docs/rules/no-type-alias.md b/packages/eslint-plugin/docs/rules/no-type-alias.md index e2b95b91738..cb6c76ee9ec 100644 --- a/packages/eslint-plugin/docs/rules/no-type-alias.md +++ b/packages/eslint-plugin/docs/rules/no-type-alias.md @@ -1,3 +1,7 @@ +--- +description: 'Disallow type aliases.' +--- + > 🛑 This file is source code, not the primary documentation location! 🛑 > > See **https://typescript-eslint.io/rules/no-type-alias** for documentation. diff --git a/packages/eslint-plugin/docs/rules/no-unnecessary-boolean-literal-compare.md b/packages/eslint-plugin/docs/rules/no-unnecessary-boolean-literal-compare.md index 80142fe6538..84843a245fe 100644 --- a/packages/eslint-plugin/docs/rules/no-unnecessary-boolean-literal-compare.md +++ b/packages/eslint-plugin/docs/rules/no-unnecessary-boolean-literal-compare.md @@ -1,3 +1,7 @@ +--- +description: 'Disallow unnecessary equality comparisons against boolean literals.' +--- + > 🛑 This file is source code, not the primary documentation location! 🛑 > > See **https://typescript-eslint.io/rules/no-unnecessary-boolean-literal-compare** for documentation. diff --git a/packages/eslint-plugin/docs/rules/no-unnecessary-condition.md b/packages/eslint-plugin/docs/rules/no-unnecessary-condition.md index 2594184ea02..9ae1eb01107 100644 --- a/packages/eslint-plugin/docs/rules/no-unnecessary-condition.md +++ b/packages/eslint-plugin/docs/rules/no-unnecessary-condition.md @@ -1,3 +1,7 @@ +--- +description: 'Disallow conditionals where the type is always truthy or always falsy.' +--- + > 🛑 This file is source code, not the primary documentation location! 🛑 > > See **https://typescript-eslint.io/rules/no-unnecessary-condition** for documentation. diff --git a/packages/eslint-plugin/docs/rules/no-unnecessary-qualifier.md b/packages/eslint-plugin/docs/rules/no-unnecessary-qualifier.md index 31905c485f4..e0a62705047 100644 --- a/packages/eslint-plugin/docs/rules/no-unnecessary-qualifier.md +++ b/packages/eslint-plugin/docs/rules/no-unnecessary-qualifier.md @@ -1,3 +1,7 @@ +--- +description: 'Disallow unnecessary namespace qualifiers.' +--- + > 🛑 This file is source code, not the primary documentation location! 🛑 > > See **https://typescript-eslint.io/rules/no-unnecessary-qualifier** for documentation. diff --git a/packages/eslint-plugin/docs/rules/no-unnecessary-type-arguments.md b/packages/eslint-plugin/docs/rules/no-unnecessary-type-arguments.md index 6f15d149375..63364396c55 100644 --- a/packages/eslint-plugin/docs/rules/no-unnecessary-type-arguments.md +++ b/packages/eslint-plugin/docs/rules/no-unnecessary-type-arguments.md @@ -1,3 +1,7 @@ +--- +description: 'Disallow type arguments that are equal to the default.' +--- + > 🛑 This file is source code, not the primary documentation location! 🛑 > > See **https://typescript-eslint.io/rules/no-unnecessary-type-arguments** for documentation. diff --git a/packages/eslint-plugin/docs/rules/no-unnecessary-type-assertion.md b/packages/eslint-plugin/docs/rules/no-unnecessary-type-assertion.md index b8e91cf74c4..5479988a502 100644 --- a/packages/eslint-plugin/docs/rules/no-unnecessary-type-assertion.md +++ b/packages/eslint-plugin/docs/rules/no-unnecessary-type-assertion.md @@ -1,3 +1,7 @@ +--- +description: 'Disallow type assertions that do not change the type of an expression.' +--- + > 🛑 This file is source code, not the primary documentation location! 🛑 > > See **https://typescript-eslint.io/rules/no-unnecessary-type-assertion** for documentation. diff --git a/packages/eslint-plugin/docs/rules/no-unnecessary-type-constraint.md b/packages/eslint-plugin/docs/rules/no-unnecessary-type-constraint.md index 4cd813ec0d6..02a1df88dda 100644 --- a/packages/eslint-plugin/docs/rules/no-unnecessary-type-constraint.md +++ b/packages/eslint-plugin/docs/rules/no-unnecessary-type-constraint.md @@ -1,3 +1,7 @@ +--- +description: 'Disallow unnecessary constraints on generic types.' +--- + > 🛑 This file is source code, not the primary documentation location! 🛑 > > See **https://typescript-eslint.io/rules/no-unnecessary-type-constraint** for documentation. diff --git a/packages/eslint-plugin/docs/rules/no-unsafe-argument.md b/packages/eslint-plugin/docs/rules/no-unsafe-argument.md index 15e1c82e7ff..db1612f5a4f 100644 --- a/packages/eslint-plugin/docs/rules/no-unsafe-argument.md +++ b/packages/eslint-plugin/docs/rules/no-unsafe-argument.md @@ -1,3 +1,7 @@ +--- +description: 'Disallow calling a function with a value with type `any`.' +--- + > 🛑 This file is source code, not the primary documentation location! 🛑 > > See **https://typescript-eslint.io/rules/no-unsafe-argument** for documentation. diff --git a/packages/eslint-plugin/docs/rules/no-unsafe-assignment.md b/packages/eslint-plugin/docs/rules/no-unsafe-assignment.md index 309d0b13d2e..e0b7c5ec9e2 100644 --- a/packages/eslint-plugin/docs/rules/no-unsafe-assignment.md +++ b/packages/eslint-plugin/docs/rules/no-unsafe-assignment.md @@ -1,3 +1,7 @@ +--- +description: 'Disallow assigning a value with type `any` to variables and properties.' +--- + > 🛑 This file is source code, not the primary documentation location! 🛑 > > See **https://typescript-eslint.io/rules/no-unsafe-assignment** for documentation. diff --git a/packages/eslint-plugin/docs/rules/no-unsafe-call.md b/packages/eslint-plugin/docs/rules/no-unsafe-call.md index 103aa55e7b2..d4f21f6cc4d 100644 --- a/packages/eslint-plugin/docs/rules/no-unsafe-call.md +++ b/packages/eslint-plugin/docs/rules/no-unsafe-call.md @@ -1,3 +1,7 @@ +--- +description: 'Disallow calling a value with type `any`.' +--- + > 🛑 This file is source code, not the primary documentation location! 🛑 > > See **https://typescript-eslint.io/rules/no-unsafe-call** for documentation. diff --git a/packages/eslint-plugin/docs/rules/no-unsafe-member-access.md b/packages/eslint-plugin/docs/rules/no-unsafe-member-access.md index c90028aa664..3c3416e3dd6 100644 --- a/packages/eslint-plugin/docs/rules/no-unsafe-member-access.md +++ b/packages/eslint-plugin/docs/rules/no-unsafe-member-access.md @@ -1,3 +1,7 @@ +--- +description: 'Disallow member access on a value with type `any`.' +--- + > 🛑 This file is source code, not the primary documentation location! 🛑 > > See **https://typescript-eslint.io/rules/no-unsafe-member-access** for documentation. diff --git a/packages/eslint-plugin/docs/rules/no-unsafe-return.md b/packages/eslint-plugin/docs/rules/no-unsafe-return.md index d2e5a36f309..430b4be2ca3 100644 --- a/packages/eslint-plugin/docs/rules/no-unsafe-return.md +++ b/packages/eslint-plugin/docs/rules/no-unsafe-return.md @@ -1,3 +1,7 @@ +--- +description: 'Disallow returning a value with type `any` from a function.' +--- + > 🛑 This file is source code, not the primary documentation location! 🛑 > > See **https://typescript-eslint.io/rules/no-unsafe-return** for documentation. diff --git a/packages/eslint-plugin/docs/rules/no-unused-expressions.md b/packages/eslint-plugin/docs/rules/no-unused-expressions.md index 2e6a002ba51..a851db4d473 100644 --- a/packages/eslint-plugin/docs/rules/no-unused-expressions.md +++ b/packages/eslint-plugin/docs/rules/no-unused-expressions.md @@ -1,3 +1,7 @@ +--- +description: 'Disallow unused expressions.' +--- + > 🛑 This file is source code, not the primary documentation location! 🛑 > > See **https://typescript-eslint.io/rules/no-unused-expressions** for documentation. diff --git a/packages/eslint-plugin/docs/rules/no-unused-vars.md b/packages/eslint-plugin/docs/rules/no-unused-vars.md index 4902c1e7259..4ad1f19d7ef 100644 --- a/packages/eslint-plugin/docs/rules/no-unused-vars.md +++ b/packages/eslint-plugin/docs/rules/no-unused-vars.md @@ -1,3 +1,7 @@ +--- +description: 'Disallow unused variables.' +--- + > 🛑 This file is source code, not the primary documentation location! 🛑 > > See **https://typescript-eslint.io/rules/no-unused-vars** for documentation. diff --git a/packages/eslint-plugin/docs/rules/no-use-before-define.md b/packages/eslint-plugin/docs/rules/no-use-before-define.md index dfc9c354d49..fec9e8dbf76 100644 --- a/packages/eslint-plugin/docs/rules/no-use-before-define.md +++ b/packages/eslint-plugin/docs/rules/no-use-before-define.md @@ -1,3 +1,7 @@ +--- +description: 'Disallow the use of variables before they are defined.' +--- + > 🛑 This file is source code, not the primary documentation location! 🛑 > > See **https://typescript-eslint.io/rules/no-use-before-define** for documentation. diff --git a/packages/eslint-plugin/docs/rules/no-useless-constructor.md b/packages/eslint-plugin/docs/rules/no-useless-constructor.md index 8892c1c9e29..a5acf42b7b9 100644 --- a/packages/eslint-plugin/docs/rules/no-useless-constructor.md +++ b/packages/eslint-plugin/docs/rules/no-useless-constructor.md @@ -1,3 +1,7 @@ +--- +description: 'Disallow unnecessary constructors.' +--- + > 🛑 This file is source code, not the primary documentation location! 🛑 > > See **https://typescript-eslint.io/rules/no-useless-constructor** for documentation. diff --git a/packages/eslint-plugin/docs/rules/no-useless-empty-export.md b/packages/eslint-plugin/docs/rules/no-useless-empty-export.md index 1687bfacc91..ca02d12c8cd 100644 --- a/packages/eslint-plugin/docs/rules/no-useless-empty-export.md +++ b/packages/eslint-plugin/docs/rules/no-useless-empty-export.md @@ -1,3 +1,7 @@ +--- +description: "Disallow empty exports that don't change anything in a module file." +--- + > 🛑 This file is source code, not the primary documentation location! 🛑 > > See **https://typescript-eslint.io/rules/no-useless-empty-export** for documentation. diff --git a/packages/eslint-plugin/docs/rules/no-var-requires.md b/packages/eslint-plugin/docs/rules/no-var-requires.md index 247535b011e..0b6a7a2454b 100644 --- a/packages/eslint-plugin/docs/rules/no-var-requires.md +++ b/packages/eslint-plugin/docs/rules/no-var-requires.md @@ -1,3 +1,7 @@ +--- +description: 'Disallow `require` statements except in import statements.' +--- + > 🛑 This file is source code, not the primary documentation location! 🛑 > > See **https://typescript-eslint.io/rules/no-var-requires** for documentation. diff --git a/packages/eslint-plugin/docs/rules/non-nullable-type-assertion-style.md b/packages/eslint-plugin/docs/rules/non-nullable-type-assertion-style.md index 486f464d77e..dbd38cdb866 100644 --- a/packages/eslint-plugin/docs/rules/non-nullable-type-assertion-style.md +++ b/packages/eslint-plugin/docs/rules/non-nullable-type-assertion-style.md @@ -1,3 +1,7 @@ +--- +description: 'Enforce non-null assertions over explicit type casts.' +--- + > 🛑 This file is source code, not the primary documentation location! 🛑 > > See **https://typescript-eslint.io/rules/non-nullable-type-assertion-style** for documentation. diff --git a/packages/eslint-plugin/docs/rules/object-curly-spacing.md b/packages/eslint-plugin/docs/rules/object-curly-spacing.md index 31f878363b1..f6780dbef80 100644 --- a/packages/eslint-plugin/docs/rules/object-curly-spacing.md +++ b/packages/eslint-plugin/docs/rules/object-curly-spacing.md @@ -1,3 +1,7 @@ +--- +description: 'Enforce consistent spacing inside braces.' +--- + > 🛑 This file is source code, not the primary documentation location! 🛑 > > See **https://typescript-eslint.io/rules/object-curly-spacing** for documentation. diff --git a/packages/eslint-plugin/docs/rules/padding-line-between-statements.md b/packages/eslint-plugin/docs/rules/padding-line-between-statements.md index 69951c37852..2849230d341 100644 --- a/packages/eslint-plugin/docs/rules/padding-line-between-statements.md +++ b/packages/eslint-plugin/docs/rules/padding-line-between-statements.md @@ -1,3 +1,7 @@ +--- +description: 'Require or disallow padding lines between statements.' +--- + > 🛑 This file is source code, not the primary documentation location! 🛑 > > See **https://typescript-eslint.io/rules/padding-line-between-statements** for documentation. diff --git a/packages/eslint-plugin/docs/rules/parameter-properties.md b/packages/eslint-plugin/docs/rules/parameter-properties.md index 3b8e4821ea3..e41e1bbd5df 100644 --- a/packages/eslint-plugin/docs/rules/parameter-properties.md +++ b/packages/eslint-plugin/docs/rules/parameter-properties.md @@ -1,3 +1,7 @@ +--- +description: 'Require or disallow parameter properties in class constructors.' +--- + > 🛑 This file is source code, not the primary documentation location! 🛑 > > See **https://typescript-eslint.io/rules/parameter-properties** for documentation. diff --git a/packages/eslint-plugin/docs/rules/prefer-as-const.md b/packages/eslint-plugin/docs/rules/prefer-as-const.md index ce6de334544..0670268bfab 100644 --- a/packages/eslint-plugin/docs/rules/prefer-as-const.md +++ b/packages/eslint-plugin/docs/rules/prefer-as-const.md @@ -1,3 +1,7 @@ +--- +description: 'Enforce the use of `as const` over literal type.' +--- + > 🛑 This file is source code, not the primary documentation location! 🛑 > > See **https://typescript-eslint.io/rules/prefer-as-const** for documentation. diff --git a/packages/eslint-plugin/docs/rules/prefer-enum-initializers.md b/packages/eslint-plugin/docs/rules/prefer-enum-initializers.md index c16f00bc864..8e2c0512520 100644 --- a/packages/eslint-plugin/docs/rules/prefer-enum-initializers.md +++ b/packages/eslint-plugin/docs/rules/prefer-enum-initializers.md @@ -1,3 +1,7 @@ +--- +description: 'Require each enum member value to be explicitly initialized.' +--- + > 🛑 This file is source code, not the primary documentation location! 🛑 > > See **https://typescript-eslint.io/rules/prefer-enum-initializers** for documentation. diff --git a/packages/eslint-plugin/docs/rules/prefer-for-of.md b/packages/eslint-plugin/docs/rules/prefer-for-of.md index 575e45b39e1..fed26d5af26 100644 --- a/packages/eslint-plugin/docs/rules/prefer-for-of.md +++ b/packages/eslint-plugin/docs/rules/prefer-for-of.md @@ -1,3 +1,7 @@ +--- +description: 'Enforce the use of `for-of` loop over the standard `for` loop where possible.' +--- + > 🛑 This file is source code, not the primary documentation location! 🛑 > > See **https://typescript-eslint.io/rules/prefer-for-of** for documentation. diff --git a/packages/eslint-plugin/docs/rules/prefer-function-type.md b/packages/eslint-plugin/docs/rules/prefer-function-type.md index 8c0e9de2b5c..7e8c1f73817 100644 --- a/packages/eslint-plugin/docs/rules/prefer-function-type.md +++ b/packages/eslint-plugin/docs/rules/prefer-function-type.md @@ -1,3 +1,7 @@ +--- +description: 'Enforce using function types instead of interfaces with call signatures.' +--- + > 🛑 This file is source code, not the primary documentation location! 🛑 > > See **https://typescript-eslint.io/rules/prefer-function-type** for documentation. diff --git a/packages/eslint-plugin/docs/rules/prefer-includes.md b/packages/eslint-plugin/docs/rules/prefer-includes.md index 3eec29ab892..e0d05b6662f 100644 --- a/packages/eslint-plugin/docs/rules/prefer-includes.md +++ b/packages/eslint-plugin/docs/rules/prefer-includes.md @@ -1,3 +1,7 @@ +--- +description: 'Enforce `includes` method over `indexOf` method.' +--- + > 🛑 This file is source code, not the primary documentation location! 🛑 > > See **https://typescript-eslint.io/rules/prefer-includes** for documentation. diff --git a/packages/eslint-plugin/docs/rules/prefer-literal-enum-member.md b/packages/eslint-plugin/docs/rules/prefer-literal-enum-member.md index 31f452be2ef..1bb4d23cc08 100644 --- a/packages/eslint-plugin/docs/rules/prefer-literal-enum-member.md +++ b/packages/eslint-plugin/docs/rules/prefer-literal-enum-member.md @@ -1,3 +1,7 @@ +--- +description: 'Require all enum members to be literal values.' +--- + > 🛑 This file is source code, not the primary documentation location! 🛑 > > See **https://typescript-eslint.io/rules/prefer-literal-enum-member** for documentation. diff --git a/packages/eslint-plugin/docs/rules/prefer-namespace-keyword.md b/packages/eslint-plugin/docs/rules/prefer-namespace-keyword.md index bc7b601934d..b7320e72851 100644 --- a/packages/eslint-plugin/docs/rules/prefer-namespace-keyword.md +++ b/packages/eslint-plugin/docs/rules/prefer-namespace-keyword.md @@ -1,3 +1,7 @@ +--- +description: 'Require using `namespace` keyword over `module` keyword to declare custom TypeScript modules.' +--- + > 🛑 This file is source code, not the primary documentation location! 🛑 > > See **https://typescript-eslint.io/rules/prefer-namespace-keyword** for documentation. diff --git a/packages/eslint-plugin/docs/rules/prefer-nullish-coalescing.md b/packages/eslint-plugin/docs/rules/prefer-nullish-coalescing.md index c82399072dd..272240b4d48 100644 --- a/packages/eslint-plugin/docs/rules/prefer-nullish-coalescing.md +++ b/packages/eslint-plugin/docs/rules/prefer-nullish-coalescing.md @@ -1,3 +1,7 @@ +--- +description: 'Enforce using the nullish coalescing operator instead of logical chaining.' +--- + > 🛑 This file is source code, not the primary documentation location! 🛑 > > See **https://typescript-eslint.io/rules/prefer-nullish-coalescing** for documentation. diff --git a/packages/eslint-plugin/docs/rules/prefer-optional-chain.md b/packages/eslint-plugin/docs/rules/prefer-optional-chain.md index 730842c1512..d2f252bb878 100644 --- a/packages/eslint-plugin/docs/rules/prefer-optional-chain.md +++ b/packages/eslint-plugin/docs/rules/prefer-optional-chain.md @@ -1,3 +1,7 @@ +--- +description: 'Enforce using concise optional chain expressions instead of chained logical ands.' +--- + > 🛑 This file is source code, not the primary documentation location! 🛑 > > See **https://typescript-eslint.io/rules/prefer-optional-chain** for documentation. diff --git a/packages/eslint-plugin/docs/rules/prefer-readonly-parameter-types.md b/packages/eslint-plugin/docs/rules/prefer-readonly-parameter-types.md index 022b4e841bc..3a1f34d9413 100644 --- a/packages/eslint-plugin/docs/rules/prefer-readonly-parameter-types.md +++ b/packages/eslint-plugin/docs/rules/prefer-readonly-parameter-types.md @@ -1,3 +1,7 @@ +--- +description: 'Require function parameters to be typed as `readonly` to prevent accidental mutation of inputs.' +--- + > 🛑 This file is source code, not the primary documentation location! 🛑 > > See **https://typescript-eslint.io/rules/prefer-readonly-parameter-types** for documentation. diff --git a/packages/eslint-plugin/docs/rules/prefer-readonly.md b/packages/eslint-plugin/docs/rules/prefer-readonly.md index e21f26a278b..16d7d2f4f67 100644 --- a/packages/eslint-plugin/docs/rules/prefer-readonly.md +++ b/packages/eslint-plugin/docs/rules/prefer-readonly.md @@ -1,3 +1,7 @@ +--- +description: "Require private members to be marked as `readonly` if they're never modified outside of the constructor." +--- + > 🛑 This file is source code, not the primary documentation location! 🛑 > > See **https://typescript-eslint.io/rules/prefer-readonly** for documentation. diff --git a/packages/eslint-plugin/docs/rules/prefer-reduce-type-parameter.md b/packages/eslint-plugin/docs/rules/prefer-reduce-type-parameter.md index 5db156aa47f..4e8cdde8527 100644 --- a/packages/eslint-plugin/docs/rules/prefer-reduce-type-parameter.md +++ b/packages/eslint-plugin/docs/rules/prefer-reduce-type-parameter.md @@ -1,3 +1,7 @@ +--- +description: 'Enforce using type parameter when calling `Array#reduce` instead of casting.' +--- + > 🛑 This file is source code, not the primary documentation location! 🛑 > > See **https://typescript-eslint.io/rules/prefer-reduce-type-parameter** for documentation. diff --git a/packages/eslint-plugin/docs/rules/prefer-regexp-exec.md b/packages/eslint-plugin/docs/rules/prefer-regexp-exec.md index a487ea3d3e2..74a3649de76 100644 --- a/packages/eslint-plugin/docs/rules/prefer-regexp-exec.md +++ b/packages/eslint-plugin/docs/rules/prefer-regexp-exec.md @@ -1,3 +1,7 @@ +--- +description: 'Enforce `RegExp#exec` over `String#match` if no global flag is provided.' +--- + > 🛑 This file is source code, not the primary documentation location! 🛑 > > See **https://typescript-eslint.io/rules/prefer-regexp-exec** for documentation. diff --git a/packages/eslint-plugin/docs/rules/prefer-return-this-type.md b/packages/eslint-plugin/docs/rules/prefer-return-this-type.md index 0581d81ad02..535ec053e23 100644 --- a/packages/eslint-plugin/docs/rules/prefer-return-this-type.md +++ b/packages/eslint-plugin/docs/rules/prefer-return-this-type.md @@ -1,3 +1,7 @@ +--- +description: 'Enforce that `this` is used when only `this` type is returned.' +--- + > 🛑 This file is source code, not the primary documentation location! 🛑 > > See **https://typescript-eslint.io/rules/prefer-return-this-type** for documentation. diff --git a/packages/eslint-plugin/docs/rules/prefer-string-starts-ends-with.md b/packages/eslint-plugin/docs/rules/prefer-string-starts-ends-with.md index 2be24df3c21..de5233ec0b8 100644 --- a/packages/eslint-plugin/docs/rules/prefer-string-starts-ends-with.md +++ b/packages/eslint-plugin/docs/rules/prefer-string-starts-ends-with.md @@ -1,3 +1,7 @@ +--- +description: 'Enforce using `String#startsWith` and `String#endsWith` over other equivalent methods of checking substrings.' +--- + > 🛑 This file is source code, not the primary documentation location! 🛑 > > See **https://typescript-eslint.io/rules/prefer-string-starts-ends-with** for documentation. diff --git a/packages/eslint-plugin/docs/rules/prefer-ts-expect-error.md b/packages/eslint-plugin/docs/rules/prefer-ts-expect-error.md index bfcaad11b0a..255e30e7ea5 100644 --- a/packages/eslint-plugin/docs/rules/prefer-ts-expect-error.md +++ b/packages/eslint-plugin/docs/rules/prefer-ts-expect-error.md @@ -1,3 +1,7 @@ +--- +description: 'Enforce using `@ts-expect-error` over `@ts-ignore`.' +--- + > 🛑 This file is source code, not the primary documentation location! 🛑 > > See **https://typescript-eslint.io/rules/prefer-ts-expect-error** for documentation. diff --git a/packages/eslint-plugin/docs/rules/promise-function-async.md b/packages/eslint-plugin/docs/rules/promise-function-async.md index 424536ee5f2..137dd051ab5 100644 --- a/packages/eslint-plugin/docs/rules/promise-function-async.md +++ b/packages/eslint-plugin/docs/rules/promise-function-async.md @@ -1,3 +1,7 @@ +--- +description: 'Require any function or method that returns a Promise to be marked async.' +--- + > 🛑 This file is source code, not the primary documentation location! 🛑 > > See **https://typescript-eslint.io/rules/promise-function-async** for documentation. diff --git a/packages/eslint-plugin/docs/rules/quotes.md b/packages/eslint-plugin/docs/rules/quotes.md index 61cadea2047..8cbf3e58b7f 100644 --- a/packages/eslint-plugin/docs/rules/quotes.md +++ b/packages/eslint-plugin/docs/rules/quotes.md @@ -1,3 +1,7 @@ +--- +description: 'Enforce the consistent use of either backticks, double, or single quotes.' +--- + > 🛑 This file is source code, not the primary documentation location! 🛑 > > See **https://typescript-eslint.io/rules/quotes** for documentation. diff --git a/packages/eslint-plugin/docs/rules/require-array-sort-compare.md b/packages/eslint-plugin/docs/rules/require-array-sort-compare.md index d4b006c1d70..7b44dfa38dd 100644 --- a/packages/eslint-plugin/docs/rules/require-array-sort-compare.md +++ b/packages/eslint-plugin/docs/rules/require-array-sort-compare.md @@ -1,3 +1,7 @@ +--- +description: 'Require `Array#sort` calls to always provide a `compareFunction`.' +--- + > 🛑 This file is source code, not the primary documentation location! 🛑 > > See **https://typescript-eslint.io/rules/require-array-sort-compare** for documentation. diff --git a/packages/eslint-plugin/docs/rules/require-await.md b/packages/eslint-plugin/docs/rules/require-await.md index 21d6271c38c..58936c41479 100644 --- a/packages/eslint-plugin/docs/rules/require-await.md +++ b/packages/eslint-plugin/docs/rules/require-await.md @@ -1,3 +1,7 @@ +--- +description: 'Disallow async functions which have no `await` expression.' +--- + > 🛑 This file is source code, not the primary documentation location! 🛑 > > See **https://typescript-eslint.io/rules/require-await** for documentation. diff --git a/packages/eslint-plugin/docs/rules/restrict-plus-operands.md b/packages/eslint-plugin/docs/rules/restrict-plus-operands.md index 5b984f0b21c..32b19602ccb 100644 --- a/packages/eslint-plugin/docs/rules/restrict-plus-operands.md +++ b/packages/eslint-plugin/docs/rules/restrict-plus-operands.md @@ -1,3 +1,7 @@ +--- +description: 'Require both operands of addition to have type `number` or `string`.' +--- + > 🛑 This file is source code, not the primary documentation location! 🛑 > > See **https://typescript-eslint.io/rules/restrict-plus-operands** for documentation. diff --git a/packages/eslint-plugin/docs/rules/restrict-template-expressions.md b/packages/eslint-plugin/docs/rules/restrict-template-expressions.md index 37423d23abc..88bac9de873 100644 --- a/packages/eslint-plugin/docs/rules/restrict-template-expressions.md +++ b/packages/eslint-plugin/docs/rules/restrict-template-expressions.md @@ -1,3 +1,7 @@ +--- +description: 'Enforce template literal expressions to be of `string` type.' +--- + > 🛑 This file is source code, not the primary documentation location! 🛑 > > See **https://typescript-eslint.io/rules/restrict-template-expressions** for documentation. diff --git a/packages/eslint-plugin/docs/rules/return-await.md b/packages/eslint-plugin/docs/rules/return-await.md index 1aa62401ae4..89f8e6276d8 100644 --- a/packages/eslint-plugin/docs/rules/return-await.md +++ b/packages/eslint-plugin/docs/rules/return-await.md @@ -1,3 +1,7 @@ +--- +description: 'Enforce consistent returning of awaited values.' +--- + > 🛑 This file is source code, not the primary documentation location! 🛑 > > See **https://typescript-eslint.io/rules/return-await** for documentation. diff --git a/packages/eslint-plugin/docs/rules/semi.md b/packages/eslint-plugin/docs/rules/semi.md index 0c37c9f4baa..23b9852dc71 100644 --- a/packages/eslint-plugin/docs/rules/semi.md +++ b/packages/eslint-plugin/docs/rules/semi.md @@ -1,3 +1,7 @@ +--- +description: 'Require or disallow semicolons instead of ASI.' +--- + > 🛑 This file is source code, not the primary documentation location! 🛑 > > See **https://typescript-eslint.io/rules/semi** for documentation. diff --git a/packages/eslint-plugin/docs/rules/sort-type-union-intersection-members.md b/packages/eslint-plugin/docs/rules/sort-type-union-intersection-members.md index 0e02b686b87..2ddfd8a88de 100644 --- a/packages/eslint-plugin/docs/rules/sort-type-union-intersection-members.md +++ b/packages/eslint-plugin/docs/rules/sort-type-union-intersection-members.md @@ -1,3 +1,7 @@ +--- +description: 'Enforce members of a type union/intersection to be sorted alphabetically.' +--- + > 🛑 This file is source code, not the primary documentation location! 🛑 > > See **https://typescript-eslint.io/rules/sort-type-union-intersection-members** for documentation. diff --git a/packages/eslint-plugin/docs/rules/space-before-blocks.md b/packages/eslint-plugin/docs/rules/space-before-blocks.md index bb2ec8e4b89..b6dbb740962 100644 --- a/packages/eslint-plugin/docs/rules/space-before-blocks.md +++ b/packages/eslint-plugin/docs/rules/space-before-blocks.md @@ -1,3 +1,7 @@ +--- +description: 'Enforce consistent spacing before blocks.' +--- + > 🛑 This file is source code, not the primary documentation location! 🛑 > > See **https://typescript-eslint.io/rules/space-before-blocks** for documentation. diff --git a/packages/eslint-plugin/docs/rules/space-before-function-paren.md b/packages/eslint-plugin/docs/rules/space-before-function-paren.md index 80ab4ffc6a0..962f8f674de 100644 --- a/packages/eslint-plugin/docs/rules/space-before-function-paren.md +++ b/packages/eslint-plugin/docs/rules/space-before-function-paren.md @@ -1,3 +1,7 @@ +--- +description: 'Enforce consistent spacing before function parenthesis.' +--- + > 🛑 This file is source code, not the primary documentation location! 🛑 > > See **https://typescript-eslint.io/rules/space-before-function-paren** for documentation. diff --git a/packages/eslint-plugin/docs/rules/space-infix-ops.md b/packages/eslint-plugin/docs/rules/space-infix-ops.md index e791420b653..4e322bb9837 100644 --- a/packages/eslint-plugin/docs/rules/space-infix-ops.md +++ b/packages/eslint-plugin/docs/rules/space-infix-ops.md @@ -1,3 +1,7 @@ +--- +description: 'Require spacing around infix operators.' +--- + > 🛑 This file is source code, not the primary documentation location! 🛑 > > See **https://typescript-eslint.io/rules/space-infix-ops** for documentation. diff --git a/packages/eslint-plugin/docs/rules/strict-boolean-expressions.md b/packages/eslint-plugin/docs/rules/strict-boolean-expressions.md index a86e8146ba6..a1bead76670 100644 --- a/packages/eslint-plugin/docs/rules/strict-boolean-expressions.md +++ b/packages/eslint-plugin/docs/rules/strict-boolean-expressions.md @@ -1,3 +1,7 @@ +--- +description: 'Disallow certain types in boolean expressions.' +--- + > 🛑 This file is source code, not the primary documentation location! 🛑 > > See **https://typescript-eslint.io/rules/strict-boolean-expressions** for documentation. diff --git a/packages/eslint-plugin/docs/rules/switch-exhaustiveness-check.md b/packages/eslint-plugin/docs/rules/switch-exhaustiveness-check.md index cfe2ef234a4..5a726f73844 100644 --- a/packages/eslint-plugin/docs/rules/switch-exhaustiveness-check.md +++ b/packages/eslint-plugin/docs/rules/switch-exhaustiveness-check.md @@ -1,3 +1,7 @@ +--- +description: 'Require switch-case statements to be exhaustive with union type.' +--- + > 🛑 This file is source code, not the primary documentation location! 🛑 > > See **https://typescript-eslint.io/rules/switch-exhaustiveness-check** for documentation. diff --git a/packages/eslint-plugin/docs/rules/triple-slash-reference.md b/packages/eslint-plugin/docs/rules/triple-slash-reference.md index ce73a33d594..df7b0901e6c 100644 --- a/packages/eslint-plugin/docs/rules/triple-slash-reference.md +++ b/packages/eslint-plugin/docs/rules/triple-slash-reference.md @@ -1,3 +1,7 @@ +--- +description: 'Disallow certain triple slash directives in favor of ES6-style import declarations.' +--- + > 🛑 This file is source code, not the primary documentation location! 🛑 > > See **https://typescript-eslint.io/rules/triple-slash-reference** for documentation. diff --git a/packages/eslint-plugin/docs/rules/type-annotation-spacing.md b/packages/eslint-plugin/docs/rules/type-annotation-spacing.md index 7adc9fd0e59..78f16a92713 100644 --- a/packages/eslint-plugin/docs/rules/type-annotation-spacing.md +++ b/packages/eslint-plugin/docs/rules/type-annotation-spacing.md @@ -1,3 +1,7 @@ +--- +description: 'Require consistent spacing around type annotations.' +--- + > 🛑 This file is source code, not the primary documentation location! 🛑 > > See **https://typescript-eslint.io/rules/type-annotation-spacing** for documentation. diff --git a/packages/eslint-plugin/docs/rules/typedef.md b/packages/eslint-plugin/docs/rules/typedef.md index 8976c521197..74152a49f87 100644 --- a/packages/eslint-plugin/docs/rules/typedef.md +++ b/packages/eslint-plugin/docs/rules/typedef.md @@ -1,3 +1,7 @@ +--- +description: 'Require type annotations in certain places.' +--- + > 🛑 This file is source code, not the primary documentation location! 🛑 > > See **https://typescript-eslint.io/rules/typedef** for documentation. diff --git a/packages/eslint-plugin/docs/rules/unbound-method.md b/packages/eslint-plugin/docs/rules/unbound-method.md index b42e274ec59..6a74e898a9b 100644 --- a/packages/eslint-plugin/docs/rules/unbound-method.md +++ b/packages/eslint-plugin/docs/rules/unbound-method.md @@ -1,3 +1,7 @@ +--- +description: 'Enforce unbound methods are called with their expected scope.' +--- + > 🛑 This file is source code, not the primary documentation location! 🛑 > > See **https://typescript-eslint.io/rules/unbound-method** for documentation. diff --git a/packages/eslint-plugin/docs/rules/unified-signatures.md b/packages/eslint-plugin/docs/rules/unified-signatures.md index 290c3f33739..cb03bc45b73 100644 --- a/packages/eslint-plugin/docs/rules/unified-signatures.md +++ b/packages/eslint-plugin/docs/rules/unified-signatures.md @@ -1,3 +1,7 @@ +--- +description: 'Disallow two overloads that could be unified into one with a union or an optional/rest parameter.' +--- + > 🛑 This file is source code, not the primary documentation location! 🛑 > > See **https://typescript-eslint.io/rules/unified-signatures** for documentation. diff --git a/packages/eslint-plugin/tests/docs.test.ts b/packages/eslint-plugin/tests/docs.test.ts index 7ab1095f4ad..7fc703255d8 100644 --- a/packages/eslint-plugin/tests/docs.test.ts +++ b/packages/eslint-plugin/tests/docs.test.ts @@ -42,7 +42,11 @@ function tokenIs( } function tokenIsH2(token: marked.Token): token is marked.Tokens.Heading { - return tokenIs(token, 'heading') && token.depth === 2; + return ( + tokenIs(token, 'heading') && + token.depth === 2 && + !/[a-z]+: /.test(token.text) + ); } describe('Validating rule docs', () => { @@ -64,13 +68,28 @@ describe('Validating rule docs', () => { }); for (const [ruleName, rule] of rulesData) { - describe(ruleName, () => { - const filePath = path.join(docsRoot, `${ruleName}.md`); + const { description } = rule.meta.docs!; - test(`${ruleName}.md must start with blockquote directing to website`, () => { - const tokens = parseMarkdownFile(filePath); + describe(`${ruleName}.md`, () => { + const filePath = path.join(docsRoot, `${ruleName}.md`); + const tokens = parseMarkdownFile(filePath); + test(`${ruleName}.md must start with frontmatter description`, () => { expect(tokens[0]).toMatchObject({ + raw: '---\n', + type: 'hr', + }); + expect(tokens[1]).toMatchObject({ + text: description.includes("'") + ? `description: "${description}."` + : `description: '${description}.'`, + depth: 2, + type: 'heading', + }); + }); + + test(`${ruleName}.md must next have a blockquote directing to website`, () => { + expect(tokens[2]).toMatchObject({ text: [ `🛑 This file is source code, not the primary documentation location! 🛑`, ``, @@ -81,9 +100,7 @@ describe('Validating rule docs', () => { }); }); - it(`Headers in ${ruleName}.md must be title-cased`, () => { - const tokens = parseMarkdownFile(filePath); - + test(`headers must be title-cased`, () => { // Get all H2 headers objects as the other levels are variable by design. const headers = tokens.filter(tokenIsH2); @@ -92,7 +109,7 @@ describe('Validating rule docs', () => { ); }); - it(`Options in ${ruleName}.md must match the rule meta`, () => { + test(`options must match the rule meta`, () => { // TODO(#4365): We don't yet enforce formatting for all rules. if ( !isEmptySchema(rule.meta.schema) || @@ -102,8 +119,6 @@ describe('Validating rule docs', () => { return; } - const tokens = parseMarkdownFile(filePath); - const optionsIndex = tokens.findIndex( token => tokenIsH2(token) && token.text === 'Options', );