Skip to content

Commit 7b4ad4b

Browse files
authored
Change config and default (#49)
1 parent d224ebe commit 7b4ad4b

File tree

80 files changed

+213
-206
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

80 files changed

+213
-206
lines changed

README.md

Lines changed: 36 additions & 36 deletions
Large diffs are not rendered by default.

docs/rules/README.md

Lines changed: 36 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -13,53 +13,53 @@ The rules with the following star :star: are included in the `plugin:regexp/reco
1313

1414
| Rule ID | Description | |
1515
|:--------|:------------|:---|
16-
| [regexp/no-dupe-disjunctions](./no-dupe-disjunctions.md) | disallow duplicate disjunctions | |
17-
| [regexp/no-empty-alternative](./no-empty-alternative.md) | disallow alternatives without elements | |
18-
| [regexp/no-empty-capturing-group](./no-empty-capturing-group.md) | disallow capturing group that captures empty. | |
16+
| [regexp/no-dupe-disjunctions](./no-dupe-disjunctions.md) | disallow duplicate disjunctions | :star: |
17+
| [regexp/no-empty-alternative](./no-empty-alternative.md) | disallow alternatives without elements | :star: |
18+
| [regexp/no-empty-capturing-group](./no-empty-capturing-group.md) | disallow capturing group that captures empty. | :star: |
1919
| [regexp/no-empty-group](./no-empty-group.md) | disallow empty group | :star: |
2020
| [regexp/no-empty-lookarounds-assertion](./no-empty-lookarounds-assertion.md) | disallow empty lookahead assertion or empty lookbehind assertion | :star: |
2121
| [regexp/no-escape-backspace](./no-escape-backspace.md) | disallow escape backspace (`[\b]`) | :star: |
22-
| [regexp/no-invalid-regexp](./no-invalid-regexp.md) | disallow invalid regular expression strings in `RegExp` constructors | |
23-
| [regexp/no-lazy-ends](./no-lazy-ends.md) | disallow lazy quantifiers at the end of an expression | |
24-
| [regexp/no-optional-assertion](./no-optional-assertion.md) | disallow optional assertions | |
25-
| [regexp/no-potentially-useless-backreference](./no-potentially-useless-backreference.md) | disallow backreferences that reference a group that might not be matched | |
26-
| [regexp/no-super-linear-backtracking](./no-super-linear-backtracking.md) | disallow exponential and polynomial backtracking | :wrench: |
22+
| [regexp/no-invalid-regexp](./no-invalid-regexp.md) | disallow invalid regular expression strings in `RegExp` constructors | :star: |
23+
| [regexp/no-lazy-ends](./no-lazy-ends.md) | disallow lazy quantifiers at the end of an expression | :star: |
24+
| [regexp/no-optional-assertion](./no-optional-assertion.md) | disallow optional assertions | :star: |
25+
| [regexp/no-potentially-useless-backreference](./no-potentially-useless-backreference.md) | disallow backreferences that reference a group that might not be matched | :star: |
26+
| [regexp/no-super-linear-backtracking](./no-super-linear-backtracking.md) | disallow exponential and polynomial backtracking | :star::wrench: |
2727
| [regexp/no-super-linear-move](./no-super-linear-move.md) | disallow quantifiers that cause quadratic moves | |
28-
| [regexp/no-useless-assertions](./no-useless-assertions.md) | disallow assertions that are known to always accept (or reject) | |
28+
| [regexp/no-useless-assertions](./no-useless-assertions.md) | disallow assertions that are known to always accept (or reject) | :star: |
2929
| [regexp/no-useless-backreference](./no-useless-backreference.md) | disallow useless backreferences in regular expressions | :star: |
30-
| [regexp/no-useless-dollar-replacements](./no-useless-dollar-replacements.md) | disallow useless `$` replacements in replacement string | |
31-
| [regexp/strict](./strict.md) | disallow not strictly valid regular expressions | :wrench: |
30+
| [regexp/no-useless-dollar-replacements](./no-useless-dollar-replacements.md) | disallow useless `$` replacements in replacement string | :star: |
31+
| [regexp/strict](./strict.md) | disallow not strictly valid regular expressions | :star::wrench: |
3232

3333
### Best Practices
3434

3535
| Rule ID | Description | |
3636
|:--------|:------------|:---|
37-
| [regexp/confusing-quantifier](./confusing-quantifier.md) | disallow confusing quantifiers | |
38-
| [regexp/control-character-escape](./control-character-escape.md) | enforce consistent escaping of control characters | :wrench: |
39-
| [regexp/negation](./negation.md) | enforce use of escapes on negation | :wrench: |
37+
| [regexp/confusing-quantifier](./confusing-quantifier.md) | disallow confusing quantifiers | :star: |
38+
| [regexp/control-character-escape](./control-character-escape.md) | enforce consistent escaping of control characters | :star::wrench: |
39+
| [regexp/negation](./negation.md) | enforce use of escapes on negation | :star::wrench: |
4040
| [regexp/no-dupe-characters-character-class](./no-dupe-characters-character-class.md) | disallow duplicate characters in the RegExp character class | :star::wrench: |
4141
| [regexp/no-invisible-character](./no-invisible-character.md) | disallow invisible raw character | :star::wrench: |
42-
| [regexp/no-legacy-features](./no-legacy-features.md) | disallow legacy RegExp features | |
43-
| [regexp/no-non-standard-flag](./no-non-standard-flag.md) | disallow non-standard flags | |
44-
| [regexp/no-obscure-range](./no-obscure-range.md) | disallow obscure character ranges | |
45-
| [regexp/no-octal](./no-octal.md) | disallow octal escape sequence | :star: |
42+
| [regexp/no-legacy-features](./no-legacy-features.md) | disallow legacy RegExp features | :star: |
43+
| [regexp/no-non-standard-flag](./no-non-standard-flag.md) | disallow non-standard flags | :star: |
44+
| [regexp/no-obscure-range](./no-obscure-range.md) | disallow obscure character ranges | :star: |
45+
| [regexp/no-octal](./no-octal.md) | disallow octal escape sequence | |
4646
| [regexp/no-standalone-backslash](./no-standalone-backslash.md) | disallow standalone backslashes (`\`) | |
47-
| [regexp/no-trivially-nested-assertion](./no-trivially-nested-assertion.md) | disallow trivially nested assertions | :wrench: |
48-
| [regexp/no-trivially-nested-quantifier](./no-trivially-nested-quantifier.md) | disallow nested quantifiers that can be rewritten as one quantifier | :wrench: |
49-
| [regexp/no-unused-capturing-group](./no-unused-capturing-group.md) | disallow unused capturing group | :wrench: |
50-
| [regexp/no-useless-character-class](./no-useless-character-class.md) | disallow character class with one character | :wrench: |
51-
| [regexp/no-useless-flag](./no-useless-flag.md) | disallow unnecessary regex flags | :wrench: |
52-
| [regexp/no-useless-lazy](./no-useless-lazy.md) | disallow unnecessarily non-greedy quantifiers | :wrench: |
53-
| [regexp/no-useless-quantifier](./no-useless-quantifier.md) | disallow quantifiers that can be removed | :wrench: |
54-
| [regexp/no-useless-range](./no-useless-range.md) | disallow unnecessary range of characters by using a hyphen | :wrench: |
47+
| [regexp/no-trivially-nested-assertion](./no-trivially-nested-assertion.md) | disallow trivially nested assertions | :star::wrench: |
48+
| [regexp/no-trivially-nested-quantifier](./no-trivially-nested-quantifier.md) | disallow nested quantifiers that can be rewritten as one quantifier | :star::wrench: |
49+
| [regexp/no-unused-capturing-group](./no-unused-capturing-group.md) | disallow unused capturing group | :star::wrench: |
50+
| [regexp/no-useless-character-class](./no-useless-character-class.md) | disallow character class with one character | :star::wrench: |
51+
| [regexp/no-useless-flag](./no-useless-flag.md) | disallow unnecessary regex flags | :star::wrench: |
52+
| [regexp/no-useless-lazy](./no-useless-lazy.md) | disallow unnecessarily non-greedy quantifiers | :star::wrench: |
53+
| [regexp/no-useless-quantifier](./no-useless-quantifier.md) | disallow quantifiers that can be removed | :star::wrench: |
54+
| [regexp/no-useless-range](./no-useless-range.md) | disallow unnecessary range of characters by using a hyphen | :star::wrench: |
5555
| [regexp/no-useless-two-nums-quantifier](./no-useless-two-nums-quantifier.md) | disallow unnecessary `{n,m}` quantifier | :star::wrench: |
56-
| [regexp/no-zero-quantifier](./no-zero-quantifier.md) | disallow quantifiers with a maximum of zero | |
57-
| [regexp/optimal-lookaround-quantifier](./optimal-lookaround-quantifier.md) | disallow the alternatives of lookarounds that end with a non-constant quantifier | |
58-
| [regexp/optimal-quantifier-concatenation](./optimal-quantifier-concatenation.md) | require optimal quantifiers for concatenated quantifiers | :wrench: |
56+
| [regexp/no-zero-quantifier](./no-zero-quantifier.md) | disallow quantifiers with a maximum of zero | :star: |
57+
| [regexp/optimal-lookaround-quantifier](./optimal-lookaround-quantifier.md) | disallow the alternatives of lookarounds that end with a non-constant quantifier | :star: |
58+
| [regexp/optimal-quantifier-concatenation](./optimal-quantifier-concatenation.md) | require optimal quantifiers for concatenated quantifiers | :star::wrench: |
5959
| [regexp/prefer-escape-replacement-dollar-char](./prefer-escape-replacement-dollar-char.md) | enforces escape of replacement `$` character (`$$`). | |
60-
| [regexp/prefer-predefined-assertion](./prefer-predefined-assertion.md) | prefer predefined assertion over equivalent lookarounds | :wrench: |
60+
| [regexp/prefer-predefined-assertion](./prefer-predefined-assertion.md) | prefer predefined assertion over equivalent lookarounds | :star::wrench: |
6161
| [regexp/prefer-quantifier](./prefer-quantifier.md) | enforce using quantifier | :wrench: |
62-
| [regexp/prefer-range](./prefer-range.md) | enforce using character class range | :wrench: |
62+
| [regexp/prefer-range](./prefer-range.md) | enforce using character class range | :star::wrench: |
6363
| [regexp/prefer-regexp-exec](./prefer-regexp-exec.md) | enforce that `RegExp#exec` is used instead of `String#match` if no global flag is provided | |
6464
| [regexp/prefer-regexp-test](./prefer-regexp-test.md) | enforce that `RegExp#test` is used instead of `String#match` and `RegExp#exec` | :wrench: |
6565
| [regexp/sort-alternatives](./sort-alternatives.md) | sort alternatives if order doesn't matter | :wrench: |
@@ -71,18 +71,18 @@ The rules with the following star :star: are included in the `plugin:regexp/reco
7171
| [regexp/hexadecimal-escape](./hexadecimal-escape.md) | enforce consistent usage of hexadecimal escape | :wrench: |
7272
| [regexp/letter-case](./letter-case.md) | enforce into your favorite case | :wrench: |
7373
| [regexp/match-any](./match-any.md) | enforce match any character style | :star::wrench: |
74-
| [regexp/no-useless-escape](./no-useless-escape.md) | disallow unnecessary escape characters in RegExp | :wrench: |
75-
| [regexp/no-useless-non-capturing-group](./no-useless-non-capturing-group.md) | disallow unnecessary Non-capturing group | :wrench: |
76-
| [regexp/prefer-character-class](./prefer-character-class.md) | enforce using character class | :wrench: |
74+
| [regexp/no-useless-escape](./no-useless-escape.md) | disallow unnecessary escape characters in RegExp | :star::wrench: |
75+
| [regexp/no-useless-non-capturing-group](./no-useless-non-capturing-group.md) | disallow unnecessary Non-capturing group | :star::wrench: |
76+
| [regexp/prefer-character-class](./prefer-character-class.md) | enforce using character class | :star::wrench: |
7777
| [regexp/prefer-d](./prefer-d.md) | enforce using `\d` | :star::wrench: |
7878
| [regexp/prefer-named-backreference](./prefer-named-backreference.md) | enforce using named backreferences | :wrench: |
7979
| [regexp/prefer-plus-quantifier](./prefer-plus-quantifier.md) | enforce using `+` quantifier | :star::wrench: |
8080
| [regexp/prefer-question-quantifier](./prefer-question-quantifier.md) | enforce using `?` quantifier | :star::wrench: |
8181
| [regexp/prefer-star-quantifier](./prefer-star-quantifier.md) | enforce using `*` quantifier | :star::wrench: |
82-
| [regexp/prefer-unicode-codepoint-escapes](./prefer-unicode-codepoint-escapes.md) | enforce use of unicode codepoint escapes | :wrench: |
82+
| [regexp/prefer-unicode-codepoint-escapes](./prefer-unicode-codepoint-escapes.md) | enforce use of unicode codepoint escapes | :star::wrench: |
8383
| [regexp/prefer-w](./prefer-w.md) | enforce using `\w` | :star::wrench: |
8484
| [regexp/sort-character-class-elements](./sort-character-class-elements.md) | enforces elements order in character class | :wrench: |
85-
| [regexp/sort-flags](./sort-flags.md) | require regex flags to be sorted | :wrench: |
85+
| [regexp/sort-flags](./sort-flags.md) | require regex flags to be sorted | :star::wrench: |
8686
| [regexp/unicode-escape](./unicode-escape.md) | enforce consistent usage of unicode escape or unicode codepoint escape | :wrench: |
8787

8888
### Deprecated

docs/rules/confusing-quantifier.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ since: "v0.8.0"
99

1010
> disallow confusing quantifiers
1111
12+
- :gear: This rule is included in `"plugin:regexp/recommended"`.
13+
1214
## :book: Rule Details
1315

1416
Confusing quantifiers are ones which imply one thing but don't deliver on that.

docs/rules/control-character-escape.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ since: "v0.9.0"
99

1010
> enforce consistent escaping of control characters
1111
12+
- :gear: This rule is included in `"plugin:regexp/recommended"`.
1213
- :wrench: The `--fix` option on the [command line](https://eslint.org/docs/user-guide/command-line-interface#fixing-problems) can automatically fix some of the problems reported by this rule.
1314

1415
## :book: Rule Details

docs/rules/letter-case.md

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,8 @@ var foo = /\ca/
4242
"regexp/letter-case": ["error", {
4343
"caseInsensitive": "lowercase", // or "uppercase" or "ignore"
4444
"unicodeEscape": "lowercase", // or "uppercase" or "ignore"
45-
"hexadecimalEscape": "ignore", // or "lowercase" or "uppercase"
46-
"controlEscape": "ignore", // or "lowercase" or "uppercase"
45+
"hexadecimalEscape": "lowercase", // or "uppercase" or "ignore"
46+
"controlEscape": "uppercase", // or "lowercase" or "ignore"
4747
}]
4848
}
4949
```
@@ -55,10 +55,8 @@ var foo = /\ca/
5555
- Properties
5656
- `caseInsensitive` ... Specifies the letter case when the `i` flag is present. Default is `"lowercase"`.
5757
- `unicodeEscape` ... Specifies the letter case when the unicode escapes. Default is `"lowercase"`.
58-
- `hexadecimalEscape` ... Specifies the letter case when the hexadecimal escapes. Default is `"ignore"`.
59-
(The default value will change to `"lowercase"` in the next major version.)
60-
- `controlEscape` ... Specifies the letter case when the control escapes (e.g. `\cX`). Default is `"ignore"`.
61-
(The default value will change to `"uppercase"` in the next major version.)
58+
- `hexadecimalEscape` ... Specifies the letter case when the hexadecimal escapes. Default is `"ignolowercasere"`.
59+
- `controlEscape` ... Specifies the letter case when the control escapes (e.g. `\cX`). Default is `"uppercase"`.
6260

6361
## :rocket: Version
6462

docs/rules/negation.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ since: "v0.4.0"
99

1010
> enforce use of escapes on negation
1111
12+
- :gear: This rule is included in `"plugin:regexp/recommended"`.
1213
- :wrench: The `--fix` option on the [command line](https://eslint.org/docs/user-guide/command-line-interface#fixing-problems) can automatically fix some of the problems reported by this rule.
1314

1415
## :book: Rule Details

docs/rules/no-dupe-disjunctions.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ since: "v0.4.0"
99

1010
> disallow duplicate disjunctions
1111
12+
- :gear: This rule is included in `"plugin:regexp/recommended"`.
13+
1214
## :book: Rule Details
1315

1416
This rule disallows duplicate disjunctions.

docs/rules/no-empty-alternative.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ since: "v0.8.0"
99

1010
> disallow alternatives without elements
1111
12+
- :gear: This rule is included in `"plugin:regexp/recommended"`.
13+
1214
## :book: Rule Details
1315

1416
While (re-)writing long regular expressions, it can happen that one forgets to

docs/rules/no-empty-capturing-group.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ since: "v0.12.0"
99

1010
> disallow capturing group that captures empty.
1111
12+
- :gear: This rule is included in `"plugin:regexp/recommended"`.
13+
1214
## :book: Rule Details
1315

1416
This rule reports capturing group that captures assertions.

docs/rules/no-invalid-regexp.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ description: "disallow invalid regular expression strings in `RegExp` constructo
99
> disallow invalid regular expression strings in `RegExp` constructors
1010
1111
- :exclamation: <badge text="This rule has not been released yet." vertical="middle" type="error"> ***This rule has not been released yet.*** </badge>
12+
- :gear: This rule is included in `"plugin:regexp/recommended"`.
1213

1314
## :book: Rule Details
1415

0 commit comments

Comments
 (0)