diff --git a/deno.json b/deno.json index 619ab66f7..1b3a853c3 100644 --- a/deno.json +++ b/deno.json @@ -40,7 +40,8 @@ "lint": { "rules": { "include": [ - "camelcase" + "camelcase", + "no-sync-fn-in-async-fn" ] } } diff --git a/fs/ensure_link_test.ts b/fs/ensure_link_test.ts index 0f12e25c1..3603cab95 100644 --- a/fs/ensure_link_test.ts +++ b/fs/ensure_link_test.ts @@ -137,7 +137,7 @@ Deno.test("ensureLink() rejects if link does not exist", async function () { // "Access is denied. (os error 5)" // throw in CI ); - Deno.removeSync(testDir, { recursive: true }); + await Deno.remove(testDir, { recursive: true }); }); Deno.test("ensureLinkSync() throws if link does not exist", function () { diff --git a/http/file_server_test.ts b/http/file_server_test.ts index 8d3b79180..134f289d2 100644 --- a/http/file_server_test.ts +++ b/http/file_server_test.ts @@ -958,13 +958,15 @@ Deno.test( }, }, async () => { - const tempDir = Deno.makeTempDirSync({ dir: `${moduleDir}/testdata` }); + const tempDir = await Deno.makeTempDir({ + dir: `${moduleDir}/testdata`, + }); const req = new Request(`http://localhost/${basename(tempDir)}/`); const res = await serveDir(req, serveDirOptions); await res.body?.cancel(); assertEquals(res.status, 200); - Deno.removeSync(tempDir); + await Deno.remove(tempDir); }, ); diff --git a/http/server.ts b/http/server.ts index 8fd3f3559..98d951543 100644 --- a/http/server.ts +++ b/http/server.ts @@ -773,7 +773,9 @@ export async function serveTls( once: true, }); + // deno-lint-ignore no-sync-fn-in-async-fn const key = options.key || Deno.readTextFileSync(options.keyFile!); + // deno-lint-ignore no-sync-fn-in-async-fn const cert = options.cert || Deno.readTextFileSync(options.certFile!); const listener = Deno.listenTls({