From 433b47981d170ffc126975e9a3212ffd2a665d15 Mon Sep 17 00:00:00 2001
From: Bryan Mishkin <698306+bmish@users.noreply.github.com>
Date: Wed, 26 Oct 2022 09:57:45 -0500
Subject: [PATCH] docs: update eslint-doc-generator to 0.15
---
README.md | 4 ++--
docs/rules/consistent-output.md | 2 +-
docs/rules/fixer-return.md | 2 +-
docs/rules/meta-property-ordering.md | 2 +-
docs/rules/no-deprecated-context-methods.md | 2 +-
docs/rules/no-deprecated-report-api.md | 2 +-
docs/rules/no-identical-tests.md | 2 +-
docs/rules/no-missing-message-ids.md | 2 +-
docs/rules/no-missing-placeholders.md | 2 +-
docs/rules/no-only-tests.md | 2 +-
docs/rules/no-unused-message-ids.md | 2 +-
docs/rules/no-unused-placeholders.md | 2 +-
docs/rules/no-useless-token-range.md | 2 +-
docs/rules/prefer-message-ids.md | 2 +-
docs/rules/prefer-object-rule.md | 2 +-
docs/rules/prefer-output-null.md | 2 +-
docs/rules/prefer-placeholders.md | 2 +-
docs/rules/prefer-replace-text.md | 2 +-
docs/rules/report-message-format.md | 2 +-
docs/rules/require-meta-docs-description.md | 2 +-
docs/rules/require-meta-docs-url.md | 2 +-
docs/rules/require-meta-fixable.md | 2 +-
docs/rules/require-meta-has-suggestions.md | 2 +-
docs/rules/require-meta-schema.md | 2 +-
docs/rules/require-meta-type.md | 2 +-
docs/rules/test-case-property-ordering.md | 2 +-
docs/rules/test-case-shorthand-strings.md | 2 +-
package.json | 4 ++--
28 files changed, 30 insertions(+), 30 deletions(-)
diff --git a/README.md b/README.md
index 4f89d209..ed19f91a 100644
--- a/README.md
+++ b/README.md
@@ -54,7 +54,7 @@ Here's an example ESLint configuration that:
## Rules
-
+
✅ Enabled in the `recommended` configuration.\
🔧 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:
| [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 | | 🔧 | |
| [test-case-shorthand-strings](docs/rules/test-case-shorthand-strings.md) | enforce consistent usage of shorthand strings for test cases with no options | | 🔧 | |
-
+
## Presets
diff --git a/docs/rules/consistent-output.md b/docs/rules/consistent-output.md
index e05e441e..47b7c64d 100644
--- a/docs/rules/consistent-output.md
+++ b/docs/rules/consistent-output.md
@@ -2,7 +2,7 @@
✅ This rule is enabled in the `recommended` config.
-
+
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`.
diff --git a/docs/rules/fixer-return.md b/docs/rules/fixer-return.md
index 8d268527..13ee0713 100644
--- a/docs/rules/fixer-return.md
+++ b/docs/rules/fixer-return.md
@@ -2,7 +2,7 @@
✅ This rule is enabled in the `recommended` config.
-
+
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.
diff --git a/docs/rules/meta-property-ordering.md b/docs/rules/meta-property-ordering.md
index 60b6a47b..2593d6d9 100644
--- a/docs/rules/meta-property-ordering.md
+++ b/docs/rules/meta-property-ordering.md
@@ -2,7 +2,7 @@
🔧 This rule is automatically fixable by the [`--fix` CLI option](https://eslint.org/docs/latest/user-guide/command-line-interface#--fix).
-
+
This rule enforces that meta properties of a rule are placed in a consistent order.
diff --git a/docs/rules/no-deprecated-context-methods.md b/docs/rules/no-deprecated-context-methods.md
index 259a96e8..248490f6 100644
--- a/docs/rules/no-deprecated-context-methods.md
+++ b/docs/rules/no-deprecated-context-methods.md
@@ -4,7 +4,7 @@
🔧 This rule is automatically fixable by the [`--fix` CLI option](https://eslint.org/docs/latest/user-guide/command-line-interface#--fix).
-
+
This rule disallows the use of deprecated methods on rule `context` objects.
diff --git a/docs/rules/no-deprecated-report-api.md b/docs/rules/no-deprecated-report-api.md
index 942a9d7e..9864b063 100644
--- a/docs/rules/no-deprecated-report-api.md
+++ b/docs/rules/no-deprecated-report-api.md
@@ -4,7 +4,7 @@
🔧 This rule is automatically fixable by the [`--fix` CLI option](https://eslint.org/docs/latest/user-guide/command-line-interface#--fix).
-
+
ESLint has two APIs that rules can use to report problems.
diff --git a/docs/rules/no-identical-tests.md b/docs/rules/no-identical-tests.md
index 9780b332..b84128cc 100644
--- a/docs/rules/no-identical-tests.md
+++ b/docs/rules/no-identical-tests.md
@@ -4,7 +4,7 @@
🔧 This rule is automatically fixable by the [`--fix` CLI option](https://eslint.org/docs/latest/user-guide/command-line-interface#--fix).
-
+
Duplicate test cases can cause confusion, can be hard to detect manually in a long file, and serve no purpose.
diff --git a/docs/rules/no-missing-message-ids.md b/docs/rules/no-missing-message-ids.md
index 3f2ca11f..1498169d 100644
--- a/docs/rules/no-missing-message-ids.md
+++ b/docs/rules/no-missing-message-ids.md
@@ -2,7 +2,7 @@
✅ This rule is enabled in the `recommended` config.
-
+
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`.
diff --git a/docs/rules/no-missing-placeholders.md b/docs/rules/no-missing-placeholders.md
index 04376b6c..40e97888 100644
--- a/docs/rules/no-missing-placeholders.md
+++ b/docs/rules/no-missing-placeholders.md
@@ -2,7 +2,7 @@
✅ This rule is enabled in the `recommended` config.
-
+
Report messages in rules can have placeholders surrounded by curly brackets.
diff --git a/docs/rules/no-only-tests.md b/docs/rules/no-only-tests.md
index 424d0e79..c290aaa9 100644
--- a/docs/rules/no-only-tests.md
+++ b/docs/rules/no-only-tests.md
@@ -4,7 +4,7 @@
💡 This rule is manually fixable by [editor suggestions](https://eslint.org/docs/developer-guide/working-with-rules#providing-suggestions).
-
+
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.
diff --git a/docs/rules/no-unused-message-ids.md b/docs/rules/no-unused-message-ids.md
index 01cdde08..baca22e6 100644
--- a/docs/rules/no-unused-message-ids.md
+++ b/docs/rules/no-unused-message-ids.md
@@ -2,7 +2,7 @@
✅ This rule is enabled in the `recommended` config.
-
+
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.
diff --git a/docs/rules/no-unused-placeholders.md b/docs/rules/no-unused-placeholders.md
index 7bff88fd..e0ff1462 100644
--- a/docs/rules/no-unused-placeholders.md
+++ b/docs/rules/no-unused-placeholders.md
@@ -2,7 +2,7 @@
✅ This rule is enabled in the `recommended` config.
-
+
This rule aims to disallow unused placeholders in rule report messages.
diff --git a/docs/rules/no-useless-token-range.md b/docs/rules/no-useless-token-range.md
index bff2542c..5586aeba 100644
--- a/docs/rules/no-useless-token-range.md
+++ b/docs/rules/no-useless-token-range.md
@@ -4,7 +4,7 @@
🔧 This rule is automatically fixable by the [`--fix` CLI option](https://eslint.org/docs/latest/user-guide/command-line-interface#--fix).
-
+
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.
diff --git a/docs/rules/prefer-message-ids.md b/docs/rules/prefer-message-ids.md
index 068e845f..1e54cc0b 100644
--- a/docs/rules/prefer-message-ids.md
+++ b/docs/rules/prefer-message-ids.md
@@ -2,7 +2,7 @@
✅ This rule is enabled in the `recommended` config.
-
+
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:
diff --git a/docs/rules/prefer-object-rule.md b/docs/rules/prefer-object-rule.md
index 11cbe6df..68d16de5 100644
--- a/docs/rules/prefer-object-rule.md
+++ b/docs/rules/prefer-object-rule.md
@@ -4,7 +4,7 @@
🔧 This rule is automatically fixable by the [`--fix` CLI option](https://eslint.org/docs/latest/user-guide/command-line-interface#--fix).
-
+
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.
diff --git a/docs/rules/prefer-output-null.md b/docs/rules/prefer-output-null.md
index 43130ec3..35c63c8f 100644
--- a/docs/rules/prefer-output-null.md
+++ b/docs/rules/prefer-output-null.md
@@ -4,7 +4,7 @@
🔧 This rule is automatically fixable by the [`--fix` CLI option](https://eslint.org/docs/latest/user-guide/command-line-interface#--fix).
-
+
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.
diff --git a/docs/rules/prefer-placeholders.md b/docs/rules/prefer-placeholders.md
index fea5c345..3b6de5ce 100644
--- a/docs/rules/prefer-placeholders.md
+++ b/docs/rules/prefer-placeholders.md
@@ -1,6 +1,6 @@
# Require using placeholders for dynamic report messages (`eslint-plugin/prefer-placeholders`)
-
+
Report messages in rules can have placeholders surrounded by curly brackets.
diff --git a/docs/rules/prefer-replace-text.md b/docs/rules/prefer-replace-text.md
index 8ae84763..eec386f4 100644
--- a/docs/rules/prefer-replace-text.md
+++ b/docs/rules/prefer-replace-text.md
@@ -1,6 +1,6 @@
# Require using `replaceText()` instead of `replaceTextRange()` (`eslint-plugin/prefer-replace-text`)
-
+
## Rule Details
diff --git a/docs/rules/report-message-format.md b/docs/rules/report-message-format.md
index 82f1abab..b73b4dde 100644
--- a/docs/rules/report-message-format.md
+++ b/docs/rules/report-message-format.md
@@ -1,6 +1,6 @@
# Enforce a consistent format for rule report messages (`eslint-plugin/report-message-format`)
-
+
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.
diff --git a/docs/rules/require-meta-docs-description.md b/docs/rules/require-meta-docs-description.md
index 398fc5bd..8de0b5bf 100644
--- a/docs/rules/require-meta-docs-description.md
+++ b/docs/rules/require-meta-docs-description.md
@@ -1,6 +1,6 @@
# Require rules to implement a `meta.docs.description` property with the correct format (`eslint-plugin/require-meta-docs-description`)
-
+
Defining a clear and consistent description for each rule helps developers understand what they're used for.
diff --git a/docs/rules/require-meta-docs-url.md b/docs/rules/require-meta-docs-url.md
index 90176887..7c2f1740 100644
--- a/docs/rules/require-meta-docs-url.md
+++ b/docs/rules/require-meta-docs-url.md
@@ -2,7 +2,7 @@
🔧 This rule is automatically fixable by the [`--fix` CLI option](https://eslint.org/docs/latest/user-guide/command-line-interface#--fix).
-
+
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.
diff --git a/docs/rules/require-meta-fixable.md b/docs/rules/require-meta-fixable.md
index b2edb0f0..4218ee62 100644
--- a/docs/rules/require-meta-fixable.md
+++ b/docs/rules/require-meta-fixable.md
@@ -2,7 +2,7 @@
✅ This rule is enabled in the `recommended` config.
-
+
ESLint requires fixable rules to specify a valid `meta.fixable` property (with value `code` or `whitespace`).
diff --git a/docs/rules/require-meta-has-suggestions.md b/docs/rules/require-meta-has-suggestions.md
index 2f0fc5fc..478e4847 100644
--- a/docs/rules/require-meta-has-suggestions.md
+++ b/docs/rules/require-meta-has-suggestions.md
@@ -4,7 +4,7 @@
🔧 This rule is automatically fixable by the [`--fix` CLI option](https://eslint.org/docs/latest/user-guide/command-line-interface#--fix).
-
+
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.
diff --git a/docs/rules/require-meta-schema.md b/docs/rules/require-meta-schema.md
index 9b6a5799..36086b45 100644
--- a/docs/rules/require-meta-schema.md
+++ b/docs/rules/require-meta-schema.md
@@ -4,7 +4,7 @@
💡 This rule is manually fixable by [editor suggestions](https://eslint.org/docs/developer-guide/working-with-rules#providing-suggestions).
-
+
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.
diff --git a/docs/rules/require-meta-type.md b/docs/rules/require-meta-type.md
index 2b9c9fb1..8fb143b4 100644
--- a/docs/rules/require-meta-type.md
+++ b/docs/rules/require-meta-type.md
@@ -2,7 +2,7 @@
✅ This rule is enabled in the `recommended` config.
-
+
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`.
diff --git a/docs/rules/test-case-property-ordering.md b/docs/rules/test-case-property-ordering.md
index 826bd311..1a308249 100644
--- a/docs/rules/test-case-property-ordering.md
+++ b/docs/rules/test-case-property-ordering.md
@@ -2,7 +2,7 @@
🔧 This rule is automatically fixable by the [`--fix` CLI option](https://eslint.org/docs/latest/user-guide/command-line-interface#--fix).
-
+
This rule enforces that the properties of RuleTester test cases are arranged in a consistent order.
diff --git a/docs/rules/test-case-shorthand-strings.md b/docs/rules/test-case-shorthand-strings.md
index 3514fb70..f0133895 100644
--- a/docs/rules/test-case-shorthand-strings.md
+++ b/docs/rules/test-case-shorthand-strings.md
@@ -2,7 +2,7 @@
🔧 This rule is automatically fixable by the [`--fix` CLI option](https://eslint.org/docs/latest/user-guide/command-line-interface#--fix).
-
+
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.
diff --git a/package.json b/package.json
index 6559b224..292d50e9 100644
--- a/package.json
+++ b/package.json
@@ -12,7 +12,7 @@
"scripts": {
"lint": "npm-run-all --continue-on-error --aggregate-output --parallel lint:*",
"lint:docs": "markdownlint \"**/*.md\"",
- "lint:eslint-docs": "npm-run-all \"update:eslint-docs --check\"",
+ "lint:eslint-docs": "npm-run-all \"update:eslint-docs -- --check\"",
"lint:js": "eslint --cache .",
"lint:package-json": "npmPkgJsonLint .",
"release": "release-it",
@@ -55,7 +55,7 @@
"eslint": "^8.23.0",
"eslint-config-not-an-aardvark": "^2.1.0",
"eslint-config-prettier": "^8.5.0",
- "eslint-doc-generator": "^0.14.0",
+ "eslint-doc-generator": "^0.15.0",
"eslint-plugin-eslint-comments": "^3.2.0",
"eslint-plugin-eslint-plugin": "file:./",
"eslint-plugin-markdown": "^3.0.0",