diff --git a/docs/rules/meta-property-ordering.md b/docs/rules/meta-property-ordering.md index e971f2e8..bef88673 100644 --- a/docs/rules/meta-property-ordering.md +++ b/docs/rules/meta-property-ordering.md @@ -1,6 +1,6 @@ # Enforce the order of meta properties (meta-property-ordering) -⚒️ The `--fix` option on the [command line](https://eslint.org/docs/user-guide/command-line-interface#-fix) can automatically fix some of the problems reported by this rule. +⚒️ The `--fix` option on the [command line](https://eslint.org/docs/user-guide/command-line-interface#--fix) can automatically fix some of the problems reported by this rule. 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 9a9520ee..75bdfcba 100644 --- a/docs/rules/no-deprecated-context-methods.md +++ b/docs/rules/no-deprecated-context-methods.md @@ -1,6 +1,6 @@ # Disallow usage of deprecated methods on rule context objects (no-deprecated-context-methods) -⚒️ The `--fix` option on the [command line](https://eslint.org/docs/user-guide/command-line-interface#-fix) can automatically fix some of the problems reported by this rule. +⚒️ The `--fix` option on the [command line](https://eslint.org/docs/user-guide/command-line-interface#--fix) can automatically fix some of the problems reported by this rule. 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 657da9aa..19231d59 100644 --- a/docs/rules/no-deprecated-report-api.md +++ b/docs/rules/no-deprecated-report-api.md @@ -2,7 +2,7 @@ ✔️ The `"extends": "plugin:eslint-plugin/recommended"` property in a configuration file enables this rule. -⚒️ The `--fix` option on the [command line](https://eslint.org/docs/user-guide/command-line-interface#-fix) can automatically fix some of the problems reported by this rule. +⚒️ The `--fix` option on the [command line](https://eslint.org/docs/user-guide/command-line-interface#--fix) can automatically fix some of the problems reported by this rule. 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 935fb54b..5893c2d5 100644 --- a/docs/rules/no-identical-tests.md +++ b/docs/rules/no-identical-tests.md @@ -2,7 +2,7 @@ ✔️ The `"extends": "plugin:eslint-plugin/recommended"` property in a configuration file enables this rule. -⚒️ The `--fix` option on the [command line](https://eslint.org/docs/user-guide/command-line-interface#-fix) can automatically fix some of the problems reported by this rule. +⚒️ The `--fix` option on the [command line](https://eslint.org/docs/user-guide/command-line-interface#--fix) can automatically fix some of the problems reported by this rule. When a rule has a lot of tests, it's sometimes difficult to tell if any tests are duplicates. This rule would warn if any test cases have the same properties. diff --git a/docs/rules/no-useless-token-range.md b/docs/rules/no-useless-token-range.md index 091cea19..6bd4de80 100644 --- a/docs/rules/no-useless-token-range.md +++ b/docs/rules/no-useless-token-range.md @@ -2,7 +2,7 @@ ✔️ The `"extends": "plugin:eslint-plugin/recommended"` property in a configuration file enables this rule. -⚒️ The `--fix` option on the [command line](https://eslint.org/docs/user-guide/command-line-interface#-fix) can automatically fix some of the problems reported by this rule. +⚒️ The `--fix` option on the [command line](https://eslint.org/docs/user-guide/command-line-interface#--fix) can automatically fix some of the problems reported by this rule. 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-object-rule.md b/docs/rules/prefer-object-rule.md index ed15be6e..095835ac 100644 --- a/docs/rules/prefer-object-rule.md +++ b/docs/rules/prefer-object-rule.md @@ -1,6 +1,6 @@ # Disallow rule exports where the export is a function (prefer-object-rule) -⚒️ The `--fix` option on the [command line](https://eslint.org/docs/user-guide/command-line-interface#-fix) can automatically fix some of the problems reported by this rule. +⚒️ The `--fix` option on the [command line](https://eslint.org/docs/user-guide/command-line-interface#--fix) can automatically fix some of the problems reported by this rule. ## Rule Details diff --git a/docs/rules/prefer-output-null.md b/docs/rules/prefer-output-null.md index 85c94413..e45256d8 100644 --- a/docs/rules/prefer-output-null.md +++ b/docs/rules/prefer-output-null.md @@ -1,6 +1,6 @@ # Disallow invalid RuleTester test cases where the `output` matches the `code` (prefer-output-null) -⚒️ The `--fix` option on the [command line](https://eslint.org/docs/user-guide/command-line-interface#-fix) can automatically fix some of the problems reported by this rule. +⚒️ The `--fix` option on the [command line](https://eslint.org/docs/user-guide/command-line-interface#--fix) can automatically fix some of the problems reported by this rule. 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/require-meta-docs-url.md b/docs/rules/require-meta-docs-url.md index 9d8e4caa..e71f1bf1 100644 --- a/docs/rules/require-meta-docs-url.md +++ b/docs/rules/require-meta-docs-url.md @@ -1,6 +1,6 @@ # Require rules to implement a `meta.docs.url` property (require-meta-docs-url) -⚒️ The `--fix` option on the [command line](https://eslint.org/docs/user-guide/command-line-interface#-fix) can automatically fix some of the problems reported by this rule. +⚒️ The `--fix` option on the [command line](https://eslint.org/docs/user-guide/command-line-interface#--fix) can automatically fix some of the problems reported by this rule. 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-schema.md b/docs/rules/require-meta-schema.md index 224c35e2..af5f773c 100644 --- a/docs/rules/require-meta-schema.md +++ b/docs/rules/require-meta-schema.md @@ -1,6 +1,6 @@ # Require rules to implement a `meta.schema` property (require-meta-schema) -⚒️ The `--fix` option on the [command line](https://eslint.org/docs/user-guide/command-line-interface#-fix) can automatically fix some of the problems reported by this rule. +⚒️ The `--fix` option on the [command line](https://eslint.org/docs/user-guide/command-line-interface#--fix) can automatically fix some of the problems reported by this rule. 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 should still be defined (as an empty array) so that eslint can validate that no data is mistakenly passed to the rule. diff --git a/docs/rules/test-case-property-ordering.md b/docs/rules/test-case-property-ordering.md index 993fe1eb..4e62d531 100644 --- a/docs/rules/test-case-property-ordering.md +++ b/docs/rules/test-case-property-ordering.md @@ -1,6 +1,6 @@ # Require the properties of a test case to be placed in a consistent order (test-case-property-ordering) -⚒️ The `--fix` option on the [command line](https://eslint.org/docs/user-guide/command-line-interface#-fix) can automatically fix some of the problems reported by this rule. +⚒️ The `--fix` option on the [command line](https://eslint.org/docs/user-guide/command-line-interface#--fix) can automatically fix some of the problems reported by this rule. 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 14a81222..bed82065 100644 --- a/docs/rules/test-case-shorthand-strings.md +++ b/docs/rules/test-case-shorthand-strings.md @@ -1,6 +1,6 @@ # Enforce consistent usage of shorthand strings for test cases with no options (test-case-shorthand-strings) -⚒️ The `--fix` option on the [command line](https://eslint.org/docs/user-guide/command-line-interface#-fix) can automatically fix some of the problems reported by this rule. +⚒️ The `--fix` option on the [command line](https://eslint.org/docs/user-guide/command-line-interface#--fix) can automatically fix some of the problems reported by this rule. 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/tests/lib/rule-setup.js b/tests/lib/rule-setup.js index 3efe9cb1..856f4a57 100644 --- a/tests/lib/rule-setup.js +++ b/tests/lib/rule-setup.js @@ -10,7 +10,7 @@ const RULE_NAMES_RECOMMENDED = new Set(Object.keys(plugin.configs.recommended.ru const MESSAGES = { fixable: - '⚒️ The `--fix` option on the [command line](https://eslint.org/docs/user-guide/command-line-interface#-fix) can automatically fix some of the problems reported by this rule.', + '⚒️ The `--fix` option on the [command line](https://eslint.org/docs/user-guide/command-line-interface#--fix) can automatically fix some of the problems reported by this rule.', configRecommended: '✔️ The `"extends": "plugin:eslint-plugin/recommended"` property in a configuration file enables this rule.', hasSuggestions: '💡 Some problems reported by this rule are manually fixable by editor [suggestions](https://eslint.org/docs/developer-guide/working-with-rules#providing-suggestions).',