Skip to content

Commit 991811e

Browse files
authored
chore: update eslint-doc-generator to v0.15 (#323)
1 parent 6e019c9 commit 991811e

28 files changed

+30
-30
lines changed

Diff for: README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ Here's an example ESLint configuration that:
5454

5555
## <a name='Rules'></a>Rules
5656

57-
<!-- begin rules list -->
57+
<!-- begin auto-generated rules list -->
5858

5959
✅ Enabled in the `recommended` configuration.\
6060
🔧 Automatically fixable by the [`--fix` CLI option](https://eslint.org/docs/user-guide/command-line-interface#--fix).\
@@ -89,7 +89,7 @@ Here's an example ESLint configuration that:
8989
| [test-case-property-ordering](docs/rules/test-case-property-ordering.md) | require the properties of a test case to be placed in a consistent order | | 🔧 | |
9090
| [test-case-shorthand-strings](docs/rules/test-case-shorthand-strings.md) | enforce consistent usage of shorthand strings for test cases with no options | | 🔧 | |
9191

92-
<!-- end rules list -->
92+
<!-- end auto-generated rules list -->
9393

9494
## <a name='Presets'></a>Presets
9595

Diff for: docs/rules/consistent-output.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
✅ This rule is enabled in the `recommended` config.
44

5-
<!-- end rule header -->
5+
<!-- end auto-generated rule header -->
66

77
When writing tests for fixable rules, the `output` property on each test case can be used to assert what autofixed code is produced, or to assert that no autofix is produced using `output: null`.
88

Diff for: docs/rules/fixer-return.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
✅ This rule is enabled in the `recommended` config.
44

5-
<!-- end rule header -->
5+
<!-- end auto-generated rule header -->
66

77
In a [fixable](https://eslint.org/docs/developer-guide/working-with-rules#applying-fixes) rule, a fixer function is useless if it never returns anything.
88

Diff for: docs/rules/meta-property-ordering.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
🔧 This rule is automatically fixable by the [`--fix` CLI option](https://eslint.org/docs/latest/user-guide/command-line-interface#--fix).
44

5-
<!-- end rule header -->
5+
<!-- end auto-generated rule header -->
66

77
This rule enforces that meta properties of a rule are placed in a consistent order.
88

Diff for: docs/rules/no-deprecated-context-methods.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
🔧 This rule is automatically fixable by the [`--fix` CLI option](https://eslint.org/docs/latest/user-guide/command-line-interface#--fix).
66

7-
<!-- end rule header -->
7+
<!-- end auto-generated rule header -->
88

99
This rule disallows the use of deprecated methods on rule `context` objects.
1010

Diff for: docs/rules/no-deprecated-report-api.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
🔧 This rule is automatically fixable by the [`--fix` CLI option](https://eslint.org/docs/latest/user-guide/command-line-interface#--fix).
66

7-
<!-- end rule header -->
7+
<!-- end auto-generated rule header -->
88

99
ESLint has two APIs that rules can use to report problems.
1010

Diff for: docs/rules/no-identical-tests.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
🔧 This rule is automatically fixable by the [`--fix` CLI option](https://eslint.org/docs/latest/user-guide/command-line-interface#--fix).
66

7-
<!-- end rule header -->
7+
<!-- end auto-generated rule header -->
88

99
Duplicate test cases can cause confusion, can be hard to detect manually in a long file, and serve no purpose.
1010

Diff for: docs/rules/no-missing-message-ids.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
✅ This rule is enabled in the `recommended` config.
44

5-
<!-- end rule header -->
5+
<!-- end auto-generated rule header -->
66

77
When using `meta.messages` and `messageId` to report rule violations, it's possible to mistakenly use a `messageId` that doesn't exist in `meta.messages`.
88

Diff for: docs/rules/no-missing-placeholders.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
✅ This rule is enabled in the `recommended` config.
44

5-
<!-- end rule header -->
5+
<!-- end auto-generated rule header -->
66

77
Report messages in rules can have placeholders surrounded by curly brackets.
88

Diff for: docs/rules/no-only-tests.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
💡 This rule is manually fixable by [editor suggestions](https://eslint.org/docs/developer-guide/working-with-rules#providing-suggestions).
66

7-
<!-- end rule header -->
7+
<!-- end auto-generated rule header -->
88

99
The [`only` property](https://eslint.org/docs/developer-guide/unit-tests#running-individual-tests) can be used as of [ESLint 7.29](https://eslint.org/blog/2021/06/eslint-v7.29.0-released#highlights) for running individual rule test cases with less-noisy debugging. This feature should be only used in development, as it prevents all the tests from running. Mistakenly checking-in a test case with this property can cause CI tests to incorrectly pass.
1010

Diff for: docs/rules/no-unused-message-ids.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
✅ This rule is enabled in the `recommended` config.
44

5-
<!-- end rule header -->
5+
<!-- end auto-generated rule header -->
66

77
When using `meta.messages` and `messageId` to report rule violations, it's possible to mistakenly leave a message in `meta.messages` that is never used.
88

Diff for: docs/rules/no-unused-placeholders.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
✅ This rule is enabled in the `recommended` config.
44

5-
<!-- end rule header -->
5+
<!-- end auto-generated rule header -->
66

77
This rule aims to disallow unused placeholders in rule report messages.
88

Diff for: docs/rules/no-useless-token-range.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
🔧 This rule is automatically fixable by the [`--fix` CLI option](https://eslint.org/docs/latest/user-guide/command-line-interface#--fix).
66

7-
<!-- end rule header -->
7+
<!-- end auto-generated rule header -->
88

99
AST nodes always start and end with tokens. As a result, the start index of the first token in a node is the same as the start index of the node itself, and the end index of the last token in a node is the same as the end index of the node itself. Using code like `sourceCode.getFirstToken(node).range[0]` unnecessarily hurts the performance of your rule, and makes your code less readable.
1010

Diff for: docs/rules/prefer-message-ids.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
✅ This rule is enabled in the `recommended` config.
44

5-
<!-- end rule header -->
5+
<!-- end auto-generated rule header -->
66

77
When reporting a rule violation, it's preferred to provide the violation message with the `messageId` property instead of the `message` property. Message IDs provide the following benefits:
88

Diff for: docs/rules/prefer-object-rule.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
🔧 This rule is automatically fixable by the [`--fix` CLI option](https://eslint.org/docs/latest/user-guide/command-line-interface#--fix).
66

7-
<!-- end rule header -->
7+
<!-- end auto-generated rule header -->
88

99
Prior to ESLint v9, ESLint supported both [function-style](https://eslint.org/docs/developer-guide/working-with-rules-deprecated) and [object-style](https://eslint.org/docs/developer-guide/working-with-rules) rules. However, function-style rules have been deprecated since 2016, and do not support newer features like autofixing and suggestions.
1010

Diff for: docs/rules/prefer-output-null.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
🔧 This rule is automatically fixable by the [`--fix` CLI option](https://eslint.org/docs/latest/user-guide/command-line-interface#--fix).
66

7-
<!-- end rule header -->
7+
<!-- end auto-generated rule header -->
88

99
Instead of repeating the test case `code`, using `output: null` is more concise and makes it easier to distinguish whether a test case provides an autofix.
1010

Diff for: docs/rules/prefer-placeholders.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Require using placeholders for dynamic report messages (`eslint-plugin/prefer-placeholders`)
22

3-
<!-- end rule header -->
3+
<!-- end auto-generated rule header -->
44

55
Report messages in rules can have placeholders surrounded by curly brackets.
66

Diff for: docs/rules/prefer-replace-text.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Require using `replaceText()` instead of `replaceTextRange()` (`eslint-plugin/prefer-replace-text`)
22

3-
<!-- end rule header -->
3+
<!-- end auto-generated rule header -->
44

55
## Rule Details
66

Diff for: docs/rules/report-message-format.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Enforce a consistent format for rule report messages (`eslint-plugin/report-message-format`)
22

3-
<!-- end rule header -->
3+
<!-- end auto-generated rule header -->
44

55
It is sometimes desirable to maintain consistent formatting for all report messages. For example, you might want to mandate that all report messages begin with a capital letter and end with a period.
66

Diff for: docs/rules/require-meta-docs-description.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Require rules to implement a `meta.docs.description` property with the correct format (`eslint-plugin/require-meta-docs-description`)
22

3-
<!-- end rule header -->
3+
<!-- end auto-generated rule header -->
44

55
Defining a clear and consistent description for each rule helps developers understand what they're used for.
66

Diff for: docs/rules/require-meta-docs-url.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
🔧 This rule is automatically fixable by the [`--fix` CLI option](https://eslint.org/docs/latest/user-guide/command-line-interface#--fix).
44

5-
<!-- end rule header -->
5+
<!-- end auto-generated rule header -->
66

77
A rule can store the URL to its documentation page in `meta.docs.url`. This enables integration tools / IDEs / editors to conveniently provide the link to developers so that they can better understand the rule.
88

Diff for: docs/rules/require-meta-fixable.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
✅ This rule is enabled in the `recommended` config.
44

5-
<!-- end rule header -->
5+
<!-- end auto-generated rule header -->
66

77
ESLint requires fixable rules to specify a valid `meta.fixable` property (with value `code` or `whitespace`).
88

Diff for: docs/rules/require-meta-has-suggestions.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
🔧 This rule is automatically fixable by the [`--fix` CLI option](https://eslint.org/docs/latest/user-guide/command-line-interface#--fix).
66

7-
<!-- end rule header -->
7+
<!-- end auto-generated rule header -->
88

99
A suggestable ESLint rule should specify the `meta.hasSuggestions` property with a value of `true`. This makes it easier for both humans and tooling to tell whether a rule provides suggestions. [As of ESLint 8](https://eslint.org/blog/2021/06/whats-coming-in-eslint-8.0.0#rules-with-suggestions-now-require-the-metahassuggestions-property), an exception will be thrown if a suggestable rule is missing this property.
1010

Diff for: docs/rules/require-meta-schema.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
💡 This rule is manually fixable by [editor suggestions](https://eslint.org/docs/developer-guide/working-with-rules#providing-suggestions).
66

7-
<!-- end rule header -->
7+
<!-- end auto-generated rule header -->
88

99
Defining a schema for each rule allows eslint to validate that configuration options are passed correctly. Even when there are no options for a rule, a schema can still be defined as an empty array to validate that no data is mistakenly passed to the rule.
1010

Diff for: docs/rules/require-meta-type.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
✅ This rule is enabled in the `recommended` config.
44

5-
<!-- end rule header -->
5+
<!-- end auto-generated rule header -->
66

77
ESLint v5.9.0 introduces a new `--fix-type` option for the command line interface. This option allows users to filter the type of fixes applied when using `--fix`.
88

Diff for: docs/rules/test-case-property-ordering.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
🔧 This rule is automatically fixable by the [`--fix` CLI option](https://eslint.org/docs/latest/user-guide/command-line-interface#--fix).
44

5-
<!-- end rule header -->
5+
<!-- end auto-generated rule header -->
66

77
This rule enforces that the properties of RuleTester test cases are arranged in a consistent order.
88

Diff for: docs/rules/test-case-shorthand-strings.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
🔧 This rule is automatically fixable by the [`--fix` CLI option](https://eslint.org/docs/latest/user-guide/command-line-interface#--fix).
44

5-
<!-- end rule header -->
5+
<!-- end auto-generated rule header -->
66

77
When writing valid test cases for rules with `RuleTester`, one can optionally include a string as a test case instead of an object, if the the test case does not use any options.
88

Diff for: package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
"scripts": {
1313
"lint": "npm-run-all --continue-on-error --aggregate-output --parallel lint:*",
1414
"lint:docs": "markdownlint \"**/*.md\"",
15-
"lint:eslint-docs": "npm-run-all \"update:eslint-docs --check\"",
15+
"lint:eslint-docs": "npm-run-all \"update:eslint-docs -- --check\"",
1616
"lint:js": "eslint --cache .",
1717
"lint:package-json": "npmPkgJsonLint .",
1818
"release": "release-it",
@@ -55,7 +55,7 @@
5555
"eslint": "^8.23.0",
5656
"eslint-config-not-an-aardvark": "^2.1.0",
5757
"eslint-config-prettier": "^8.5.0",
58-
"eslint-doc-generator": "^0.14.0",
58+
"eslint-doc-generator": "^0.15.0",
5959
"eslint-plugin-eslint-comments": "^3.2.0",
6060
"eslint-plugin-eslint-plugin": "file:./",
6161
"eslint-plugin-markdown": "^3.0.0",

0 commit comments

Comments
 (0)