Sitelet https://github.com/eslint/eslint/commit/9e5a5c2b6b368cdacd678eabf36b441bd8bb726c
Skip to content

Commit 9e5a5c2

Browse files
authored
docs: remove Examples headings from rule docs (#20364)
1 parent 194f488 commit 9e5a5c2

11 files changed

Lines changed: 0 additions & 21 deletions

‎Makefile.js‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -695,7 +695,6 @@ target.checkRuleFiles = function () {
695695
"Rule Details",
696696
"Options",
697697
"Environments",
698-
"Examples",
699698
"Known Limitations",
700699
"When Not To Use It",
701700
"Compatibility",

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

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -94,8 +94,6 @@ In the example configuration above, the top level `"before"` and `"after"` optio
9494
the rule, while the `"anonymous"` and `"method"` options override the default behavior.
9595
Overrides can be either an object with `"before"` and `"after"`, or a shorthand string as above.
9696

97-
## Examples
98-
9997
### before
10098

10199
Examples of **correct** code for this rule with the `"before"` option:

‎docs/src/rules/no-new-symbol.md‎

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,6 @@ This throws a `TypeError` exception.
1818

1919
This rule is aimed at preventing the accidental calling of `Symbol` with the `new` operator.
2020

21-
## Examples
22-
2321
Examples of **incorrect** code for this rule:
2422

2523
::: incorrect

‎docs/src/rules/no-restricted-modules.md‎

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,8 +68,6 @@ To restrict the use of all Node.js core modules (via <https://github.com/nodejs/
6868
}
6969
```
7070

71-
## Examples
72-
7371
Examples of **incorrect** code for this rule with sample `"fs", "cluster", "lodash"` restricted modules:
7472

7573
::: incorrect

‎docs/src/rules/object-property-newline.md‎

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -177,8 +177,6 @@ ESLint does not correct a violation of this rule if a comment immediately preced
177177

178178
As illustrated above, the `--fix` option, applied to this rule, does not comply with other rules, such as `indent`, but, if those other rules are also in effect, the option applies them, too.
179179

180-
## Examples
181-
182180
Examples of **incorrect** code for this rule, with no object option or with `allowAllPropertiesOnSameLine` set to `false`:
183181

184182
::: incorrect

‎docs/src/rules/padding-line-between-statements.md‎

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,8 +85,6 @@ You can supply any number of configurations. If a statement pair matches multipl
8585
* `"while"` is `while` loop statements.
8686
* `"with"` is `with` statements.
8787

88-
## Examples
89-
9088
This configuration would require blank lines before all `return` statements, like the [newline-before-return](newline-before-return) rule.
9189

9290
Examples of **incorrect** code for the `[{ blankLine: "always", prev: "*", next: "return" }]` configuration:

‎docs/src/rules/sort-imports.md‎

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,8 +65,6 @@ Default option settings are:
6565
}
6666
```
6767

68-
## Examples
69-
7068
### Default settings
7169

7270
Examples of **correct** code for this rule when using default options:

‎docs/src/rules/space-in-parens.md‎

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -135,8 +135,6 @@ Empty parens exception and behavior:
135135
* `always` excepting `empty` requires `()`
136136
* `never` excepting `empty` requires `( )` (empty parens without a space is here forbidden)
137137

138-
### Examples
139-
140138
Examples of **incorrect** code for this rule with the `"never", { "exceptions": ["{}"] }` option:
141139

142140
::: incorrect

‎docs/src/rules/template-curly-spacing.md‎

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,6 @@ This rule has one option which has either `"never"` or `"always"` as value.
2727
* `"never"` (by default) - Disallows spaces inside of the curly brace pair.
2828
* `"always"` - Requires one or more spaces inside of the curly brace pair.
2929

30-
## Examples
31-
3230
### never
3331

3432
Examples of **incorrect** code for this rule with the default `"never"` option:

‎docs/src/rules/template-tag-spacing.md‎

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,6 @@ This rule has one option whose value can be set to `"never"` or `"always"`
3333
* `"never"` (default) - Disallows spaces between a tag function and its template literal.
3434
* `"always"` - Requires one or more spaces between a tag function and its template literal.
3535

36-
## Examples
37-
3836
### never
3937

4038
Examples of **incorrect** code for this rule with the default `"never"` option:

0 commit comments

Comments
 (0)