Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork2.8k
docs: standardized rule docs heading and option-less Options#4367
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Merged
bradzacher merged 8 commits intotypescript-eslint:mainfromJoshuaKGoldberg:standard-rule-docs-headingJan 30, 2022
Uh oh!
There was an error while loading.Please reload this page.
Merged
Changes fromall commits
Commits
Show all changes
8 commits Select commitHold shift + click to select a range
9b13323 docs: standardized rule docs heading and option-less Options
JoshuaKGoldbergbe0b011 chore: fix package devDependencies listings
JoshuaKGoldberg9f37589 Merge branch 'main' into standard-rule-docs-heading
12d91a6 docs: add template rule docs file
JoshuaKGoldberg11b5c05 chore: fix docs.test.ts
JoshuaKGoldbergece8f09 Merge branch 'main' into standard-rule-docs-heading
fed1694 docs: added example suggested
JoshuaKGoldbergfc3404b Merge branch 'main' into standard-rule-docs-heading
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Uh oh!
There was an error while loading.Please reload this page.
Jump to
Jump to file
Failed to load files.
Loading
Uh oh!
There was an error while loading.Please reload this page.
Diff view
Diff view
There are no files selected for viewing
57 changes: 57 additions & 0 deletionspackages/eslint-plugin/docs/rules/TEMPLATE.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,57 @@ | ||
| # `your-rule-name` | ||
| Your rule description here. | ||
| ## Rule Details | ||
| To fill out: tell us more about this rule. | ||
| <!--tabs--> | ||
| ### ❌ Incorrect | ||
| ```ts | ||
| // To fill out: incorrect code | ||
| ``` | ||
| ### ✅ Correct | ||
| ```ts | ||
| // To fill out: correct code | ||
| ``` | ||
| ## Options | ||
| ```jsonc | ||
| // .eslintrc.json | ||
| { | ||
| "rules": { | ||
| "@typescript-eslint/your-rule-name": "error" | ||
| } | ||
| } | ||
| ``` | ||
| If not configurable: This rule is not configurable. | ||
| If configurable... | ||
| ```ts | ||
| type Options = { | ||
| someOption?: boolean; | ||
| }; | ||
| const defaultOptions: Options = { | ||
| someOption: false, | ||
| }; | ||
| ``` | ||
| ## When Not To Use It | ||
| To fill out: why wouldn't you want to use this rule? | ||
JoshuaKGoldberg marked this conversation as resolved. Show resolvedHide resolvedUh oh!There was an error while loading.Please reload this page. | ||
| For example if this rule requires a feature released in a certain TS version. | ||
| ## Attributes | ||
| - [ ] ✅ Recommended | ||
| - [ ] 🔧 Fixable | ||
| - [ ] 💭 Requires type information | ||
17 changes: 16 additions & 1 deletionpackages/eslint-plugin/docs/rules/adjacent-overload-signatures.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
4 changes: 3 additions & 1 deletionpackages/eslint-plugin/docs/rules/array-type.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
17 changes: 16 additions & 1 deletionpackages/eslint-plugin/docs/rules/await-thenable.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
4 changes: 3 additions & 1 deletionpackages/eslint-plugin/docs/rules/ban-ts-comment.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
4 changes: 3 additions & 1 deletionpackages/eslint-plugin/docs/rules/ban-tslint-comment.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
4 changes: 3 additions & 1 deletionpackages/eslint-plugin/docs/rules/ban-types.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
4 changes: 3 additions & 1 deletionpackages/eslint-plugin/docs/rules/brace-style.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,4 +1,6 @@ | ||
| # `brace-style` | ||
| Enforce consistent brace style for blocks. | ||
| ## Rule Details | ||
4 changes: 3 additions & 1 deletionpackages/eslint-plugin/docs/rules/class-literal-property-style.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
4 changes: 3 additions & 1 deletionpackages/eslint-plugin/docs/rules/comma-dangle.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,4 +1,6 @@ | ||
| # `comma-dangle` | ||
| Require or disallow trailing comma. | ||
| ## Rule Details | ||
4 changes: 3 additions & 1 deletionpackages/eslint-plugin/docs/rules/comma-spacing.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,4 +1,6 @@ | ||
| # `comma-spacing` | ||
| Enforces consistent spacing before and after commas. | ||
| ## Rule Details | ||
4 changes: 3 additions & 1 deletionpackages/eslint-plugin/docs/rules/consistent-indexed-object-style.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
4 changes: 3 additions & 1 deletionpackages/eslint-plugin/docs/rules/consistent-type-assertions.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,4 +1,6 @@ | ||
| # `consistent-type-assertions` | ||
| Enforces consistent usage of type assertions. | ||
| ## Rule Details | ||
4 changes: 3 additions & 1 deletionpackages/eslint-plugin/docs/rules/consistent-type-definitions.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
4 changes: 3 additions & 1 deletionpackages/eslint-plugin/docs/rules/consistent-type-exports.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
4 changes: 3 additions & 1 deletionpackages/eslint-plugin/docs/rules/consistent-type-imports.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
4 changes: 3 additions & 1 deletionpackages/eslint-plugin/docs/rules/default-param-last.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,4 +1,6 @@ | ||
| # `default-param-last` | ||
| Enforce default parameters to be last. | ||
| ## Rule Details | ||
4 changes: 3 additions & 1 deletionpackages/eslint-plugin/docs/rules/dot-notation.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,4 +1,6 @@ | ||
| # `dot-notation` | ||
| enforce dot notation whenever possible. | ||
| ## Rule Details | ||
4 changes: 3 additions & 1 deletionpackages/eslint-plugin/docs/rules/explicit-function-return-type.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
4 changes: 3 additions & 1 deletionpackages/eslint-plugin/docs/rules/explicit-member-accessibility.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
4 changes: 3 additions & 1 deletionpackages/eslint-plugin/docs/rules/explicit-module-boundary-types.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
4 changes: 3 additions & 1 deletionpackages/eslint-plugin/docs/rules/func-call-spacing.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,4 +1,6 @@ | ||
| # `func-call-spacing` | ||
| Require or disallow spacing between function identifiers and their invocations. | ||
| ## Rule Details | ||
4 changes: 3 additions & 1 deletionpackages/eslint-plugin/docs/rules/indent.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,4 +1,6 @@ | ||
| # `indent` | ||
| Enforce consistent indentation. | ||
| ## Warning | ||
4 changes: 3 additions & 1 deletionpackages/eslint-plugin/docs/rules/init-declarations.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,4 +1,6 @@ | ||
| # `init-declarations` | ||
| require or disallow initialization in variable declarations. | ||
| ## Rule Details | ||
4 changes: 3 additions & 1 deletionpackages/eslint-plugin/docs/rules/keyword-spacing.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,4 +1,6 @@ | ||
| # `keyword-spacing` | ||
| Enforce consistent spacing before and after keywords. | ||
| ## Rule Details | ||
4 changes: 3 additions & 1 deletionpackages/eslint-plugin/docs/rules/lines-between-class-members.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
4 changes: 3 additions & 1 deletionpackages/eslint-plugin/docs/rules/member-delimiter-style.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
4 changes: 3 additions & 1 deletionpackages/eslint-plugin/docs/rules/member-ordering.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
4 changes: 3 additions & 1 deletionpackages/eslint-plugin/docs/rules/method-signature-style.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
4 changes: 3 additions & 1 deletionpackages/eslint-plugin/docs/rules/naming-convention.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
4 changes: 3 additions & 1 deletionpackages/eslint-plugin/docs/rules/no-array-constructor.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,4 +1,6 @@ | ||
| # `no-array-constructor` | ||
| Disallow generic `Array` constructors. | ||
| ## Rule Details | ||
4 changes: 3 additions & 1 deletionpackages/eslint-plugin/docs/rules/no-base-to-string.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
4 changes: 3 additions & 1 deletionpackages/eslint-plugin/docs/rules/no-confusing-non-null-assertion.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,4 +1,6 @@ | ||
| # `no-confusing-non-null-assertion` | ||
| Disallow non-null assertion in locations that may be confusing. | ||
| ## Rule Details | ||
4 changes: 3 additions & 1 deletionpackages/eslint-plugin/docs/rules/no-confusing-void-expression.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
4 changes: 3 additions & 1 deletionpackages/eslint-plugin/docs/rules/no-dupe-class-members.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,4 +1,6 @@ | ||
| # `no-dupe-class-members` | ||
| Disallow duplicate class members. | ||
| ## Rule Details | ||
4 changes: 3 additions & 1 deletionpackages/eslint-plugin/docs/rules/no-duplicate-imports.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,4 +1,6 @@ | ||
| # `no-duplicate-imports` | ||
| Disallow duplicate imports. | ||
| ## Rule Details | ||
4 changes: 3 additions & 1 deletionpackages/eslint-plugin/docs/rules/no-dynamic-delete.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
4 changes: 3 additions & 1 deletionpackages/eslint-plugin/docs/rules/no-empty-function.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,4 +1,6 @@ | ||
| # `no-empty-function` | ||
| Disallow empty functions. | ||
| ## Rule Details | ||
Oops, something went wrong.
Uh oh!
There was an error while loading.Please reload this page.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.