Skip to content

Change recommended config #552

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Aug 15, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/khaki-colts-tell.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"eslint-plugin-regexp": major
---

Change recommended config
14 changes: 7 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -109,20 +109,20 @@ The `plugin:regexp/all` config enables all rules. It's meant for testing, not fo

| Name                                 | Description | 💼 | ⚠️ | 🔧 | 💡 |
| :--------------------------------------------------------------------------------------------------------------------------------------- | :-------------------------------------------------------------------------------------- | :- | :- | :- | :- |
| [no-contradiction-with-assertion](https://ota-meshi.github.io/eslint-plugin-regexp/rules/no-contradiction-with-assertion.html) | disallow elements that contradict assertions | | | | 💡 |
| [no-contradiction-with-assertion](https://ota-meshi.github.io/eslint-plugin-regexp/rules/no-contradiction-with-assertion.html) | disallow elements that contradict assertions | | | | 💡 |
| [no-control-character](https://ota-meshi.github.io/eslint-plugin-regexp/rules/no-control-character.html) | disallow control characters | | | | 💡 |
| [no-dupe-disjunctions](https://ota-meshi.github.io/eslint-plugin-regexp/rules/no-dupe-disjunctions.html) | disallow duplicate disjunctions | ✅ | | | 💡 |
| [no-empty-alternative](https://ota-meshi.github.io/eslint-plugin-regexp/rules/no-empty-alternative.html) | disallow alternatives without elements | | ✅ | | |
| [no-empty-capturing-group](https://ota-meshi.github.io/eslint-plugin-regexp/rules/no-empty-capturing-group.html) | disallow capturing group that captures empty. | ✅ | | | |
| [no-empty-character-class](https://ota-meshi.github.io/eslint-plugin-regexp/rules/no-empty-character-class.html) | disallow character classes that match no characters | | | | |
| [no-empty-character-class](https://ota-meshi.github.io/eslint-plugin-regexp/rules/no-empty-character-class.html) | disallow character classes that match no characters | | | | |
| [no-empty-group](https://ota-meshi.github.io/eslint-plugin-regexp/rules/no-empty-group.html) | disallow empty group | ✅ | | | |
| [no-empty-lookarounds-assertion](https://ota-meshi.github.io/eslint-plugin-regexp/rules/no-empty-lookarounds-assertion.html) | disallow empty lookahead assertion or empty lookbehind assertion | ✅ | | | |
| [no-escape-backspace](https://ota-meshi.github.io/eslint-plugin-regexp/rules/no-escape-backspace.html) | disallow escape backspace (`[\b]`) | ✅ | | | |
| [no-invalid-regexp](https://ota-meshi.github.io/eslint-plugin-regexp/rules/no-invalid-regexp.html) | disallow invalid regular expression strings in `RegExp` constructors | ✅ | | | |
| [no-lazy-ends](https://ota-meshi.github.io/eslint-plugin-regexp/rules/no-lazy-ends.html) | disallow lazy quantifiers at the end of an expression | | ✅ | | |
| [no-misleading-capturing-group](https://ota-meshi.github.io/eslint-plugin-regexp/rules/no-misleading-capturing-group.html) | disallow capturing groups that do not behave as one would expect | | | | 💡 |
| [no-misleading-unicode-character](https://ota-meshi.github.io/eslint-plugin-regexp/rules/no-misleading-unicode-character.html) | disallow multi-code-point characters in character classes and quantifiers | | | 🔧 | 💡 |
| [no-missing-g-flag](https://ota-meshi.github.io/eslint-plugin-regexp/rules/no-missing-g-flag.html) | disallow missing `g` flag in patterns used in `String#matchAll` and `String#replaceAll` | | | 🔧 | |
| [no-misleading-capturing-group](https://ota-meshi.github.io/eslint-plugin-regexp/rules/no-misleading-capturing-group.html) | disallow capturing groups that do not behave as one would expect | | | | 💡 |
| [no-misleading-unicode-character](https://ota-meshi.github.io/eslint-plugin-regexp/rules/no-misleading-unicode-character.html) | disallow multi-code-point characters in character classes and quantifiers | | | 🔧 | 💡 |
| [no-missing-g-flag](https://ota-meshi.github.io/eslint-plugin-regexp/rules/no-missing-g-flag.html) | disallow missing `g` flag in patterns used in `String#matchAll` and `String#replaceAll` | | | 🔧 | |
| [no-optional-assertion](https://ota-meshi.github.io/eslint-plugin-regexp/rules/no-optional-assertion.html) | disallow optional assertions | ✅ | | | |
| [no-potentially-useless-backreference](https://ota-meshi.github.io/eslint-plugin-regexp/rules/no-potentially-useless-backreference.html) | disallow backreferences that reference a group that might not be matched | | ✅ | | |
| [no-super-linear-backtracking](https://ota-meshi.github.io/eslint-plugin-regexp/rules/no-super-linear-backtracking.html) | disallow exponential and polynomial backtracking | ✅ | | 🔧 | |
Expand All @@ -140,7 +140,7 @@ The `plugin:regexp/all` config enables all rules. It's meant for testing, not fo
| [control-character-escape](https://ota-meshi.github.io/eslint-plugin-regexp/rules/control-character-escape.html) | enforce consistent escaping of control characters | ✅ | | 🔧 | |
| [negation](https://ota-meshi.github.io/eslint-plugin-regexp/rules/negation.html) | enforce use of escapes on negation | ✅ | | 🔧 | |
| [no-dupe-characters-character-class](https://ota-meshi.github.io/eslint-plugin-regexp/rules/no-dupe-characters-character-class.html) | disallow duplicate characters in the RegExp character class | ✅ | | 🔧 | |
| [no-extra-lookaround-assertions](https://ota-meshi.github.io/eslint-plugin-regexp/rules/no-extra-lookaround-assertions.html) | disallow unnecessary nested lookaround assertions | | | 🔧 | |
| [no-extra-lookaround-assertions](https://ota-meshi.github.io/eslint-plugin-regexp/rules/no-extra-lookaround-assertions.html) | disallow unnecessary nested lookaround assertions | | | 🔧 | |
| [no-invisible-character](https://ota-meshi.github.io/eslint-plugin-regexp/rules/no-invisible-character.html) | disallow invisible raw character | ✅ | | 🔧 | |
| [no-legacy-features](https://ota-meshi.github.io/eslint-plugin-regexp/rules/no-legacy-features.html) | disallow legacy RegExp features | ✅ | | | |
| [no-non-standard-flag](https://ota-meshi.github.io/eslint-plugin-regexp/rules/no-non-standard-flag.html) | disallow non-standard flags | ✅ | | | |
Expand All @@ -167,7 +167,7 @@ The `plugin:regexp/all` config enables all rules. It's meant for testing, not fo
| [prefer-regexp-test](https://ota-meshi.github.io/eslint-plugin-regexp/rules/prefer-regexp-test.html) | enforce that `RegExp#test` is used instead of `String#match` and `RegExp#exec` | | | 🔧 | |
| [require-unicode-regexp](https://ota-meshi.github.io/eslint-plugin-regexp/rules/require-unicode-regexp.html) | enforce the use of the `u` flag | | | 🔧 | |
| [sort-alternatives](https://ota-meshi.github.io/eslint-plugin-regexp/rules/sort-alternatives.html) | sort alternatives if order doesn't matter | | | 🔧 | |
| [use-ignore-case](https://ota-meshi.github.io/eslint-plugin-regexp/rules/use-ignore-case.html) | use the `i` flag if it simplifies the pattern | | | 🔧 | |
| [use-ignore-case](https://ota-meshi.github.io/eslint-plugin-regexp/rules/use-ignore-case.html) | use the `i` flag if it simplifies the pattern | | | 🔧 | |

### Stylistic Issues

Expand Down
14 changes: 7 additions & 7 deletions docs/rules/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,20 +16,20 @@ sidebarDepth: 0

| Name                                 | Description | 💼 | ⚠️ | 🔧 | 💡 |
| :------------------------------------------------------------------------------ | :-------------------------------------------------------------------------------------- | :- | :- | :- | :- |
| [no-contradiction-with-assertion](no-contradiction-with-assertion.md) | disallow elements that contradict assertions | | | | 💡 |
| [no-contradiction-with-assertion](no-contradiction-with-assertion.md) | disallow elements that contradict assertions | | | | 💡 |
| [no-control-character](no-control-character.md) | disallow control characters | | | | 💡 |
| [no-dupe-disjunctions](no-dupe-disjunctions.md) | disallow duplicate disjunctions | ✅ | | | 💡 |
| [no-empty-alternative](no-empty-alternative.md) | disallow alternatives without elements | | ✅ | | |
| [no-empty-capturing-group](no-empty-capturing-group.md) | disallow capturing group that captures empty. | ✅ | | | |
| [no-empty-character-class](no-empty-character-class.md) | disallow character classes that match no characters | | | | |
| [no-empty-character-class](no-empty-character-class.md) | disallow character classes that match no characters | | | | |
| [no-empty-group](no-empty-group.md) | disallow empty group | ✅ | | | |
| [no-empty-lookarounds-assertion](no-empty-lookarounds-assertion.md) | disallow empty lookahead assertion or empty lookbehind assertion | ✅ | | | |
| [no-escape-backspace](no-escape-backspace.md) | disallow escape backspace (`[\b]`) | ✅ | | | |
| [no-invalid-regexp](no-invalid-regexp.md) | disallow invalid regular expression strings in `RegExp` constructors | ✅ | | | |
| [no-lazy-ends](no-lazy-ends.md) | disallow lazy quantifiers at the end of an expression | | ✅ | | |
| [no-misleading-capturing-group](no-misleading-capturing-group.md) | disallow capturing groups that do not behave as one would expect | | | | 💡 |
| [no-misleading-unicode-character](no-misleading-unicode-character.md) | disallow multi-code-point characters in character classes and quantifiers | | | 🔧 | 💡 |
| [no-missing-g-flag](no-missing-g-flag.md) | disallow missing `g` flag in patterns used in `String#matchAll` and `String#replaceAll` | | | 🔧 | |
| [no-misleading-capturing-group](no-misleading-capturing-group.md) | disallow capturing groups that do not behave as one would expect | | | | 💡 |
| [no-misleading-unicode-character](no-misleading-unicode-character.md) | disallow multi-code-point characters in character classes and quantifiers | | | 🔧 | 💡 |
| [no-missing-g-flag](no-missing-g-flag.md) | disallow missing `g` flag in patterns used in `String#matchAll` and `String#replaceAll` | | | 🔧 | |
| [no-optional-assertion](no-optional-assertion.md) | disallow optional assertions | ✅ | | | |
| [no-potentially-useless-backreference](no-potentially-useless-backreference.md) | disallow backreferences that reference a group that might not be matched | | ✅ | | |
| [no-super-linear-backtracking](no-super-linear-backtracking.md) | disallow exponential and polynomial backtracking | ✅ | | 🔧 | |
Expand All @@ -47,7 +47,7 @@ sidebarDepth: 0
| [control-character-escape](control-character-escape.md) | enforce consistent escaping of control characters | ✅ | | 🔧 | |
| [negation](negation.md) | enforce use of escapes on negation | ✅ | | 🔧 | |
| [no-dupe-characters-character-class](no-dupe-characters-character-class.md) | disallow duplicate characters in the RegExp character class | ✅ | | 🔧 | |
| [no-extra-lookaround-assertions](no-extra-lookaround-assertions.md) | disallow unnecessary nested lookaround assertions | | | 🔧 | |
| [no-extra-lookaround-assertions](no-extra-lookaround-assertions.md) | disallow unnecessary nested lookaround assertions | | | 🔧 | |
| [no-invisible-character](no-invisible-character.md) | disallow invisible raw character | ✅ | | 🔧 | |
| [no-legacy-features](no-legacy-features.md) | disallow legacy RegExp features | ✅ | | | |
| [no-non-standard-flag](no-non-standard-flag.md) | disallow non-standard flags | ✅ | | | |
Expand All @@ -74,7 +74,7 @@ sidebarDepth: 0
| [prefer-regexp-test](prefer-regexp-test.md) | enforce that `RegExp#test` is used instead of `String#match` and `RegExp#exec` | | | 🔧 | |
| [require-unicode-regexp](require-unicode-regexp.md) | enforce the use of the `u` flag | | | 🔧 | |
| [sort-alternatives](sort-alternatives.md) | sort alternatives if order doesn't matter | | | 🔧 | |
| [use-ignore-case](use-ignore-case.md) | use the `i` flag if it simplifies the pattern | | | 🔧 | |
| [use-ignore-case](use-ignore-case.md) | use the `i` flag if it simplifies the pattern | | | 🔧 | |

## Stylistic Issues

Expand Down
2 changes: 2 additions & 0 deletions docs/rules/no-contradiction-with-assertion.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ since: "v1.2.0"
---
# regexp/no-contradiction-with-assertion

💼 This rule is enabled in the ✅ `plugin:regexp/recommended` config.

💡 This rule is manually fixable by [editor suggestions](https://eslint.org/docs/developer-guide/working-with-rules#providing-suggestions).

<!-- end auto-generated rule header -->
Expand Down
2 changes: 2 additions & 0 deletions docs/rules/no-empty-character-class.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ since: "v1.2.0"
---
# regexp/no-empty-character-class

💼 This rule is enabled in the ✅ `plugin:regexp/recommended` config.

<!-- end auto-generated rule header -->

> disallow character classes that match no characters
Expand Down
2 changes: 2 additions & 0 deletions docs/rules/no-extra-lookaround-assertions.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ since: "v1.11.0"
---
# regexp/no-extra-lookaround-assertions

💼 This rule is enabled in the ✅ `plugin:regexp/recommended` config.

🔧 This rule is automatically fixable by the [`--fix` CLI option](https://eslint.org/docs/latest/user-guide/command-line-interface#--fix).

<!-- end auto-generated rule header -->
Expand Down
2 changes: 2 additions & 0 deletions docs/rules/no-misleading-capturing-group.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ since: "v1.12.0"
---
# regexp/no-misleading-capturing-group

💼 This rule is enabled in the ✅ `plugin:regexp/recommended` config.

💡 This rule is manually fixable by [editor suggestions](https://eslint.org/docs/developer-guide/working-with-rules#providing-suggestions).

<!-- end auto-generated rule header -->
Expand Down
2 changes: 2 additions & 0 deletions docs/rules/no-misleading-unicode-character.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ since: "v1.2.0"
---
# regexp/no-misleading-unicode-character

💼 This rule is enabled in the ✅ `plugin:regexp/recommended` config.

🔧💡 This rule is automatically fixable by the [`--fix` CLI option](https://eslint.org/docs/latest/user-guide/command-line-interface#--fix) and manually fixable by [editor suggestions](https://eslint.org/docs/developer-guide/working-with-rules#providing-suggestions).

<!-- end auto-generated rule header -->
Expand Down
2 changes: 2 additions & 0 deletions docs/rules/no-missing-g-flag.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ since: "v1.10.0"
---
# regexp/no-missing-g-flag

💼 This rule is enabled in the ✅ `plugin:regexp/recommended` config.

🔧 This rule is automatically fixable by the [`--fix` CLI option](https://eslint.org/docs/latest/user-guide/command-line-interface#--fix).

<!-- end auto-generated rule header -->
Expand Down
2 changes: 2 additions & 0 deletions docs/rules/use-ignore-case.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ since: "v1.4.0"
---
# regexp/use-ignore-case

💼 This rule is enabled in the ✅ `plugin:regexp/recommended` config.

🔧 This rule is automatically fixable by the [`--fix` CLI option](https://eslint.org/docs/latest/user-guide/command-line-interface#--fix).

<!-- end auto-generated rule header -->
Expand Down
Loading