Skip to content

Commit

Permalink
build: update dlint to v0.2.10 (denoland/deno#8284)
Browse files Browse the repository at this point in the history
Update prebuilt "dlint" binary to v0.2.10 and fix diagnostics
for "require-await" rule.

Co-authored-by: Bartek Iwańczuk <[email protected]>
  • Loading branch information
2 people authored and denobot committed Feb 1, 2021
1 parent 519a862 commit 2d7871b
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 9 deletions.
3 changes: 0 additions & 3 deletions async/mux_async_iterator_test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand Down
1 change: 0 additions & 1 deletion io/bufio.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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> {
Expand Down
10 changes: 5 additions & 5 deletions node/_util/_util_callbackify_test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
};
Expand Down Expand Up @@ -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);
};
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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;
}
Expand Down

0 comments on commit 2d7871b

Please sign in to comment.