-
-
Notifications
You must be signed in to change notification settings - Fork 394
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(linter): include actual span size in
no-regex-spaces
diagnostic (…
- Loading branch information
Showing
2 changed files
with
54 additions
and
54 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,184 +1,184 @@ | ||
--- | ||
source: crates/oxc_linter/src/tester.rs | ||
--- | ||
⚠ eslint(no-regex-spaces): Spaces are hard to count. | ||
⚠ eslint(no-regex-spaces): Multiple consecutive spaces are hard to count. | ||
╭─[no_regex_spaces.tsx:1:12] | ||
1 │ var foo = / /; | ||
· ── | ||
╰──── | ||
help: Use a quantifier, e.g. {2} | ||
help: Use a quantifier: ` {2}` | ||
|
||
⚠ eslint(no-regex-spaces): Spaces are hard to count. | ||
⚠ eslint(no-regex-spaces): Multiple consecutive spaces are hard to count. | ||
╭─[no_regex_spaces.tsx:1:15] | ||
1 │ var foo = /bar baz/; | ||
· ── | ||
╰──── | ||
help: Use a quantifier, e.g. {2} | ||
help: Use a quantifier: ` {2}` | ||
|
||
⚠ eslint(no-regex-spaces): Spaces are hard to count. | ||
⚠ eslint(no-regex-spaces): Multiple consecutive spaces are hard to count. | ||
╭─[no_regex_spaces.tsx:1:15] | ||
1 │ var foo = /bar baz/; | ||
· ──── | ||
╰──── | ||
help: Use a quantifier, e.g. {2} | ||
help: Use a quantifier: ` {4}` | ||
|
||
⚠ eslint(no-regex-spaces): Spaces are hard to count. | ||
⚠ eslint(no-regex-spaces): Multiple consecutive spaces are hard to count. | ||
╭─[no_regex_spaces.tsx:1:16] | ||
1 │ var foo = / a b c d /; | ||
· ── | ||
╰──── | ||
help: Use a quantifier, e.g. {2} | ||
help: Use a quantifier: ` {2}` | ||
|
||
⚠ eslint(no-regex-spaces): Spaces are hard to count. | ||
⚠ eslint(no-regex-spaces): Multiple consecutive spaces are hard to count. | ||
╭─[no_regex_spaces.tsx:1:27] | ||
1 │ var foo = RegExp(' a b c d '); | ||
· ── | ||
╰──── | ||
help: Use a quantifier, e.g. {2} | ||
help: Use a quantifier: ` {2}` | ||
|
||
⚠ eslint(no-regex-spaces): Spaces are hard to count. | ||
⚠ eslint(no-regex-spaces): Multiple consecutive spaces are hard to count. | ||
╭─[no_regex_spaces.tsx:1:22] | ||
1 │ var foo = RegExp('bar baz'); | ||
· ──── | ||
╰──── | ||
help: Use a quantifier, e.g. {2} | ||
help: Use a quantifier: ` {4}` | ||
|
||
⚠ eslint(no-regex-spaces): Spaces are hard to count. | ||
⚠ eslint(no-regex-spaces): Multiple consecutive spaces are hard to count. | ||
╭─[no_regex_spaces.tsx:1:26] | ||
1 │ var foo = new RegExp('bar baz'); | ||
· ──── | ||
╰──── | ||
help: Use a quantifier, e.g. {2} | ||
help: Use a quantifier: ` {4}` | ||
|
||
⚠ eslint(no-regex-spaces): Spaces are hard to count. | ||
⚠ eslint(no-regex-spaces): Multiple consecutive spaces are hard to count. | ||
╭─[no_regex_spaces.tsx:1:15] | ||
1 │ var foo = /bar {3}baz/; | ||
· ── | ||
╰──── | ||
help: Use a quantifier, e.g. {2} | ||
help: Use a quantifier: ` {2}` | ||
|
||
⚠ eslint(no-regex-spaces): Spaces are hard to count. | ||
⚠ eslint(no-regex-spaces): Multiple consecutive spaces are hard to count. | ||
╭─[no_regex_spaces.tsx:1:15] | ||
1 │ var foo = /bar ?baz/; | ||
· ─── | ||
╰──── | ||
help: Use a quantifier, e.g. {2} | ||
help: Use a quantifier: ` {3}` | ||
|
||
⚠ eslint(no-regex-spaces): Spaces are hard to count. | ||
⚠ eslint(no-regex-spaces): Multiple consecutive spaces are hard to count. | ||
╭─[no_regex_spaces.tsx:1:26] | ||
1 │ var foo = new RegExp('bar *baz') | ||
· ── | ||
╰──── | ||
help: Use a quantifier, e.g. {2} | ||
help: Use a quantifier: ` {2}` | ||
|
||
⚠ eslint(no-regex-spaces): Spaces are hard to count. | ||
⚠ eslint(no-regex-spaces): Multiple consecutive spaces are hard to count. | ||
╭─[no_regex_spaces.tsx:1:22] | ||
1 │ var foo = RegExp('bar +baz') | ||
· ── | ||
╰──── | ||
help: Use a quantifier, e.g. {2} | ||
help: Use a quantifier: ` {2}` | ||
|
||
⚠ eslint(no-regex-spaces): Spaces are hard to count. | ||
⚠ eslint(no-regex-spaces): Multiple consecutive spaces are hard to count. | ||
╭─[no_regex_spaces.tsx:1:26] | ||
1 │ var foo = new RegExp('bar '); | ||
· ──── | ||
╰──── | ||
help: Use a quantifier, e.g. {2} | ||
help: Use a quantifier: ` {4}` | ||
|
||
⚠ eslint(no-regex-spaces): Spaces are hard to count. | ||
⚠ eslint(no-regex-spaces): Multiple consecutive spaces are hard to count. | ||
╭─[no_regex_spaces.tsx:1:17] | ||
1 │ var foo = /bar\\ baz/; | ||
· ── | ||
╰──── | ||
help: Use a quantifier, e.g. {2} | ||
help: Use a quantifier: ` {2}` | ||
|
||
⚠ eslint(no-regex-spaces): Spaces are hard to count. | ||
⚠ eslint(no-regex-spaces): Multiple consecutive spaces are hard to count. | ||
╭─[no_regex_spaces.tsx:1:15] | ||
1 │ var foo = /(?: )/; | ||
· ── | ||
╰──── | ||
help: Use a quantifier, e.g. {2} | ||
help: Use a quantifier: ` {2}` | ||
|
||
⚠ eslint(no-regex-spaces): Spaces are hard to count. | ||
⚠ eslint(no-regex-spaces): Multiple consecutive spaces are hard to count. | ||
╭─[no_regex_spaces.tsx:1:26] | ||
1 │ var foo = RegExp('^foo(?= )'); | ||
· ─── | ||
╰──── | ||
help: Use a quantifier, e.g. {2} | ||
help: Use a quantifier: ` {3}` | ||
|
||
⚠ eslint(no-regex-spaces): Spaces are hard to count. | ||
⚠ eslint(no-regex-spaces): Multiple consecutive spaces are hard to count. | ||
╭─[no_regex_spaces.tsx:1:14] | ||
1 │ var foo = /\\ / | ||
· ── | ||
╰──── | ||
help: Use a quantifier, e.g. {2} | ||
help: Use a quantifier: ` {2}` | ||
|
||
⚠ eslint(no-regex-spaces): Spaces are hard to count. | ||
⚠ eslint(no-regex-spaces): Multiple consecutive spaces are hard to count. | ||
╭─[no_regex_spaces.tsx:1:15] | ||
1 │ var foo = / \\ / | ||
· ── | ||
╰──── | ||
help: Use a quantifier, e.g. {2} | ||
help: Use a quantifier: ` {2}` | ||
|
||
⚠ eslint(no-regex-spaces): Spaces are hard to count. | ||
⚠ eslint(no-regex-spaces): Multiple consecutive spaces are hard to count. | ||
╭─[no_regex_spaces.tsx:1:12] | ||
1 │ var foo = / foo /; | ||
· ── | ||
╰──── | ||
help: Use a quantifier, e.g. {2} | ||
help: Use a quantifier: ` {2}` | ||
|
||
⚠ eslint(no-regex-spaces): Spaces are hard to count. | ||
⚠ eslint(no-regex-spaces): Multiple consecutive spaces are hard to count. | ||
╭─[no_regex_spaces.tsx:1:25] | ||
1 │ var foo = new RegExp('\\d ') | ||
· ── | ||
╰──── | ||
help: Use a quantifier, e.g. {2} | ||
help: Use a quantifier: ` {2}` | ||
|
||
⚠ eslint(no-regex-spaces): Spaces are hard to count. | ||
⚠ eslint(no-regex-spaces): Multiple consecutive spaces are hard to count. | ||
╭─[no_regex_spaces.tsx:1:25] | ||
1 │ var foo = RegExp('\\u0041 ') | ||
· ─── | ||
╰──── | ||
help: Use a quantifier, e.g. {2} | ||
help: Use a quantifier: ` {3}` | ||
|
||
⚠ eslint(no-regex-spaces): Spaces are hard to count. | ||
⚠ eslint(no-regex-spaces): Multiple consecutive spaces are hard to count. | ||
╭─[no_regex_spaces.tsx:1:17] | ||
1 │ var foo = /[ ] /; | ||
· ── | ||
╰──── | ||
help: Use a quantifier, e.g. {2} | ||
help: Use a quantifier: ` {2}` | ||
|
||
⚠ eslint(no-regex-spaces): Spaces are hard to count. | ||
⚠ eslint(no-regex-spaces): Multiple consecutive spaces are hard to count. | ||
╭─[no_regex_spaces.tsx:1:12] | ||
1 │ var foo = / [ ] /; | ||
· ── | ||
╰──── | ||
help: Use a quantifier, e.g. {2} | ||
help: Use a quantifier: ` {2}` | ||
|
||
⚠ eslint(no-regex-spaces): Spaces are hard to count. | ||
⚠ eslint(no-regex-spaces): Multiple consecutive spaces are hard to count. | ||
╭─[no_regex_spaces.tsx:1:19] | ||
1 │ var foo = RegExp(' [ ]'); | ||
· ── | ||
╰──── | ||
help: Use a quantifier, e.g. {2} | ||
help: Use a quantifier: ` {2}` | ||
|
||
⚠ eslint(no-regex-spaces): Spaces are hard to count. | ||
⚠ eslint(no-regex-spaces): Multiple consecutive spaces are hard to count. | ||
╭─[no_regex_spaces.tsx:1:24] | ||
1 │ var foo = /[[ ] ] /v; | ||
· ──── | ||
╰──── | ||
help: Use a quantifier, e.g. {2} | ||
help: Use a quantifier: ` {4}` | ||
|
||
⚠ eslint(no-regex-spaces): Spaces are hard to count. | ||
⚠ eslint(no-regex-spaces): Multiple consecutive spaces are hard to count. | ||
╭─[no_regex_spaces.tsx:1:28] | ||
1 │ var foo = new RegExp('[ ] '); | ||
· ── | ||
╰──── | ||
help: Use a quantifier, e.g. {2} | ||
help: Use a quantifier: ` {2}` | ||
|
||
⚠ eslint(no-regex-spaces): Spaces are hard to count. | ||
⚠ eslint(no-regex-spaces): Multiple consecutive spaces are hard to count. | ||
╭─[no_regex_spaces.tsx:1:30] | ||
1 │ var foo = new RegExp('[[ ] ] ', 'v'); | ||
· ──── | ||
╰──── | ||
help: Use a quantifier, e.g. {2} | ||
help: Use a quantifier: ` {4}` |