Commit 9fc6374
authored
docs(linter): Add configuration option docs for eslint/no-misleading-character-class rule. (#15058)
These docs already existed, but weren't using the standard format.
Part of #14743.
Generated docs:
```md
## Configuration
This rule accepts a configuration object with the following properties:
### allowEscape
type: `boolean`
default: `false`
When set to `true`, the rule allows any grouping of code points
inside a character class as long as they are written using escape sequences.
Examples of **incorrect** code for this rule with `{ "allowEscape": true }`:
```javascript
/[\uD83D]/; // backslash can be omitted
new RegExp("[\ud83d" + "\udc4d]");
```
Examples of **correct** code for this rule with `{ "allowEscape": true }`:
```javascript
/[\ud83d\udc4d]/;
/[\u00B7\u0300-\u036F]/u;
/[👨\u200d👩]/u;
new RegExp("[\x41\u0301]");
new RegExp(`[\u{1F1EF}\u{1F1F5}]`, "u");
new RegExp("[\\u{1F1EF}\\u{1F1F5}]", "u");
```
```1 parent be87ace commit 9fc6374
File tree
1 file changed
+22
-24
lines changed- crates/oxc_linter/src/rules/eslint
1 file changed
+22
-24
lines changedLines changed: 22 additions & 24 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
| 9 | + | |
9 | 10 | | |
10 | 11 | | |
11 | 12 | | |
| |||
29 | 30 | | |
30 | 31 | | |
31 | 32 | | |
32 | | - | |
| 33 | + | |
| 34 | + | |
33 | 35 | | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
34 | 54 | | |
35 | 55 | | |
36 | 56 | | |
| |||
77 | 97 | | |
78 | 98 | | |
79 | 99 | | |
80 | | - | |
81 | | - | |
82 | | - | |
83 | | - | |
84 | | - | |
85 | | - | |
86 | | - | |
87 | | - | |
88 | | - | |
89 | | - | |
90 | | - | |
91 | | - | |
92 | | - | |
93 | | - | |
94 | | - | |
95 | | - | |
96 | | - | |
97 | | - | |
98 | | - | |
99 | | - | |
100 | | - | |
101 | | - | |
102 | | - | |
103 | 100 | | |
104 | 101 | | |
105 | 102 | | |
| 103 | + | |
106 | 104 | | |
107 | 105 | | |
108 | 106 | | |
| |||
0 commit comments