summaryrefslogtreecommitdiff
path: root/std
diff options
context:
space:
mode:
authorYusuke Tanaka <yusuktan@maguro.dev>2020-11-15 04:27:37 +0900
committerGitHub <noreply@github.com>2020-11-14 20:27:37 +0100
commit90290030469cc7f278492ece67dd783c4d380b43 (patch)
treeabf33a2bd20a8f734563f294aff3c4a440d9d49e /std
parent3d65e57d7c48f5dd1307f83771fe5574d914cea3 (diff)
build: update dlint to v0.2.10 (#8284)
Update prebuilt "dlint" binary to v0.2.10 and fix diagnostics for "require-await" rule. Co-authored-by: Bartek IwaƄczuk <biwanczuk@gmail.com>
Diffstat (limited to 'std')
-rw-r--r--std/async/mux_async_iterator_test.ts3
-rw-r--r--std/io/bufio.ts1
-rw-r--r--std/node/_util/_util_callbackify_test.ts10
3 files changed, 5 insertions, 9 deletions
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;
}