Skip to content

Commit bd9a650

Browse files
authored
docs: modernize rule doc for require-meta-schema (eslint-community#266)
1 parent f90478c commit bd9a650

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

docs/rules/require-meta-schema.md

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

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

7-
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.
7+
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.
8+
9+
As of [ESLint v9](https://github.com/eslint/rfcs/tree/main/designs/2021-schema-object-rules#motivation-for-requiring-schemas), ESLint will validate that options are not provided to a rule when a schema is omitted.
810

911
## Rule Details
1012

@@ -75,6 +77,10 @@ This rule takes an optional object containing:
7577

7678
* `boolean``requireSchemaPropertyWhenOptionless` — Whether the rule should require the `meta.schema` property to be specified (with `schema: []`) for rules that have no options. Defaults to `true`.
7779

80+
## When Not To Use It
81+
82+
As mentioned in the introduction, the need for this rule is reduced as of ESLint v9.
83+
7884
## Further Reading
7985

8086
* [working-with-rules#options-schemas](https://eslint.org/docs/developer-guide/working-with-rules#options-schemas)

0 commit comments

Comments
 (0)