8000 chore(website): generate rule docs h1 and description automatically (… · joshhunt/typescript-eslint@8c1a662 · GitHub
[go: up one dir, main page]

Skip to content

Commit 8c1a662

Browse files
chore(website): generate rule docs h1 and description automatically (typescript-eslint#5249)
1 parent 2595ccf commit 8c1a662

File tree

132 files changed

+453
-449
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

132 files changed

+453
-449
lines changed

packages/eslint-plugin/docs/rules/TEMPLATE.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
# `your-rule-name`
2-
3-
Your rule description here.
1+
> 🛑 This file is source code, not the primary documentation location! 🛑
2+
>
3+
> See **https://typescript-eslint.io/rules/your-rule-name** for documentation.
44
55
## Rule Details
66

packages/eslint-plugin/docs/rules/adjacent-overload-signatures.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
# `adjacent-overload-signatures`
2-
3-
Requires that member overloads be consecutive.
1+
> 🛑 This file is source code, not the primary documentation location! 🛑
2+
>
3+
> See **https://typescript-eslint.io/rules/adjacent-overload-signatures** for documentation.
44
55
Grouping overloaded members together can improve readability of the code.
66

packages/eslint-plugin/docs/rules/array-type.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
# `array-type`
2-
3-
Requires using either `T[]` or `Array<T>` for arrays.
1+
> 🛑 This file is source code, not the primary documentation location! 🛑
2+
>
3+
> See **https://typescript-eslint.io/rules/array-type** for documentation.
44
55
Using the same style for array definitions across your codebase makes it easier for your developers to read and understand the types.
66

packages/eslint-plugin/docs/rules/await-thenable.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
# `await-thenable`
2-
3-
Disallows awaiting a value that is not a Thenable.
1+
> 🛑 This file is source code, not the primary documentation location! 🛑
2+
>
3+
> See **https://typescript-eslint.io/rules/await-thenable** for documentation.
44
55
This rule disallows awaiting a value that is not a "Thenable" (an object which has `then` method, such as a Promise).
66
While it is valid JavaScript to await a non-`Promise`-like value (it will resolve immediately), this pattern is often a programmer error, such as forgetting to add parenthesis to call a function that returns a Promise.

packages/eslint-plugin/docs/rules/ban-ts-comment.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
# `ban-ts-comment`
2-
3-
Disallows `@ts-<directive>` comments or requires descriptions after directive.
1+
> 🛑 This file is source code, not the primary documentation location! 🛑
2+
>
3+
> See **https://typescript-eslint.io/rules/ban-ts-comment** for documentation.
44
55
TypeScript provides several directive comments that can be used to alter how it processes files.
66
Using these to suppress TypeScript Compiler Errors reduces the effectiveness of TypeScript overall.

packages/eslint-plugin/docs/rules/ban-tslint-comment.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
# `ban-tslint-comment`
2-
3-
Disallows `// tslint:<rule-flag>` comments.
1+
> 🛑 This file is source code, not the primary documentation location! 🛑
2+
>
3+
> See **https://typescript-eslint.io/rules/ban-tslint-comment** for documentation.
44
55
Useful when migrating from TSLint to ESLint. Once TSLint has been removed, this rule helps locate TSLint annotations (e.g. `// tslint:disable`).
66

packages/eslint-plugin/docs/rules/ban-types.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
# `ban-types`
2-
3-
Disallows certain types.
1+
> 🛑 This file is source code, not the primary documentation location! 🛑
2+
>
3+
> See **https://typescript-eslint.io/rules/ban-types** for documentation.
44
55
Some builtin types have aliases, some types are considered dangerous or harmful.
66
It's often a good idea to ban certain types to help with consistency and safety.

packages/eslint-plugin/docs/rules/brace-style.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
# `brace-style`
2-
3-
Enforces consistent brace style for blocks.
1+
> 🛑 This file is source code, not the primary documentation location! 🛑
2+
>
3+
> See **https://typescript-eslint.io/rules/brace-style** for documentation.
44
55
## Rule Details
66

packages/eslint-plugin/docs/rules/class-literal-property-style.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
# `class-literal-property-style`
2-
3-
Enforces that literals on classes are exposed in a consistent style.
1+
> 🛑 This file is source code, not the primary documentation location! 🛑
2+
>
3+
> See **https://typescript-eslint.io/rules/class-literal-property-style** for documentation.
44
55
When writing TypeScript applications, it's typically safe to store literal values on classes using fields with the `readonly` modifier to prevent them from being reassigned.
66
When writing TypeScript libraries that could be used by JavaScript users however, it's typically safer to expose these literals using `getter`s, since the `readonly` modifier is enforced at compile type.

packages/eslint-plugin/docs/rules/comma-dangle.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
# `comma-dangle`
2-
3-
Requires or disallows trailing commas.
1+
> 🛑 This file is source code, not the primary documentation location! 🛑
2+
>
3+
> See **https://typescript-eslint.io/rules/comma-dangle** for documentation.
44
55
## Rule Details
66

0 commit comments

Comments
 (0)
0