File tree Expand file tree Collapse file tree 2 files changed +10
-16
lines changed Expand file tree Collapse file tree 2 files changed +10
-16
lines changed Original file line number Diff line number Diff line change 9
9
[ ![ NPM downloads] ( https://img.shields.io/npm/dm/eslint-plugin-regexp.svg )] ( http://www.npmtrends.com/eslint-plugin-regexp )
10
10
[ ![ NPM downloads] ( https://img.shields.io/npm/dy/eslint-plugin-regexp.svg )] ( http://www.npmtrends.com/eslint-plugin-regexp )
11
11
[ ![ NPM downloads] ( https://img.shields.io/npm/dt/eslint-plugin-regexp.svg )] ( http://www.npmtrends.com/eslint-plugin-regexp )
12
- [ ![ Build Status] ( https://travis-ci .com/ota-meshi/eslint-plugin-regexp.svg?branch=master )] ( https://travis-ci .com/ota-meshi/eslint-plugin-regexp )
12
+ [ ![ Build Status] ( https://github .com/ota-meshi/eslint-plugin-regexp/workflows/CI/badge .svg?branch=master )] ( https://github .com/ota-meshi/eslint-plugin-regexp/actions?query=workflow%3ACI )
13
13
[ ![ Coverage Status] ( https://coveralls.io/repos/github/ota-meshi/eslint-plugin-regexp/badge.svg?branch=master )] ( https://coveralls.io/github/ota-meshi/eslint-plugin-regexp?branch=master )
14
14
15
15
## Features
Original file line number Diff line number Diff line change @@ -20,29 +20,23 @@ This rule reports empty lookahead assertion or empty lookbehind assertion.
20
20
/* eslint regexp/no-empty-lookarounds-assertion: "error" */
21
21
22
22
/* ✓ GOOD */
23
-
23
+ var foo = / x(?=y)/
24
+ var foo = / x(?!y)/
25
+ var foo = / (?<=y)x/
26
+ var foo = / (?<!y)x/
24
27
25
28
/* ✗ BAD */
26
-
29
+ var foo = / x(?=)/
30
+ var foo = / x(?!)/
31
+ var foo = / (?<=)x/
32
+ var foo = / (?<!)x/
27
33
```
28
34
29
35
</eslint-code-block >
30
36
31
37
## :wrench : Options
32
38
33
- ``` json
34
- {
35
- "regexp/no-empty-lookarounds-assertion" : [" error" , {
36
-
37
- }]
38
- }
39
- ```
40
-
41
- -
42
-
43
- ## :books : Further reading
44
-
45
- -
39
+ Nothing.
46
40
47
41
## Implementation
48
42
You can’t perform that action at this time.
0 commit comments