Skip to content

Commit

Permalink
chore: update eslint-doc-generator to v0.15 (#323)
Browse files Browse the repository at this point in the history
  • Loading branch information
bmish authored Oct 26, 2022
1 parent 6e019c9 commit 991811e
Show file tree
Hide file tree
Showing 28 changed files with 30 additions and 30 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ Here's an example ESLint configuration that:

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

<!-- begin rules list -->
<!-- begin auto-generated rules list -->

✅ Enabled in the `recommended` configuration.\
🔧 Automatically fixable by the [`--fix` CLI option](https://eslint.org/docs/user-guide/command-line-interface#--fix).\
Expand Down Expand Up @@ -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 | | 🔧 | |

<!-- end rules list -->
<!-- end auto-generated rules list -->

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

Expand Down
2 changes: 1 addition & 1 deletion docs/rules/consistent-output.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

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

<!-- end rule header -->
<!-- end auto-generated rule header -->

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`.

Expand Down
2 changes: 1 addition & 1 deletion docs/rules/fixer-return.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

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

<!-- end rule header -->
<!-- end auto-generated rule header -->

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.

Expand Down
2 changes: 1 addition & 1 deletion docs/rules/meta-property-ordering.md
Original file line number Diff line number Diff line change
Expand Up @@ -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).

<!-- end rule header -->
<!-- end auto-generated rule header -->

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

Expand Down
2 changes: 1 addition & 1 deletion docs/rules/no-deprecated-context-methods.md
Original file line number Diff line number Diff line change
Expand Up @@ -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).

<!-- end rule header -->
<!-- end auto-generated rule header -->

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

Expand Down
2 changes: 1 addition & 1 deletion docs/rules/no-deprecated-report-api.md
Original file line number Diff line number Diff line change
Expand Up @@ -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).

<!-- end rule header -->
<!-- end auto-generated rule header -->

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

Expand Down
2 changes: 1 addition & 1 deletion docs/rules/no-identical-tests.md
Original file line number Diff line number Diff line change
Expand Up @@ -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).

<!-- end rule header -->
<!-- end auto-generated rule header -->

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

Expand Down
2 changes: 1 addition & 1 deletion docs/rules/no-missing-message-ids.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

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

<!-- end rule header -->
<!-- end auto-generated rule header -->

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`.

Expand Down
2 changes: 1 addition & 1 deletion docs/rules/no-missing-placeholders.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

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

<!-- end rule header -->
<!-- end auto-generated rule header -->

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

Expand Down
2 changes: 1 addition & 1 deletion docs/rules/no-only-tests.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

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

<!-- end rule header -->
<!-- end auto-generated rule header -->

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.

Expand Down
2 changes: 1 addition & 1 deletion docs/rules/no-unused-message-ids.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

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

<!-- end rule header -->
<!-- end auto-generated rule header -->

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.

Expand Down
2 changes: 1 addition & 1 deletion docs/rules/no-unused-placeholders.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

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

<!-- end rule header -->
<!-- end auto-generated rule header -->

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

Expand Down
2 changes: 1 addition & 1 deletion docs/rules/no-useless-token-range.md
Original file line number Diff line number Diff line change
Expand Up @@ -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).

<!-- end rule header -->
<!-- end auto-generated rule header -->

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.

Expand Down
2 changes: 1 addition & 1 deletion docs/rules/prefer-message-ids.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

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

<!-- end rule header -->
<!-- end auto-generated rule header -->

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:

Expand Down
2 changes: 1 addition & 1 deletion docs/rules/prefer-object-rule.md
Original file line number Diff line number Diff line change
Expand Up @@ -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).

<!-- end rule header -->
<!-- end auto-generated rule header -->

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.

Expand Down
2 changes: 1 addition & 1 deletion docs/rules/prefer-output-null.md
Original file line number Diff line number Diff line change
Expand Up @@ -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).

<!-- end rule header -->
<!-- end auto-generated rule header -->

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.

Expand Down
2 changes: 1 addition & 1 deletion docs/rules/prefer-placeholders.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Require using placeholders for dynamic report messages (`eslint-plugin/prefer-placeholders`)

<!-- end rule header -->
<!-- end auto-generated rule header -->

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

Expand Down
2 changes: 1 addition & 1 deletion docs/rules/prefer-replace-text.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Require using `replaceText()` instead of `replaceTextRange()` (`eslint-plugin/prefer-replace-text`)

<!-- end rule header -->
<!-- end auto-generated rule header -->

## Rule Details

Expand Down
2 changes: 1 addition & 1 deletion docs/rules/report-message-format.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Enforce a consistent format for rule report messages (`eslint-plugin/report-message-format`)

<!-- end rule header -->
<!-- end auto-generated rule header -->

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.

Expand Down
2 changes: 1 addition & 1 deletion docs/rules/require-meta-docs-description.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Require rules to implement a `meta.docs.description` property with the correct format (`eslint-plugin/require-meta-docs-description`)

<!-- end rule header -->
<!-- end auto-generated rule header -->

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

Expand Down
2 changes: 1 addition & 1 deletion docs/rules/require-meta-docs-url.md
Original file line number Diff line number Diff line change
Expand Up @@ -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).

<!-- end rule header -->
<!-- end auto-generated rule header -->

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.

Expand Down
2 changes: 1 addition & 1 deletion docs/rules/require-meta-fixable.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

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

<!-- end rule header -->
<!-- end auto-generated rule header -->

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

Expand Down
2 changes: 1 addition & 1 deletion docs/rules/require-meta-has-suggestions.md
Original file line number Diff line number Diff line change
Expand Up @@ -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).

<!-- end rule header -->
<!-- end auto-generated rule header -->

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.

Expand Down
2 changes: 1 addition & 1 deletion docs/rules/require-meta-schema.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

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

<!-- end rule header -->
<!-- end auto-generated rule header -->

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.

Expand Down
2 changes: 1 addition & 1 deletion docs/rules/require-meta-type.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

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

<!-- end rule header -->
<!-- end auto-generated rule header -->

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`.

Expand Down
2 changes: 1 addition & 1 deletion docs/rules/test-case-property-ordering.md
Original file line number Diff line number Diff line change
Expand Up @@ -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).

<!-- end rule header -->
<!-- end auto-generated rule header -->

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

Expand Down
2 changes: 1 addition & 1 deletion docs/rules/test-case-shorthand-strings.md
Original file line number Diff line number Diff line change
Expand Up @@ -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).

<!-- end rule header -->
<!-- end auto-generated rule header -->

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.

Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down Expand Up @@ -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",
Expand Down

0 comments on commit 991811e

Please sign in to comment.