Skip to content

Commit 7a8edfd

Browse files
committed
test: update tsgolint snapshots after refactor
1 parent 6dc46f0 commit 7a8edfd

3 files changed

+246
-6
lines changed

apps/oxlint/src/snapshots/fixtures__tsgolint_--type-aware --silent [email protected]

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@ source: apps/oxlint/src/tester.rs
55
arguments: --type-aware --silent no-floating-promises
66
working directory: fixtures/tsgolint
77
----------
8-
Error running tsgolint: "Failed to spawn tsgolint from path `tsgolint`, with error: No such file or directory (os error 2)"----------
9-
CLI result: TsGoLintError
8+
9+
Found 5 warnings and 11 errors.
10+
Finished in <variable>ms on 3 files using 1 threads.
11+
----------
12+
CLI result: LintFoundErrors
1013
----------

apps/oxlint/src/snapshots/fixtures__tsgolint_--type-aware no-floating-promises -c [email protected]

Lines changed: 101 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,105 @@ source: apps/oxlint/src/tester.rs
55
arguments: --type-aware no-floating-promises -c config-test.json
66
working directory: fixtures/tsgolint
77
----------
8-
Error running tsgolint: "Failed to spawn tsgolint from path `tsgolint`, with error: No such file or directory (os error 2)"----------
9-
CLI result: TsGoLintError
8+
9+
! typescript-eslint(no-floating-promises): Promises must be awaited.
10+
,-[no-floating-promises/index.ts:2:1]
11+
1 | const promise = new Promise((resolve, _reject) => resolve("value"));
12+
2 | promise;
13+
: ^^^^^^^^
14+
3 |
15+
`----
16+
help: The promise must end with a call to .catch, or end with a call to .then with a rejection handler, or be explicitly marked as ignored with the `void` operator.
17+
18+
! typescript-eslint(no-floating-promises): Promises must be awaited.
19+
,-[no-floating-promises/index.ts:8:1]
20+
7 |
21+
8 | returnsPromise().then(() => {});
22+
: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
23+
9 |
24+
`----
25+
help: The promise must end with a call to .catch, or end with a call to .then with a rejection handler, or be explicitly marked as ignored with the `void` operator.
26+
27+
! typescript-eslint(no-floating-promises): Promises must be awaited.
28+
,-[no-floating-promises/index.ts:10:1]
29+
9 |
30+
10 | Promise.reject("value").catch();
31+
: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
32+
11 |
33+
`----
34+
help: The promise must end with a call to .catch, or end with a call to .then with a rejection handler, or be explicitly marked as ignored with the `void` operator.
35+
36+
! typescript-eslint(no-floating-promises): Promises must be awaited.
37+
,-[no-floating-promises/index.ts:12:1]
38+
11 |
39+
12 | Promise.reject("value").finally();
40+
: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
41+
13 |
42+
`----
43+
help: The promise must end with a call to .catch, or end with a call to .then with a rejection handler, or be explicitly marked as ignored with the `void` operator.
44+
45+
! typescript-eslint(no-floating-promises): An array of Promises may be unintentional.
46+
,-[no-floating-promises/index.ts:14:1]
47+
13 |
48+
14 | [1, 2, 3].map(async (x) => x + 1);
49+
: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
50+
`----
51+
help: Consider handling the promises' fulfillment or rejection with Promise.all or similar, or explicitly marking the expression as ignored with the `void` operator.
52+
53+
! typescript-eslint(no-floating-promises): Promises must be awaited.
54+
,-[no-floating-promises/src/index.ts:2:1]
55+
1 | const promise = new Promise((resolve, _reject) => resolve("value"));
56+
2 | promise;
57+
: ^^^^^^^^
58+
3 |
59+
`----
60+
help: The promise must end with a call to .catch, or end with a call to .then with a rejection handler, or be explicitly marked as ignored with the `void` operator.
61+
62+
! typescript-eslint(no-floating-promises): Promises must be awaited.
63+
,-[no-floating-promises/src/index.ts:8:1]
64+
7 |
65+
8 | returnsPromise().then(() => {});
66+
: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
67+
9 |
68+
`----
69+
help: The promise must end with a call to .catch, or end with a call to .then with a rejection handler, or be explicitly marked as ignored with the `void` operator.
70+
71+
! typescript-eslint(no-floating-promises): Promises must be awaited.
72+
,-[no-floating-promises/src/index.ts:10:1]
73+
9 |
74+
10 | Promise.reject("value").catch();
75+
: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
76+
11 |
77+
`----
78+
help: The promise must end with a call to .catch, or end with a call to .then with a rejection handler, or be explicitly marked as ignored with the `void` operator.
79+
80+
! typescript-eslint(no-floating-promises): Promises must be awaited.
81+
,-[no-floating-promises/src/index.ts:12:1]
82+
11 |
83+
12 | Promise.reject("value").finally();
84+
: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
85+
13 |
86+
`----
87+
help: The promise must end with a call to .catch, or end with a call to .then with a rejection handler, or be explicitly marked as ignored with the `void` operator.
88+
89+
! typescript-eslint(no-floating-promises): An array of Promises may be unintentional.
90+
,-[no-floating-promises/src/index.ts:14:1]
91+
13 |
92+
14 | [1, 2, 3].map(async (x) => x + 1);
93+
: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
94+
`----
95+
help: Consider handling the promises' fulfillment or rejection with Promise.all or similar, or explicitly marking the expression as ignored with the `void` operator.
96+
97+
! typescript-eslint(no-floating-promises): Promises must be awaited.
98+
,-[no-floating-promises/src/overrides.ts:4:1]
99+
3 | }
100+
4 | returnsPromise().then(() => {});
101+
: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
102+
`----
103+
help: The promise must end with a call to .catch, or end with a call to .then with a rejection handler, or be explicitly marked as ignored with the `void` operator.
104+
105+
Found 11 warnings and 0 errors.
106+
Finished in <variable>ms on 3 files with 1 rules using 1 threads.
107+
----------
108+
CLI result: LintSucceeded
10109
----------

apps/oxlint/src/snapshots/fixtures__tsgolint_--type-aware [email protected]

Lines changed: 140 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,144 @@ source: apps/oxlint/src/tester.rs
55
arguments: --type-aware no-floating-promises
66
working directory: fixtures/tsgolint
77
----------
8-
Error running tsgolint: "Failed to spawn tsgolint from path `tsgolint`, with error: No such file or directory (os error 2)"----------
9-
CLI result: TsGoLintError
8+
9+
x typescript-eslint(no-confusing-void-expression): Returning a void expression from an arrow function shorthand is forbidden. Please add braces to the arrow function.
10+
,-[no-floating-promises/index.ts:1:51]
11+
1 | const promise = new Promise((resolve, _reject) => resolve("value"));
12+
: ^^^^^^^^^^^^^^^^
13+
2 | promise;
14+
`----
15+
16+
x typescript-eslint(no-floating-promises): Promises must be awaited.
17+
,-[no-floating-promises/index.ts:2:1]
18+
1 | const promise = new Promise((resolve, _reject) => resolve("value"));
19+
2 | promise;
20+
: ^^^^^^^^
21+
3 |
22+
`----
23+
help: The promise must end with a call to .catch, or end with a call to .then with a rejection handler, or be explicitly marked as ignored with the `void` operator.
24+
25+
x typescript-eslint(require-await): Function has no 'await' expression.
26+
,-[no-floating-promises/index.ts:4:1]
27+
3 |
28+
4 | ,-> async function returnsPromise() {
29+
5 | | return "value";
30+
6 | `-> }
31+
7 |
32+
`----
33+
34+
x typescript-eslint(no-floating-promises): Promises must be awaited.
35+
,-[no-floating-promises/index.ts:8:1]
36+
7 |
37+
8 | returnsPromise().then(() => {});
38+
: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
39+
9 |
40+
`----
41+
help: The promise must end with a call to .catch, or end with a call to .then with a rejection handler, or be explicitly marked as ignored with the `void` operator.
42+
43+
x typescript-eslint(prefer-promise-reject-errors): Expected the Promise rejection reason to be an Error.
44+
,-[no-floating-promises/index.ts:10:1]
45+
9 |
46+
10 | Promise.reject("value").catch();
47+
: ^^^^^^^^^^^^^^^^^^^^^^^
48+
11 |
49+
`----
50+
51+
x typescript-eslint(no-floating-promises): Promises must be awaited.
52+
,-[no-floating-promises/index.ts:10:1]
53+
9 |
54+
10 | Promise.reject("value").catch();
55+
: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
56+
11 |
57+
`----
58+
help: The promise must end with a call to .catch, or end with a call to .then with a rejection handler, or be explicitly marked as ignored with the `void` operator.
59+
60+
x typescript-eslint(prefer-promise-reject-errors): Expected the Promise rejection reason to be an Error.
61+
,-[no-floating-promises/index.ts:12:1]
62+
11 |
63+
12 | Promise.reject("value").finally();
64+
: ^^^^^^^^^^^^^^^^^^^^^^^
65+
13 |
66+
`----
67+
68+
x typescript-eslint(no-floating-promises): Promises must be awaited.
69+
,-[no-floating-promises/index.ts:12:1]
70+
11 |
71+
12 | Promise.reject("value").finally();
72+
: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
73+
13 |
74+
`----
75+
help: The promise must end with a call to .catch, or end with a call to .then with a rejection handler, or be explicitly marked as ignored with the `void` operator.
76+
77+
x typescript-eslint(no-floating-promises): An array of Promises may be unintentional.
78+
,-[no-floating-promises/index.ts:14:1]
79+
13 |
80+
14 | [1, 2, 3].map(async (x) => x + 1);
81+
: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
82+
`----
83+
help: Consider handling the promises' fulfillment or rejection with Promise.all or similar, or explicitly marking the expression as ignored with the `void` operator.
84+
85+
x typescript-eslint(require-await): Function has no 'await' expression.
86+
,-[no-floating-promises/index.ts:14:15]
87+
13 |
88+
14 | [1, 2, 3].map(async (x) => x + 1);
89+
: ^^^^^^^^^^^^^^^^^^
90+
`----
91+
92+
! typescript-eslint(no-floating-promises): Promises must be awaited.
93+
,-[no-floating-promises/src/index.ts:2:1]
94+
1 | const promise = new Promise((resolve, _reject) => resolve("value"));
95+
2 | promise;
96+
: ^^^^^^^^
97+
3 |
98+
`----
99+
help: The promise must end with a call to .catch, or end with a call to .then with a rejection handler, or be explicitly marked as ignored with the `void` operator.
100+
101+
! typescript-eslint(no-floating-promises): Promises must be awaited.
102+
,-[no-floating-promises/src/index.ts:8:1]
103+
7 |
104+
8 | returnsPromise().then(() => {});
105+
: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
106+
9 |
107+
`----
108+
help: The promise must end with a call to .catch, or end with a call to .then with a rejection handler, or be explicitly marked as ignored with the `void` operator.
109+
110+
! typescript-eslint(no-floating-promises): Promises must be awaited.
111+
,-[no-floating-promises/src/index.ts:10:1]
112+
9 |
113+
10 | Promise.reject("value").catch();
114+
: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
115+
11 |
116+
`----
117+
help: The promise must end with a call to .catch, or end with a call to .then with a rejection handler, or be explicitly marked as ignored with the `void` operator.
118+
119+
! typescript-eslint(no-floating-promises): Promises must be awaited.
120+
,-[no-floating-promises/src/index.ts:12:1]
121+
11 |
122+
12 | Promise.reject("value").finally();
123+
: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
124+
13 |
125+
`----
126+
help: The promise must end with a call to .catch, or end with a call to .then with a rejection handler, or be explicitly marked as ignored with the `void` operator.
127+
128+
! typescript-eslint(no-floating-promises): An array of Promises may be unintentional.
129+
,-[no-floating-promises/src/index.ts:14:1]
130+
13 |
131+
14 | [1, 2, 3].map(async (x) => x + 1);
132+
: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
133+
`----
134+
help: Consider handling the promises' fulfillment or rejection with Promise.all or similar, or explicitly marking the expression as ignored with the `void` operator.
135+
136+
x typescript-eslint(no-floating-promises): Promises must be awaited.
137+
,-[no-floating-promises/src/overrides.ts:4:1]
138+
3 | }
139+
4 | returnsPromise().then(() => {});
140+
: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
141+
`----
142+
help: The promise must end with a call to .catch, or end with a call to .then with a rejection handler, or be explicitly marked as ignored with the `void` operator.
143+
144+
Found 5 warnings and 11 errors.
145+
Finished in <variable>ms on 3 files using 1 threads.
146+
----------
147+
CLI result: LintFoundErrors
10148
----------

0 commit comments

Comments
 (0)