Skip to content

Commit 2a85fc0

Browse files
Update no-dupe-characters-character-class (#191)
* Update `no-dupe-characters-character-class` * Updated generates files * More descriptive messages * Better combination error message
1 parent 727bff2 commit 2a85fc0

File tree

7 files changed

+661
-374
lines changed

7 files changed

+661
-374
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ The rules with the following star :star: are included in the `plugin:regexp/reco
104104
| [regexp/match-any](https://ota-meshi.github.io/eslint-plugin-regexp/rules/match-any.html) | enforce match any character style | :star::wrench: |
105105
| [regexp/negation](https://ota-meshi.github.io/eslint-plugin-regexp/rules/negation.html) | enforce use of escapes on negation | :wrench: |
106106
| [regexp/no-assertion-capturing-group](https://ota-meshi.github.io/eslint-plugin-regexp/rules/no-assertion-capturing-group.html) | disallow capturing group that captures assertions. | :star: |
107-
| [regexp/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 | :star: |
107+
| [regexp/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 | :star::wrench: |
108108
| [regexp/no-dupe-disjunctions](https://ota-meshi.github.io/eslint-plugin-regexp/rules/no-dupe-disjunctions.html) | disallow duplicate disjunctions | |
109109
| [regexp/no-empty-alternative](https://ota-meshi.github.io/eslint-plugin-regexp/rules/no-empty-alternative.html) | disallow alternatives without elements | |
110110
| [regexp/no-empty-group](https://ota-meshi.github.io/eslint-plugin-regexp/rules/no-empty-group.html) | disallow empty group | :star: |

docs/rules/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ The rules with the following star :star: are included in the `plugin:regexp/reco
1818
| [regexp/match-any](./match-any.md) | enforce match any character style | :star::wrench: |
1919
| [regexp/negation](./negation.md) | enforce use of escapes on negation | :wrench: |
2020
| [regexp/no-assertion-capturing-group](./no-assertion-capturing-group.md) | disallow capturing group that captures assertions. | :star: |
21-
| [regexp/no-dupe-characters-character-class](./no-dupe-characters-character-class.md) | disallow duplicate characters in the RegExp character class | :star: |
21+
| [regexp/no-dupe-characters-character-class](./no-dupe-characters-character-class.md) | disallow duplicate characters in the RegExp character class | :star::wrench: |
2222
| [regexp/no-dupe-disjunctions](./no-dupe-disjunctions.md) | disallow duplicate disjunctions | |
2323
| [regexp/no-empty-alternative](./no-empty-alternative.md) | disallow alternatives without elements | |
2424
| [regexp/no-empty-group](./no-empty-group.md) | disallow empty group | :star: |

docs/rules/no-dupe-characters-character-class.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ since: "v0.1.0"
1010
> disallow duplicate characters in the RegExp character class
1111
1212
- :gear: This rule is included in `"plugin:regexp/recommended"`.
13+
- :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
Because multiple same character classes in regular expressions only one is useful, they might be typing mistakes.
1516

@@ -21,7 +22,7 @@ var foo = /\\(\\)/;
2122

2223
This rule disallows duplicate characters in the RegExp character class.
2324

24-
<eslint-code-block>
25+
<eslint-code-block fix>
2526

2627
```js
2728
/* eslint regexp/no-dupe-characters-character-class: "error" */

0 commit comments

Comments
 (0)