Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -6,101 +6,101 @@ arguments: --type-aware no-floating-promises -c config-test.json
working directory: fixtures/tsgolint
----------

! typescript-eslint(no-floating-promises): Promises must be awaited, end with a call to .catch, end with a call to .then with a rejection handler or be explicitly marked as ignored with the `void`
| operator.
! typescript-eslint(no-floating-promises): Promises must be awaited.
,-[no-floating-promises/index.ts:2:1]
1 | const promise = new Promise((resolve, _reject) => resolve("value"));
2 | promise;
: ^^^^^^^^
3 |
`----
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.

! typescript-eslint(no-floating-promises): Promises must be awaited, end with a call to .catch, end with a call to .then with a rejection handler or be explicitly marked as ignored with the `void`
| operator.
! typescript-eslint(no-floating-promises): Promises must be awaited.
,-[no-floating-promises/index.ts:8:1]
7 |
8 | returnsPromise().then(() => {});
: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
9 |
`----
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.

! typescript-eslint(no-floating-promises): Promises must be awaited, end with a call to .catch, end with a call to .then with a rejection handler or be explicitly marked as ignored with the `void`
| operator.
! typescript-eslint(no-floating-promises): Promises must be awaited.
,-[no-floating-promises/index.ts:10:1]
9 |
10 | Promise.reject("value").catch();
: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
11 |
`----
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.

! typescript-eslint(no-floating-promises): Promises must be awaited, end with a call to .catch, end with a call to .then with a rejection handler or be explicitly marked as ignored with the `void`
| operator.
! typescript-eslint(no-floating-promises): Promises must be awaited.
,-[no-floating-promises/index.ts:12:1]
11 |
12 | Promise.reject("value").finally();
: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
13 |
`----
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.

! typescript-eslint(no-floating-promises): An array of Promises may be unintentional. Consider handling the promises' fulfillment or rejection with Promise.all or similar, or explicitly marking
| the expression as ignored with the `void` operator.
! typescript-eslint(no-floating-promises): An array of Promises may be unintentional.
,-[no-floating-promises/index.ts:14:1]
13 |
14 | [1, 2, 3].map(async (x) => x + 1);
: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
`----
help: Consider handling the promises' fulfillment or rejection with Promise.all or similar, or explicitly marking the expression as ignored with the `void` operator.

! typescript-eslint(no-floating-promises): Promises must be awaited, end with a call to .catch, end with a call to .then with a rejection handler or be explicitly marked as ignored with the `void`
| operator.
! typescript-eslint(no-floating-promises): Promises must be awaited.
,-[no-floating-promises/src/index.ts:2:1]
1 | const promise = new Promise((resolve, _reject) => resolve("value"));
2 | promise;
: ^^^^^^^^
3 |
`----
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.

! typescript-eslint(no-floating-promises): Promises must be awaited, end with a call to .catch, end with a call to .then with a rejection handler or be explicitly marked as ignored with the `void`
| operator.
! typescript-eslint(no-floating-promises): Promises must be awaited.
,-[no-floating-promises/src/index.ts:8:1]
7 |
8 | returnsPromise().then(() => {});
: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
9 |
`----
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.

! typescript-eslint(no-floating-promises): Promises must be awaited, end with a call to .catch, end with a call to .then with a rejection handler or be explicitly marked as ignored with the `void`
| operator.
! typescript-eslint(no-floating-promises): Promises must be awaited.
,-[no-floating-promises/src/index.ts:10:1]
9 |
10 | Promise.reject("value").catch();
: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
11 |
`----
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.

! typescript-eslint(no-floating-promises): Promises must be awaited, end with a call to .catch, end with a call to .then with a rejection handler or be explicitly marked as ignored with the `void`
| operator.
! typescript-eslint(no-floating-promises): Promises must be awaited.
,-[no-floating-promises/src/index.ts:12:1]
11 |
12 | Promise.reject("value").finally();
: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
13 |
`----
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.

! typescript-eslint(no-floating-promises): An array of Promises may be unintentional. Consider handling the promises' fulfillment or rejection with Promise.all or similar, or explicitly marking
| the expression as ignored with the `void` operator.
! typescript-eslint(no-floating-promises): An array of Promises may be unintentional.
,-[no-floating-promises/src/index.ts:14:1]
13 |
14 | [1, 2, 3].map(async (x) => x + 1);
: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
`----
help: Consider handling the promises' fulfillment or rejection with Promise.all or similar, or explicitly marking the expression as ignored with the `void` operator.

! typescript-eslint(no-floating-promises): Promises must be awaited, end with a call to .catch, end with a call to .then with a rejection handler or be explicitly marked as ignored with the `void`
| operator.
! typescript-eslint(no-floating-promises): Promises must be awaited.
,-[no-floating-promises/src/overrides.ts:4:1]
3 | }
4 | returnsPromise().then(() => {});
: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
`----
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.

Found 11 warnings and 0 errors.
Finished in <variable>ms on 3 files with 1 rules using 1 threads.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,14 @@ working directory: fixtures/tsgolint
2 | promise;
`----

x typescript-eslint(no-floating-promises): Promises must be awaited, end with a call to .catch, end with a call to .then with a rejection handler or be explicitly marked as ignored with the `void`
| operator.
x typescript-eslint(no-floating-promises): Promises must be awaited.
,-[no-floating-promises/index.ts:2:1]
1 | const promise = new Promise((resolve, _reject) => resolve("value"));
2 | promise;
: ^^^^^^^^
3 |
`----
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.

x typescript-eslint(require-await): Function has no 'await' expression.
,-[no-floating-promises/index.ts:4:1]
Expand All @@ -31,14 +31,14 @@ working directory: fixtures/tsgolint
7 |
`----

