Skip to content
This repository has been archived by the owner on Aug 31, 2023. It is now read-only.

Commit

Permalink
update snapshots
Browse files Browse the repository at this point in the history
  • Loading branch information
leops committed Oct 5, 2022
1 parent 1fc50b4 commit 2b92abe
Show file tree
Hide file tree
Showing 36 changed files with 1,024 additions and 1,024 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,11 @@ noCommentText.tsx:2:17 lint/correctness/noCommentText FIXABLE ━━━━━
i Suggested fix: Wrap the comments with braces
1 1 │ //·invalid
1 1 │ // invalid
2 │ - const·a3·=·<div>//·comment</div>;
2 │ + const·a3·=·<div>{/*·comment*/}</div>;
3 3 │ const·a4·=·<div>/*·comment·*/</div>;
4 4 │ const·a5·=·<div>/**·comment·*/</div>;
3 3 │ const a4 = <div>/* comment */</div>;
4 4 │ const a5 = <div>/** comment */</div>;
```
Expand Down Expand Up @@ -70,12 +70,12 @@ noCommentText.tsx:4:17 lint/correctness/noCommentText FIXABLE ━━━━━
i Suggested fix: Wrap the comments with braces
2 2 │ const·a3·=·<div>//·comment</div>;
3 3 │ const·a4·=·<div>/*·comment·*/</div>;
2 2 │ const a3 = <div>// comment</div>;
3 3 │ const a4 = <div>/* comment */</div>;
4 │ - const·a5·=·<div>/**·comment·*/</div>;
4 │ + const·a5·=·<div>{/*·comment·*/}</div>;
5 5 │ //·valid
6 6 │ const·a·=·<div>{/*·comment·*/}</div>;
5 5 │ // valid
6 6 │ const a = <div>{/* comment */}</div>;
```
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ noDebugger.js:3:10 lint/correctness/noDebugger FIXABLE ━━━━━━━
i Suggested fix: Remove debugger statement
1 1 │ const·test·=·{·debugger:·1·};·test.debugger;
1 1 │ const test = { debugger: 1 }; test.debugger;
2 2 │
3 │ - if·(foo)·debugger
3 │ + if·(foo)·;
Expand Down
28 changes: 14 additions & 14 deletions crates/rome_js_analyze/tests/specs/correctness/noDelete.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@ noDelete.js:1:1 lint/correctness/noDelete FIXABLE ━━━━━━━━━

1- delete·a.b;
1+ a.b·=·undefined;
2 2delete·a?.b;
3 3delete·a["b"];
2 2delete a?.b;
3 3delete a["b"];


```
Expand All @@ -54,12 +54,12 @@ noDelete.js:3:1 lint/correctness/noDelete FIXABLE ━━━━━━━━━

i Suggested fix: Replace with undefined assignment

1 1delete·a.b;
2 2delete·a?.b;
1 1delete a.b;
2 2delete a?.b;
3- delete·a["b"];
3+ a["b"=·undefined;
4 4delete·a?.["b"];
5 5delete·a.b.c;
4 4delete a?.["b"];
5 5delete a.b.c;


```
Expand All @@ -78,12 +78,12 @@ noDelete.js:5:1 lint/correctness/noDelete FIXABLE ━━━━━━━━━

i Suggested fix: Replace with undefined assignment

3 3delete·a["b"];
4 4delete·a?.["b"];
3 3delete a["b"];
4 4delete a?.["b"];
5- delete·a.b.c;
5+ a.b.c·=·undefined;
6 6delete·a.b?.c;
7 7delete·a.b["c"];
6 6delete a.b?.c;
7 7delete a.b["c"];


