File tree Expand file tree Collapse file tree 8 files changed +25
-12
lines changed Expand file tree Collapse file tree 8 files changed +25
-12
lines changed Original file line number Diff line number Diff line change @@ -107,7 +107,7 @@ The rules with the following star :star: are included in the `plugin:regexp/reco
107
107
| [ regexp/no-useless-non-capturing-group] ( https://ota-meshi.github.io/eslint-plugin-regexp/rules/no-useless-non-capturing-group.html ) | disallow unnecessary Non-capturing group | :wrench : |
108
108
| [ regexp/no-useless-non-greedy] ( https://ota-meshi.github.io/eslint-plugin-regexp/rules/no-useless-non-greedy.html ) | disallow unnecessary quantifier non-greedy (` ? ` ) | :wrench : |
109
109
| [ regexp/no-useless-range] ( https://ota-meshi.github.io/eslint-plugin-regexp/rules/no-useless-range.html ) | disallow unnecessary range of characters by using a hyphen | :wrench : |
110
- | [ regexp/no-useless-two-nums-quantifier] ( https://ota-meshi.github.io/eslint-plugin-regexp/rules/no-useless-two-nums-quantifier.html ) | disallow unnecessary ` {n,m} ` quantifier | :star : |
110
+ | [ regexp/no-useless-two-nums-quantifier] ( https://ota-meshi.github.io/eslint-plugin-regexp/rules/no-useless-two-nums-quantifier.html ) | disallow unnecessary ` {n,m} ` quantifier | :star :: wrench : |
111
111
| [ regexp/optimal-lookaround-quantifier] ( https://ota-meshi.github.io/eslint-plugin-regexp/rules/optimal-lookaround-quantifier.html ) | disallow the alternatives of lookarounds that end with a non-constant quantifier | |
112
112
| [ regexp/order-in-character-class] ( https://ota-meshi.github.io/eslint-plugin-regexp/rules/order-in-character-class.html ) | enforces elements order in character class | :wrench : |
113
113
| [ regexp/prefer-character-class] ( https://ota-meshi.github.io/eslint-plugin-regexp/rules/prefer-character-class.html ) | enforce using character class | :wrench : |
Original file line number Diff line number Diff line change @@ -35,7 +35,7 @@ The rules with the following star :star: are included in the `plugin:regexp/reco
35
35
| [ regexp/no-useless-non-capturing-group] ( ./no-useless-non-capturing-group.md ) | disallow unnecessary Non-capturing group | :wrench : |
36
36
| [ regexp/no-useless-non-greedy] ( ./no-useless-non-greedy.md ) | disallow unnecessary quantifier non-greedy (` ? ` ) | :wrench : |
37
37
| [ regexp/no-useless-range] ( ./no-useless-range.md ) | disallow unnecessary range of characters by using a hyphen | :wrench : |
38
- | [ regexp/no-useless-two-nums-quantifier] ( ./no-useless-two-nums-quantifier.md ) | disallow unnecessary ` {n,m} ` quantifier | :star : |
38
+ | [ regexp/no-useless-two-nums-quantifier] ( ./no-useless-two-nums-quantifier.md ) | disallow unnecessary ` {n,m} ` quantifier | :star :: wrench : |
39
39
| [ regexp/optimal-lookaround-quantifier] ( ./optimal-lookaround-quantifier.md ) | disallow the alternatives of lookarounds that end with a non-constant quantifier | |
40
40
| [ regexp/order-in-character-class] ( ./order-in-character-class.md ) | enforces elements order in character class | :wrench : |
41
41
| [ regexp/prefer-character-class] ( ./prefer-character-class.md ) | enforce using character class | :wrench : |
Original file line number Diff line number Diff line change @@ -3,13 +3,12 @@ pageClass: "rule-details"
3
3
sidebarDepth : 0
4
4
title : " regexp/confusing-quantifier"
5
5
description : " disallow confusing quantifiers"
6
+ since : " v0.8.0"
6
7
---
7
8
# regexp/confusing-quantifier
8
9
9
10
> disallow confusing quantifiers
10
11
11
- - :exclamation : <badge text =" This rule has not been released yet. " vertical =" middle " type =" error " > *** This rule has not been released yet.*** </badge >
12
-
13
12
## :book : Rule Details
14
13
15
14
Confusing quantifiers are ones which imply one thing but don't deliver on that.
@@ -49,6 +48,10 @@ This rule is compatible with [clean-regex/confusing-quantifier] rule.
49
48
[ eslint-plugin-clean-regex ] : https://github.com/RunDevelopment/eslint-plugin-clean-regex
50
49
[ clean-regex/confusing-quantifier ] : https://github.com/RunDevelopment/eslint-plugin-clean-regex/blob/master/docs/rules/confusing-quantifier.md
51
50
51
+ ## :rocket : Version
52
+
53
+ This rule was introduced in eslint-plugin-regexp v0.8.0
54
+
52
55
## :mag : Implementation
53
56
54
57
- [ Rule source] ( https://github.com/ota-meshi/eslint-plugin-regexp/blob/master/lib/rules/confusing-quantifier.ts )
Original file line number Diff line number Diff line change @@ -3,13 +3,12 @@ pageClass: "rule-details"
3
3
sidebarDepth : 0
4
4
title : " regexp/no-empty-alternative"
5
5
description : " disallow alternatives without elements"
6
+ since : " v0.8.0"
6
7
---
7
8
# regexp/no-empty-alternative
8
9
9
10
> disallow alternatives without elements
10
11
11
- - :exclamation : <badge text =" This rule has not been released yet. " vertical =" middle " type =" error " > *** This rule has not been released yet.*** </badge >
12
-
13
12
## :book : Rule Details
14
13
15
14
While (re-)writing long regular expressions, it can happen that one forgets to
@@ -46,6 +45,10 @@ This rule is compatible with [clean-regex/no-empty-alternative] rule.
46
45
[ clean-regex/no-empty-alternative ] : https://github.com/RunDevelopment/eslint-plugin-clean-regex/blob/master/docs/rules/no-empty-alternative.md
47
46
48
47
48
+ ## :rocket : Version
49
+
50
+ This rule was introduced in eslint-plugin-regexp v0.8.0
51
+
49
52
## :mag : Implementation
50
53
51
54
- [ Rule source] ( https://github.com/ota-meshi/eslint-plugin-regexp/blob/master/lib/rules/no-empty-alternative.ts )
Original file line number Diff line number Diff line change @@ -3,13 +3,12 @@ pageClass: "rule-details"
3
3
sidebarDepth : 0
4
4
title : " regexp/no-lazy-ends"
5
5
description : " disallow lazy quantifiers at the end of an expression"
6
+ since : " v0.8.0"
6
7
---
7
8
# regexp/no-lazy-ends
8
9
9
10
> disallow lazy quantifiers at the end of an expression
10
11
11
- - :exclamation : <badge text =" This rule has not been released yet. " vertical =" middle " type =" error " > *** This rule has not been released yet.*** </badge >
12
-
13
12
## :book : Rule Details
14
13
15
14
If a lazily quantified element is the last element matched by an expression
@@ -58,6 +57,10 @@ This rule is compatible with [clean-regex/no-lazy-ends] rule.
58
57
[ eslint-plugin-clean-regex ] : https://github.com/RunDevelopment/eslint-plugin-clean-regex
59
58
[ clean-regex/no-lazy-ends ] : https://github.com/RunDevelopment/eslint-plugin-clean-regex/blob/master/docs/rules/no-lazy-ends.md
60
59
60
+ ## :rocket : Version
61
+
62
+ This rule was introduced in eslint-plugin-regexp v0.8.0
63
+
61
64
## :mag : Implementation
62
65
63
66
- [ Rule source] ( https://github.com/ota-meshi/eslint-plugin-regexp/blob/master/lib/rules/no-lazy-ends.ts )
Original file line number Diff line number Diff line change @@ -10,12 +10,13 @@ since: "v0.1.0"
10
10
> disallow unnecessary ` {n,m} ` quantifier
11
11
12
12
- :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.
13
14
14
15
## :book : Rule Details
15
16
16
17
This rule reports unnecessary ` {n,m} ` quantifiers.
17
18
18
- <eslint-code-block >
19
+ <eslint-code-block fix >
19
20
20
21
``` js
21
22
/* eslint regexp/no-useless-two-nums-quantifier: "error" */
Original file line number Diff line number Diff line change @@ -3,13 +3,12 @@ pageClass: "rule-details"
3
3
sidebarDepth : 0
4
4
title : " regexp/optimal-lookaround-quantifier"
5
5
description : " disallow the alternatives of lookarounds that end with a non-constant quantifier"
6
+ since : " v0.8.0"
6
7
---
7
8
# regexp/optimal-lookaround-quantifier
8
9
9
10
> disallow the alternatives of lookarounds that end with a non-constant quantifier
10
11
11
- - :exclamation : <badge text =" This rule has not been released yet. " vertical =" middle " type =" error " > *** This rule has not been released yet.*** </badge >
12
-
13
12
## :book : Rule Details
14
13
15
14
Non-constant quantifiers are quantifiers that describe a range (e.g. ` ? ` , ` * ` ,
@@ -68,6 +67,10 @@ This rule is compatible with [clean-regex/optimal-lookaround-quantifier] rule.
68
67
[ eslint-plugin-clean-regex ] : https://github.com/RunDevelopment/eslint-plugin-clean-regex
69
68
[ clean-regex/optimal-lookaround-quantifier ] : https://github.com/RunDevelopment/eslint-plugin-clean-regex/blob/master/docs/rules/optimal-lookaround-quantifier.md
70
69
70
+ ## :rocket : Version
71
+
72
+ This rule was introduced in eslint-plugin-regexp v0.8.0
73
+
71
74
## :mag : Implementation
72
75
73
76
- [ Rule source] ( https://github.com/ota-meshi/eslint-plugin-regexp/blob/master/lib/rules/optimal-lookaround-quantifier.ts )
Original file line number Diff line number Diff line change 1
1
{
2
2
"name" : " eslint-plugin-regexp" ,
3
- "version" : " 0.7.5 " ,
3
+ "version" : " 0.8.0 " ,
4
4
"description" : " ESLint plugin for finding RegExp mistakes and RegExp style guide violations." ,
5
5
"main" : " dist/index.js" ,
6
6
"files" : [
You can’t perform that action at this time.
0 commit comments