x typescript-eslint(no-floating-promises): Promises must be awaited, end with a call to .catch, end with a call to .then with a rejection handler or be explicitly marked as ignored with the `void`
| operator.
x typescript-eslint(no-floating-promises): Promises must be awaited.
,-[no-floating-promises/index.ts:8:1]
7 |
8 | returnsPromise().then(() => {});
: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
9 |
`----
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.

x typescript-eslint(prefer-promise-reject-errors): Expected the Promise rejection reason to be an Error.
,-[no-floating-promises/index.ts:10:1]
Expand All @@ -48,14 +48,14 @@ working directory: fixtures/tsgolint
11 |
`----

x typescript-eslint(no-floating-promises): Promises must be awaited, end with a call to .catch, end with a call to .then with a rejection handler or be explicitly marked as ignored with the `void`
| operator.
x typescript-eslint(no-floating-promises): Promises must be awaited.
,-[no-floating-promises/index.ts:10:1]
9 |
10 | Promise.reject("value").catch();
: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
11 |
`----
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.

x typescript-eslint(prefer-promise-reject-errors): Expected the Promise rejection reason to be an Error.
,-[no-floating-promises/index.ts:12:1]
Expand All @@ -65,22 +65,22 @@ working directory: fixtures/tsgolint
13 |
`----

x typescript-eslint(no-floating-promises): Promises must be awaited, end with a call to .catch, end with a call to .then with a rejection handler or be explicitly marked as ignored with the `void`
| operator.
x typescript-eslint(no-floating-promises): Promises must be awaited.
,-[no-floating-promises/index.ts:12:1]
11 |
12 | Promise.reject("value").finally();
: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
13 |
`----
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.

x typescript-eslint(no-floating-promises): An array of Promises may be unintentional. Consider handling the promises' fulfillment or rejection with Promise.all or similar, or explicitly marking
| the expression as ignored with the `void` operator.
x typescript-eslint(no-floating-promises): An array of Promises may be unintentional.
,-[no-floating-promises/index.ts:14:1]
13 |
14 | [1, 2, 3].map(async (x) => x + 1);
: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
`----
help: Consider handling the promises' fulfillment or rejection with Promise.all or similar, or explicitly marking the expression as ignored with the `void` operator.

x typescript-eslint(require-await): Function has no 'await' expression.
,-[no-floating-promises/index.ts:14:15]
Expand All @@ -89,57 +89,57 @@ working directory: fixtures/tsgolint
: ^^^^^^^^^^^^^^^^^^
`----

! typescript-eslint(no-floating-promises): Promises must be awaited, end with a call to .catch, end with a call to .then with a rejection handler or be explicitly marked as ignored with the `void`
| operator.
! typescript-eslint(no-floating-promises): Promises must be awaited.
,-[no-floating-promises/src/index.ts:2:1]
1 | const promise = new Promise((resolve, _reject) => resolve("value"));
2 | promise;
: ^^^^^^^^
3 |
`----
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.

! typescript-eslint(no-floating-promises): Promises must be awaited, end with a call to .catch, end with a call to .then with a rejection handler or be explicitly marked as ignored with the `void`
| operator.
! typescript-eslint(no-floating-promises): Promises must be awaited.
,-[no-floating-promises/src/index.ts:8:1]
7 |
8 | returnsPromise().then(() => {});
: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
9 |
`----
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.

! typescript-eslint(no-floating-promises): Promises must be awaited, end with a call to .catch, end with a call to .then with a rejection handler or be explicitly marked as ignored with the `void`
| operator.
! typescript-eslint(no-floating-promises): Promises must be awaited.
,-[no-floating-promises/src/index.ts:10:1]
9 |
10 | Promise.reject("value").catch();
: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
11 |
`----
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.

! typescript-eslint(no-floating-promises): Promises must be awaited, end with a call to .catch, end with a call to .then with a rejection handler or be explicitly marked as ignored with the `void`
| operator.
! typescript-eslint(no-floating-promises): Promises must be awaited.
,-[no-floating-promises/src/index.ts:12:1]
11 |
12 | Promise.reject("value").finally();
: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
13 |
`----
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.

! typescript-eslint(no-floating-promises): An array of Promises may be unintentional. Consider handling the promises' fulfillment or rejection with Promise.all or similar, or explicitly marking
| the expression as ignored with the `void` operator.
! typescript-eslint(no-floating-promises): An array of Promises may be unintentional.
,-[no-floating-promises/src/index.ts:14:1]
13 |
14 | [1, 2, 3].map(async (x) => x + 1);
: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
`----
help: Consider handling the promises' fulfillment or rejection with Promise.all or similar, or explicitly marking the expression as ignored with the `void` operator.

x typescript-eslint(no-floating-promises): Promises must be awaited, end with a call to .catch, end with a call to .then with a rejection handler or be explicitly marked as ignored with the `void`
| operator.
x typescript-eslint(no-floating-promises): Promises must be awaited.
,-[no-floating-promises/src/overrides.ts:4:1]
3 | }
4 | returnsPromise().then(() => {});
: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
`----
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.

Found 5 warnings and 11 errors.
Finished in <variable>ms on 3 files using 1 threads.
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"devDependencies": {
"@napi-rs/cli": "catalog:",
"emnapi": "1.4.5",
"oxlint-tsgolint": "0.0.1",
"oxlint-tsgolint": "0.0.3",
"typescript": "catalog:",
"vitest": "catalog:"
}
Expand Down
Loading
Loading