```
Expand All @@ -102,12 +102,12 @@ noDelete.js:7:1 lint/correctness/noDelete FIXABLE ━━━━━━━━━

i Suggested fix: Replace with undefined assignment

5 5delete·a.b.c;
6 6delete·a.b?.c;
5 5delete a.b.c;
6 6delete a.b?.c;
7- delete·a.b["c"];
7+ a.b["c"=·undefined;
8 8delete·a.b?.["c"];
9 9delete·a?.b.c;
8 8delete a.b?.["c"];
9 9delete a?.b.c;


```
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,12 @@ noMultipleSpacesInRegularExpressionLiterals.js:7:2 lint/correctness/noMultipleSp
i Suggested fix: It's hard to visually count the amount of spaces, it's clearer if you use a quantifier instead. eg / {3}/
5 5 │ /foo·/;
6 6 │ //·invalid
5 5 │ /foo /;
6 6 │ // invalid
7 │ - /···/;
7 │ + /·{3}/;
8 8 │ /··foo/;
9 9 │ /foo···/;
8 8 │ / foo/;
9 9 │ /foo /;
```
Expand All @@ -58,12 +58,12 @@ noMultipleSpacesInRegularExpressionLiterals.js:8:2 lint/correctness/noMultipleSp
i Suggested fix: It's hard to visually count the amount of spaces, it's clearer if you use a quantifier instead. eg / {2}/
6 6 │ //·invalid
7 7 │ /···/;
6 6 │ // invalid
7 7 │ / /;
8 │ - /··foo/;
8 │ + /·{2}foo/;
9 9 │ /foo···/;
10 10 │ /foo··bar/;
9 9 │ /foo /;
10 10 │ /foo bar/;
```
Expand All @@ -82,12 +82,12 @@ noMultipleSpacesInRegularExpressionLiterals.js:9:5 lint/correctness/noMultipleSp
i Suggested fix: It's hard to visually count the amount of spaces, it's clearer if you use a quantifier instead. eg / {3}/
7 7 │ /···/;
8 8 │ /··foo/;
7 7 │ / /;
8 8 │ / foo/;
9 │ - /foo···/;
9 │ + /foo·{3}/;
10 10 │ /foo··bar/;
11 11 │ /foo···bar····baz/;
10 10 │ /foo bar/;
11 11 │ /foo bar baz/;
```
Expand All @@ -106,12 +106,12 @@ noMultipleSpacesInRegularExpressionLiterals.js:10:5 lint/correctness/noMultipleS
i Suggested fix: It's hard to visually count the amount of spaces, it's clearer if you use a quantifier instead. eg / {2}/
8 8 │ /··foo/;
9 9 │ /foo···/;
8 8 │ / foo/;
9 9 │ /foo /;
10 │ - /foo··bar/;
10 │ + /foo·{2}bar/;
11 11 │ /foo···bar····baz/;
12 12 │ /foo·[ba]r··b(a|z)/;
11 11 │ /foo bar baz/;
12 12 │ /foo [ba]r b(a|z)/;
```
Expand All @@ -130,11 +130,11 @@ noMultipleSpacesInRegularExpressionLiterals.js:11:5 lint/correctness/noMultipleS
i Suggested fix: It's hard to visually count the amount of spaces, it's clearer if you use a quantifier instead. eg / {7}/
9 9 │ /foo···/;
10 10 │ /foo··bar/;
9 9 │ /foo /;
10 10 │ /foo bar/;
11 │ - /foo···bar····baz/;
11 │ + /foo·{3}bar·{4}baz/;
12 12 │ /foo·[ba]r··b(a|z)/;
12 12 │ /foo [ba]r b(a|z)/;
13 13 │
Expand All @@ -153,8 +153,8 @@ noMultipleSpacesInRegularExpressionLiterals.js:12:11 lint/correctness/noMultiple
i Suggested fix: It's hard to visually count the amount of spaces, it's clearer if you use a quantifier instead. eg / {2}/
10 10 │ /foo··bar/;
11 11 │ /foo···bar····baz/;
10 10 │ /foo bar/;
11 11 │ /foo bar baz/;
12 │ - /foo·[ba]r··b(a|z)/;
12 │ + /foo·[ba]r·{2}b(a|z)/;
13 13 │
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -152,13 +152,13 @@ noUnnecessaryContinue.js:14:3 lint/correctness/noUnnecessaryContinue FIXABLE
i Suggested fix: Delete the unnecessary continue statement
12 12 │ → if·(i·>·5)·{
13 13 │ → → console.log("foo");
12 12 │ if (i > 5) {
13 13 │ console.log("foo");
14 │ - → → continue;
15 │ - → }·else·if·(i·>=·5·&&·i·<·8)·{
14 │ + → }·else·if·(i·>=·5·&&·i·<·8)·{
16 15 │ → → console.log("test");
17 16 │ → }·else·{
16 15 │ console.log("test");
17 16 │ } else {
```
Expand Down
Loading

0 comments on commit 2b92abe

Please sign in to comment.