Skip to content

Commit 5e5d2af

Browse files
committed
test(linter/plugins): remove dprint-ignore-file comments from test fixtures
1 parent 635e74c commit 5e5d2af

File tree

4 files changed

+93
-97
lines changed

4 files changed

+93
-97
lines changed

apps/oxlint/test/fixtures/custom_plugin_disable_directives/files/index.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
// dprint-ignore-file
2-
31
var shouldError = 1;
42

53
// oxlint-disable-next-line test-plugin/no-var

apps/oxlint/test/fixtures/custom_plugin_disable_directives/output.snap.md

Lines changed: 18 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -4,42 +4,41 @@
44
# stdout
55
```
66
x test-plugin(no-var): Use let or const instead of var
7-
,-[files/index.js:3:1]
8-
2 |
9-
3 | var shouldError = 1;
7+
,-[files/index.js:1:1]
8+
1 | var shouldError = 1;
109
: ^^^^^^^^^^^^^^^^^^^^
11-
4 |
10+
2 |
1211
`----
1312
1413
x ]8;;https://oxc.rs/docs/guide/usage/linter/rules/eslint/no-debugger.html\eslint(no-debugger)]8;;\: `debugger` statement is not allowed
15-
,-[files/index.js:12:1]
16-
11 | // should trigger an error
17-
12 | debugger;
14+
,-[files/index.js:10:1]
15+
9 | // should trigger an error
16+
10 | debugger;
1817
: ^^^^^^^^^
19-
13 |
18+
11 |
2019
`----
2120
help: Remove the debugger statement
2221
2322
x test-plugin(no-var): Use let or const instead of var
24-
,-[files/index.js:18:1]
25-
17 | /* oxlint-disable-next-line test-plugin */ // `test-plugin` should be `test-plugin/no-var`
26-
18 | var incorrectlyDisabled = 4;
23+
,-[files/index.js:16:1]
24+
15 | /* oxlint-disable-next-line test-plugin */ // `test-plugin` should be `test-plugin/no-var`
25+
16 | var incorrectlyDisabled = 4;
2726
: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
28-
19 |
27+
17 |
2928
`----
3029
3130
x test-plugin(no-var): Use let or const instead of var
32-
,-[files/index.js:21:1]
33-
20 | /* oxlint-disable-next-line no-var */ // `no-var` should be `test-plugin/no-var`
34-
21 | var anotherIncorrectlyDisabled = 4;
31+
,-[files/index.js:19:1]
32+
18 | /* oxlint-disable-next-line no-var */ // `no-var` should be `test-plugin/no-var`
33+
19 | var anotherIncorrectlyDisabled = 4;
3534
: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
36-
22 |
35+
20 |
3736
`----
3837
3938
x test-plugin(no-var): Use let or const instead of var
40-
,-[files/index.js:24:1]
41-
23 | // This var should trigger an error again
42-
24 | var shouldErrorAgain = 3;
39+
,-[files/index.js:22:1]
40+
21 | // This var should trigger an error again
41+
22 | var shouldErrorAgain = 3;
4342
: ^^^^^^^^^^^^^^^^^^^^^^^^^
4443
`----
4544

apps/oxlint/test/fixtures/estree/files/index.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
// @ts-nocheck
2-
// dprint-ignore-file
32

43
// All `Identifier`s
54
let a = { x: y };

apps/oxlint/test/fixtures/estree/output.snap.md

