diff options
-rw-r--r-- | cli/tests/async_error.ts | 2 | ||||
-rw-r--r-- | cli/tests/subdir/worker_types.ts | 2 | ||||
-rw-r--r-- | cli/tests/top_level_for_await.ts | 1 | ||||
-rw-r--r-- | op_crates/fetch/11_streams.js | 4 | ||||
-rw-r--r-- | std/async/mux_async_iterator_test.ts | 3 | ||||
-rw-r--r-- | std/io/bufio.ts | 1 | ||||
-rw-r--r-- | std/node/_util/_util_callbackify_test.ts | 10 | ||||
m--------- | third_party | 0 | ||||
-rw-r--r-- | tools/util.js | 4 |
9 files changed, 13 insertions, 14 deletions
diff --git a/cli/tests/async_error.ts b/cli/tests/async_error.ts index b37369bac..b55c73aeb 100644 --- a/cli/tests/async_error.ts +++ b/cli/tests/async_error.ts @@ -1,5 +1,5 @@ console.log("hello"); -// eslint-disable-next-line require-await +// deno-lint-ignore require-await const foo = async (): Promise<never> => { console.log("before error"); throw Error("error"); diff --git a/cli/tests/subdir/worker_types.ts b/cli/tests/subdir/worker_types.ts index 7a651e35a..b67a3b782 100644 --- a/cli/tests/subdir/worker_types.ts +++ b/cli/tests/subdir/worker_types.ts @@ -1,4 +1,4 @@ -// eslint-disable-next-line require-await +// deno-lint-ignore require-await self.onmessage = async (_msg: MessageEvent) => { self.postMessage("hello"); }; diff --git a/cli/tests/top_level_for_await.ts b/cli/tests/top_level_for_await.ts index 92d8af30a..9179322d7 100644 --- a/cli/tests/top_level_for_await.ts +++ b/cli/tests/top_level_for_await.ts @@ -1,4 +1,3 @@ -// eslint-disable-next-line require-await async function* asyncGenerator(): AsyncIterableIterator<number> { let i = 0; while (i < 3) { diff --git a/op_crates/fetch/11_streams.js b/op_crates/fetch/11_streams.js index 1c1889e09..549bc9922 100644 --- a/op_crates/fetch/11_streams.js +++ b/op_crates/fetch/11_streams.js @@ -1071,14 +1071,17 @@ throw new TypeError("method is not callable"); } if (algoArgCount === 0) { + // deno-lint-ignore require-await return async () => call(method, underlyingObject, extraArgs); } else { + // deno-lint-ignore require-await return async (arg) => { const fullArgs = [arg, ...extraArgs]; return call(method, underlyingObject, fullArgs); }; } } + // deno-lint-ignore require-await return async () => undefined; } @@ -2490,6 +2493,7 @@ if (typeof transformMethod !== "function") { throw new TypeError("tranformer.transform must be callable."); } + // deno-lint-ignore require-await transformAlgorithm = async (chunk) => call(transformMethod, transformer, [chunk, controller]); } diff --git a/std/async/mux_async_iterator_test.ts b/std/async/mux_async_iterator_test.ts index 7977e4f56..51c0349cc 100644 --- a/std/async/mux_async_iterator_test.ts +++ b/std/async/mux_async_iterator_test.ts @@ -2,21 +2,18 @@ import { assertEquals, assertThrowsAsync } from "../testing/asserts.ts"; import { MuxAsyncIterator } from "./mux_async_iterator.ts"; -// eslint-disable-next-line require-await async function* gen123(): AsyncIterableIterator<number> { yield 1; yield 2; yield 3; } -// eslint-disable-next-line require-await async function* gen456(): AsyncIterableIterator<number> { yield 4; yield 5; yield 6; } -// eslint-disable-next-line require-await async function* genThrows(): AsyncIterableIterator<number> { yield 7; throw new Error("something went wrong"); diff --git a/std/io/bufio.ts b/std/io/bufio.ts index 0d7d25998..954fc5eee 100644 --- a/std/io/bufio.ts +++ b/std/io/bufio.ts @@ -703,7 +703,6 @@ export async function* readStringDelim( } /** Read strings line-by-line from a Reader. */ -// eslint-disable-next-line require-await export async function* readLines( reader: Reader, ): AsyncIterableIterator<string> { diff --git a/std/node/_util/_util_callbackify_test.ts b/std/node/_util/_util_callbackify_test.ts index 4a87eb355..26a8cd249 100644 --- a/std/node/_util/_util_callbackify_test.ts +++ b/std/node/_util/_util_callbackify_test.ts @@ -80,7 +80,7 @@ Deno.test( const testQueue = new TestQueue(); for (const value of values) { - // eslint-disable-next-line require-await + // deno-lint-ignore require-await const asyncFn = async (): Promise<typeof value> => { return value; }; @@ -136,7 +136,7 @@ Deno.test( const testQueue = new TestQueue(); for (const value of values) { - // eslint-disable-next-line require-await + // deno-lint-ignore require-await const asyncFn = async (): Promise<never> => { return Promise.reject(value); }; @@ -245,7 +245,7 @@ Deno.test("callbackify passes arguments to the original", async () => { const testQueue = new TestQueue(); for (const value of values) { - // eslint-disable-next-line require-await + // deno-lint-ignore require-await const asyncFn = async (arg: typeof value): Promise<typeof value> => { assertStrictEquals(arg, value); return arg; @@ -314,7 +314,7 @@ Deno.test("callbackify preserves the `this` binding", async () => { }); const objectWithAsyncFunction = { - // eslint-disable-next-line require-await + // deno-lint-ignore require-await async fn(this: unknown, arg: typeof value): Promise<typeof value> { assertStrictEquals(this, objectWithAsyncFunction); return arg; @@ -360,7 +360,7 @@ Deno.test("callbackify throws with non-function inputs", () => { Deno.test( "callbackify returns a function that throws if the last argument is not a function", () => { - // eslint-disable-next-line require-await + // deno-lint-ignore require-await async function asyncFn(): Promise<number> { return 42; } diff --git a/third_party b/third_party -Subproject 9aff0d56e9920c26f8b2eca8714f7e9474fd65c +Subproject a35cf5d737327db2b2611d74b0b010b28d59e52 diff --git a/tools/util.js b/tools/util.js index 41236e579..778aba1e3 100644 --- a/tools/util.js +++ b/tools/util.js @@ -31,7 +31,7 @@ async function getFilesFromGit(baseDir, cmd) { return files; } -async function gitLsFiles(baseDir, patterns) { +function gitLsFiles(baseDir, patterns) { baseDir = Deno.realPathSync(baseDir); const cmd = [ "git", @@ -50,7 +50,7 @@ async function gitLsFiles(baseDir, patterns) { } /** List all files staged for commit */ -async function gitStaged(baseDir, patterns) { +function gitStaged(baseDir, patterns) { baseDir = Deno.realPathSync(baseDir); const cmd = [ "git", |