Skip to content

Commit 78ecfe0

Browse files
authored
docs: use inline code for rule options name (#16768)
1 parent 3e34418 commit 78ecfe0

4 files changed

Lines changed: 10 additions & 10 deletions

File tree

docs/src/rules/class-methods-use-this.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -118,9 +118,9 @@ This rule has two options:
118118
"class-methods-use-this": [<enabled>, { "exceptMethods": [<...exceptions>] }]
119119
```
120120

121-
The `exceptMethods` option allows you to pass an array of method names for which you would like to ignore warnings. For example, you might have a spec from an external library that requires you to overwrite a method as a regular function (and not as a static method) and does not use `this` inside the function body. In this case, you can add that method to ignore in the warnings.
121+
The `"exceptMethods"` option allows you to pass an array of method names for which you would like to ignore warnings. For example, you might have a spec from an external library that requires you to overwrite a method as a regular function (and not as a static method) and does not use `this` inside the function body. In this case, you can add that method to ignore in the warnings.
122122

123-
Examples of **incorrect** code for this rule when used without exceptMethods:
123+
Examples of **incorrect** code for this rule when used without `"exceptMethods"`:
124124

125125
::: incorrect
126126

docs/src/rules/eqeqeq.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ foo == null
139139

140140
### allow-null
141141

142-
**Deprecated:** Instead of using this option use "always" and pass a "null" option property with value "ignore". This will tell ESLint to always enforce strict equality except when comparing with the `null` literal.
142+
**Deprecated:** Instead of using this option use `"always"` and pass a `"null"` option property with value `"ignore"`. This will tell ESLint to always enforce strict equality except when comparing with the `null` literal.
143143

144144
```js
145145
["error", "always", {"null": "ignore"}]

docs/src/rules/func-name-matching.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ module['exports'] = function foo(name) {};
145145

146146
## Options
147147

148-
This rule takes an optional string of "always" or "never" (when omitted, it defaults to "always"), and an optional options object with two properties `considerPropertyDescriptor` and `includeCommonJSModuleExports`.
148+
This rule takes an optional string of `"always"` or `"never"` (when omitted, it defaults to `"always"`), and an optional options object with two properties `considerPropertyDescriptor` and `includeCommonJSModuleExports`.
149149

150150
### considerPropertyDescriptor
151151

docs/src/rules/generator-star-spacing.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -51,14 +51,14 @@ This rule aims to enforce spacing around the `*` of generator functions.
5151

5252
## Options
5353

54-
The rule takes one option, an object, which has two keys `before` and `after` having boolean values `true` or `false`.
54+
The rule takes one option, an object, which has two keys `"before"` and `"after"` having boolean values `true` or `false`.
5555

56-
* `before` enforces spacing between the `*` and the `function` keyword.
56+
* `"before"` enforces spacing between the `*` and the `function` keyword.
5757
If it is `true`, a space is required, otherwise spaces are disallowed.
5858

5959
In object literal shorthand methods, spacing before the `*` is not checked, as they lack a `function` keyword.
6060

61-
* `after` enforces spacing between the `*` and the function name (or the opening parenthesis for anonymous generator functions).
61+
* `"after"` enforces spacing between the `*` and the function name (or the opening parenthesis for anonymous generator functions).
6262
If it is `true`, a space is required, otherwise spaces are disallowed.
6363

6464
The default is `{"before": true, "after": false}`.
@@ -99,9 +99,9 @@ An example of a configuration with overrides:
9999
}]
100100
```
101101

102-
In the example configuration above, the top level "before" and "after" options define the default behavior of
103-
the rule, while the "anonymous" and "method" options override the default behavior.
104-
Overrides can be either an object with "before" and "after", or a shorthand string as above.
102+
In the example configuration above, the top level `"before"` and `"after"` options define the default behavior of
103+
the rule, while the `"anonymous"` and `"method"` options override the default behavior.
104+
Overrides can be either an object with `"before"` and `"after"`, or a shorthand string as above.
105105

106106
## Examples
107107

0 commit comments

Comments
 (0)