Lines changed: 75 additions & 75 deletions
Original file line numberDiff line numberDiff line change
@@ -33,111 +33,111 @@
3333
| * TSUnionType:exit: (types: TSStringKeyword, TSNumberKeyword)
3434
| * TSTypeAliasDeclaration:exit: (typeAnnotation: TSUnionType)
3535
| * Program:exit
36-
,-[files/index.ts:5:1]
37-
4 | // All `Identifier`s
38-
5 | ,-> let a = { x: y };
39-
6 | |
40-
7 | | // No `ParenthesizedExpression`s in AST
41-
8 | | const b = (x * ((('str' + ((123))))));
42-
9 | |
43-
10 | | // TS syntax
44-
11 | | type T = string;
45-
12 | |
46-
13 | | // No `TSParenthesizedType`s in AST
47-
14 | `-> type U = (((((string)) | ((number)))));
36+
,-[files/index.ts:4:1]
37+
3 | // All `Identifier`s
38+
4 | ,-> let a = { x: y };
39+
5 | |
40+
6 | | // No `ParenthesizedExpression`s in AST
41+
7 | | const b = (x * ((('str' + ((123))))));
42+
8 | |
43+
9 | | // TS syntax
44+
10 | | type T = string;
45+
11 | |
46+
12 | | // No `TSParenthesizedType`s in AST
47+
13 | `-> type U = (((((string)) | ((number)))));
4848
`----
4949
5050
x estree-check(check): program:
51-
| start/end: [59,265]
52-
| range: [59,265]
53-
| loc: [{"start":{"line":5,"column":0},"end":{"line":15,"column":0}}]
54-
,-[files/index.ts:5:1]
55-
4 | // All `Identifier`s
56-
5 | ,-> let a = { x: y };
57-
6 | |
58-
7 | | // No `ParenthesizedExpression`s in AST
59-
8 | | const b = (x * ((('str' + ((123))))));
60-
9 | |
61-
10 | | // TS syntax
62-
11 | | type T = string;
63-
12 | |
64-
13 | | // No `TSParenthesizedType`s in AST
65-
14 | `-> type U = (((((string)) | ((number)))));
51+
| start/end: [37,243]
52+
| range: [37,243]
53+
| loc: [{"start":{"line":4,"column":0},"end":{"line":14,"column":0}}]
54+
,-[files/index.ts:4:1]
55+
3 | // All `Identifier`s
56+
4 | ,-> let a = { x: y };
57+
5 | |
58+
6 | | // No `ParenthesizedExpression`s in AST
59+
7 | | const b = (x * ((('str' + ((123))))));
60+
8 | |
61+
9 | | // TS syntax
62+
10 | | type T = string;
63+
11 | |
64+
12 | | // No `TSParenthesizedType`s in AST
65+
13 | `-> type U = (((((string)) | ((number)))));
6666
`----
6767
6868
x estree-check(check): ident "a":
69-
| start/end: [63,64]
70-
| range: [63,64]
71-
| loc: [{"start":{"line":5,"column":4},"end":{"line":5,"column":5}}]
72-
,-[files/index.ts:5:5]
73-
4 | // All `Identifier`s
74-
5 | let a = { x: y };
69+
| start/end: [41,42]
70+
| range: [41,42]
71+
| loc: [{"start":{"line":4,"column":4},"end":{"line":4,"column":5}}]
72+
,-[files/index.ts:4:5]
73+
3 | // All `Identifier`s
74+
4 | let a = { x: y };
7575
: ^
76-
6 |
76+
5 |
7777
`----
7878
7979
x estree-check(check): ident "x":
80-
| start/end: [69,70]
81-
| range: [69,70]
82-
| loc: [{"start":{"line":5,"column":10},"end":{"line":5,"column":11}}]
83-
,-[files/index.ts:5:11]
84-
4 | // All `Identifier`s
85-
5 | let a = { x: y };
80+
| start/end: [47,48]
81+
| range: [47,48]
82+
| loc: [{"start":{"line":4,"column":10},"end":{"line":4,"column":11}}]
83+
,-[files/index.ts:4:11]
84+
3 | // All `Identifier`s
85+
4 | let a = { x: y };
8686
: ^
87-
6 |
87+
5 |
8888
`----
8989
9090
x estree-check(check): ident "y":
91-
| start/end: [72,73]
92-
| range: [72,73]
93-
| loc: [{"start":{"line":5,"column":13},"end":{"line":5,"column":14}}]
94-
,-[files/index.ts:5:14]
95-
4 | // All `Identifier`s
96-
5 | let a = { x: y };
91+
| start/end: [50,51]
92+
| range: [50,51]
93+
| loc: [{"start":{"line":4,"column":13},"end":{"line":4,"column":14}}]
94+
,-[files/index.ts:4:14]
95+
3 | // All `Identifier`s
96+
4 | let a = { x: y };
9797
: ^
98-
6 |
98+
5 |
9999
`----
100100
101101
x estree-check(check): ident "b":
102-
| start/end: [124,125]
103-
| range: [124,125]
104-
| loc: [{"start":{"line":8,"column":6},"end":{"line":8,"column":7}}]
105-
,-[files/index.ts:8:7]
106-
7 | // No `ParenthesizedExpression`s in AST
107-
8 | const b = (x * ((('str' + ((123))))));
102+
| start/end: [102,103]
103+
| range: [102,103]
104+
| loc: [{"start":{"line":7,"column":6},"end":{"line":7,"column":7}}]
105+
,-[files/index.ts:7:7]
106+
6 | // No `ParenthesizedExpression`s in AST
107+
7 | const b = (x * ((('str' + ((123))))));
108108
: ^
109-
9 |
109+
8 |
110110
`----
111111
112112
x estree-check(check): ident "x":
113-
| start/end: [129,130]
114-
| range: [129,130]
115-
| loc: [{"start":{"line":8,"column":11},"end":{"line":8,"column":12}}]
116-
,-[files/index.ts:8:12]
117-
7 | // No `ParenthesizedExpression`s in AST
118-
8 | const b = (x * ((('str' + ((123))))));
113+
| start/end: [107,108]
114+
| range: [107,108]
115+
| loc: [{"start":{"line":7,"column":11},"end":{"line":7,"column":12}}]
116+
,-[files/index.ts:7:12]
117+
6 | // No `ParenthesizedExpression`s in AST
118+
7 | const b = (x * ((('str' + ((123))))));
119119
: ^
120-
9 |
120+
8 |
121121
`----
122122
123123
x estree-check(check): ident "T":
124-
| start/end: [176,177]
125-
| range: [176,177]
126-
| loc: [{"start":{"line":11,"column":5},"end":{"line":11,"column":6}}]
127-
,-[files/index.ts:11:6]
128-
10 | // TS syntax
129-
11 | type T = string;
124+
| start/end: [154,155]
125+
| range: [154,155]
126+
| loc: [{"start":{"line":10,"column":5},"end":{"line":10,"column":6}}]
127+
,-[files/index.ts:10:6]
128+
9 | // TS syntax
129+
10 | type T = string;
130130
: ^
131-
12 |
131+
11 |
132132
`----
133133
134134
x estree-check(check): ident "U":
135-
| start/end: [230,231]
136-
| range: [230,231]
137-
| loc: [{"start":{"line":14,"column":5},"end":{"line":14,"column":6}}]
138-
,-[files/index.ts:14:6]
139-
13 | // No `TSParenthesizedType`s in AST
140-
14 | type U = (((((string)) | ((number)))));
135+
| start/end: [208,209]
136+
| range: [208,209]
137+
| loc: [{"start":{"line":13,"column":5},"end":{"line":13,"column":6}}]
138+
,-[files/index.ts:13:6]
139+
12 | // No `TSParenthesizedType`s in AST
140+
13 | type U = (((((string)) | ((number)))));
141141
: ^
142142
`----
143143

0 commit comments

Comments
 (0)