diff --git a/cli/dts/lib.deno.shared_globals.d.ts b/cli/dts/lib.deno.shared_globals.d.ts index a2609be85c77b..d3784705eb907 100644 --- a/cli/dts/lib.deno.shared_globals.d.ts +++ b/cli/dts/lib.deno.shared_globals.d.ts @@ -571,7 +571,6 @@ declare class CustomEvent extends Event { interface ErrorConstructor { /** See https://v8.dev/docs/stack-trace-api#stack-trace-collection-for-custom-exceptions. */ - // eslint-disable-next-line @typescript-eslint/ban-types captureStackTrace(error: Object, constructor?: Function): void; // TODO(nayeemrmn): Support `Error.prepareStackTrace()`. We currently use this // internally in a way that makes it unavailable for users. diff --git a/cli/tests/018_async_catch.ts b/cli/tests/018_async_catch.ts index a16f11696bc57..85423ceda9a90 100644 --- a/cli/tests/018_async_catch.ts +++ b/cli/tests/018_async_catch.ts @@ -6,7 +6,7 @@ async function call(): Promise { console.log("before await fn()"); await fn(); console.log("after await fn()"); - } catch (error) { + } catch (_error) { console.log("catch"); } console.log("after try-catch"); diff --git a/cli/tests/038_checkjs.js b/cli/tests/038_checkjs.js index 628d3e37610aa..f0856d94c4f6f 100644 --- a/cli/tests/038_checkjs.js +++ b/cli/tests/038_checkjs.js @@ -2,5 +2,4 @@ consol.log("hello world!"); // the following error should be ignored and not output to the console -// eslint-disable-next-line const foo = new Foo(); diff --git a/cli/tests/038_checkjs.js.out b/cli/tests/038_checkjs.js.out index 4522902725f61..bd3fc35481513 100644 --- a/cli/tests/038_checkjs.js.out +++ b/cli/tests/038_checkjs.js.out @@ -12,11 +12,11 @@ consol.log("hello world!"); TS2552 [ERROR]: Cannot find name 'Foo'. Did you mean 'foo'? const foo = new Foo(); ~~~ - at [WILDCARD]tests/038_checkjs.js:6:17 + at [WILDCARD]tests/038_checkjs.js:5:17 'foo' is declared here. const foo = new Foo(); ~~~ - at [WILDCARD]tests/038_checkjs.js:6:7 + at [WILDCARD]tests/038_checkjs.js:5:7 Found 2 errors. diff --git a/cli/tests/048_media_types_jsx.ts b/cli/tests/048_media_types_jsx.ts index c2ece995a6bf4..0449630006fb4 100644 --- a/cli/tests/048_media_types_jsx.ts +++ b/cli/tests/048_media_types_jsx.ts @@ -11,7 +11,6 @@ import { loaded as loadedJsx3 } from "http://localhost:4545/cli/tests/subdir/mt_ import { loaded as loadedJsx4 } from "http://localhost:4545/cli/tests/subdir/mt_application_x_javascript_jsx.j4.jsx"; declare global { - // deno-lint-ignore no-namespace namespace JSX { interface IntrinsicElements { // deno-lint-ignore no-explicit-any diff --git a/cli/tests/067_test_no_run_type_error.out b/cli/tests/067_test_no_run_type_error.out index f67ee66474a0f..a09d0434836dc 100644 --- a/cli/tests/067_test_no_run_type_error.out +++ b/cli/tests/067_test_no_run_type_error.out @@ -1,4 +1,4 @@ [WILDCARD]error: TS2322 [ERROR]: Type 'number' is not assignable to type 'string'. -const a: string = 1; - ^ +const _a: string = 1; + ~~ at [WILDCARD]foo_test.ts[WILDCARD] diff --git a/cli/tests/076_info_json_deps_order.out b/cli/tests/076_info_json_deps_order.out index 615732e67c995..2d87a10540638 100644 --- a/cli/tests/076_info_json_deps_order.out +++ b/cli/tests/076_info_json_deps_order.out @@ -10,10 +10,10 @@ "code": "file://[WILDCARD]/cli/tests/recursive_imports/A.ts" } ], - "size": 46, + "size": 81, "mediaType": "TypeScript", "local": "[WILDCARD]076_info_json_deps_order.ts", - "checksum": "88b144f362d31ac42263648aadef727dd36d039d3b8ac0248fdaff25d4de415a" + "checksum": "5dd40fe33e5924cca513489ce568e86c9b9fe318a87975403c8923629018680d" }, { "specifier": "file://[WILDCARD]/cli/tests/recursive_imports/A.ts", @@ -81,5 +81,5 @@ "checksum": "01b595d69514bfd001ba2cf421feabeaef559513f10697bf1a22781f8a8ed7f0" } ], - "size": 440 + "size": 475 } \ No newline at end of file diff --git a/cli/tests/076_info_json_deps_order.ts b/cli/tests/076_info_json_deps_order.ts index f9d35fd5acc1e..b1ae75e68e042 100644 --- a/cli/tests/076_info_json_deps_order.ts +++ b/cli/tests/076_info_json_deps_order.ts @@ -1 +1,2 @@ +// deno-lint-ignore no-unused-vars import { A } from "./recursive_imports/A.ts"; diff --git a/cli/tests/091_use_define_for_class_fields.ts b/cli/tests/091_use_define_for_class_fields.ts index 9be984abf4011..46be3ac0b8563 100644 --- a/cli/tests/091_use_define_for_class_fields.ts +++ b/cli/tests/091_use_define_for_class_fields.ts @@ -1,4 +1,4 @@ -class A { +class _A { b = this.a; constructor(public a: unknown) {} } diff --git a/cli/tests/deno_doc.ts b/cli/tests/deno_doc.ts index 92ba2f174de28..fb3c5095736df 100644 --- a/cli/tests/deno_doc.ts +++ b/cli/tests/deno_doc.ts @@ -1,4 +1,3 @@ /** Some JSDoc */ -// eslint-disable-next-line @typescript-eslint/explicit-function-return-type export function foo() { } diff --git a/cli/tests/error_004_missing_module.ts b/cli/tests/error_004_missing_module.ts index ab5350408ccb6..82b2811816f98 100644 --- a/cli/tests/error_004_missing_module.ts +++ b/cli/tests/error_004_missing_module.ts @@ -1,4 +1,3 @@ -// eslint-disable-next-line import * as badModule from "./bad-module.ts"; console.log(badModule); diff --git a/cli/tests/error_004_missing_module.ts.out b/cli/tests/error_004_missing_module.ts.out index 1b3dd534f231a..474fdf8ed13c3 100644 --- a/cli/tests/error_004_missing_module.ts.out +++ b/cli/tests/error_004_missing_module.ts.out @@ -1,2 +1,2 @@ [WILDCARD]error: Cannot resolve module "file:///[WILDCARD]cli/tests/bad-module.ts" from "file:///[WILDCARD]cli/tests/error_004_missing_module.ts". - at file:///[WILDCARD]cli/tests/error_004_missing_module.ts:2:0 + at file:///[WILDCARD]cli/tests/error_004_missing_module.ts:1:0 diff --git a/cli/tests/error_005_missing_dynamic_import.ts b/cli/tests/error_005_missing_dynamic_import.ts index 4c09feb5faa56..4ff10f275f3f4 100644 --- a/cli/tests/error_005_missing_dynamic_import.ts +++ b/cli/tests/error_005_missing_dynamic_import.ts @@ -1,4 +1,3 @@ (async (): Promise => { - // eslint-disable-next-line - const badModule = await import("./bad-module.ts"); + const _badModule = await import("./bad-module.ts"); })(); diff --git a/cli/tests/error_005_missing_dynamic_import.ts.out b/cli/tests/error_005_missing_dynamic_import.ts.out index e21c7fffee53f..da680e19572c3 100644 --- a/cli/tests/error_005_missing_dynamic_import.ts.out +++ b/cli/tests/error_005_missing_dynamic_import.ts.out @@ -1,4 +1,4 @@ error: Uncaught (in promise) TypeError: Cannot resolve module "[WILDCARD]/cli/tests/bad-module.ts". - const badModule = await import("./bad-module.ts"); - ^ - at async file://[WILDCARD]/error_005_missing_dynamic_import.ts:3:21 + const _badModule = await import("./bad-module.ts"); + ^ + at async file://[WILDCARD]/error_005_missing_dynamic_import.ts:2:22 diff --git a/cli/tests/error_008_checkjs.js b/cli/tests/error_008_checkjs.js index 628d3e37610aa..f0856d94c4f6f 100644 --- a/cli/tests/error_008_checkjs.js +++ b/cli/tests/error_008_checkjs.js @@ -2,5 +2,4 @@ consol.log("hello world!"); // the following error should be ignored and not output to the console -// eslint-disable-next-line const foo = new Foo(); diff --git a/cli/tests/error_011_bad_module_specifier.ts b/cli/tests/error_011_bad_module_specifier.ts index a9ccc45231a64..1c57e37a51d98 100644 --- a/cli/tests/error_011_bad_module_specifier.ts +++ b/cli/tests/error_011_bad_module_specifier.ts @@ -1,4 +1,3 @@ -// eslint-disable-next-line import * as badModule from "bad-module.ts"; console.log(badModule); diff --git a/cli/tests/error_012_bad_dynamic_import_specifier.ts b/cli/tests/error_012_bad_dynamic_import_specifier.ts index 0420a80bf7313..1b538b7871b43 100644 --- a/cli/tests/error_012_bad_dynamic_import_specifier.ts +++ b/cli/tests/error_012_bad_dynamic_import_specifier.ts @@ -1,4 +1,3 @@ (async (): Promise => { - // eslint-disable-next-line - const badModule = await import("bad-module.ts"); + const _badModule = await import("bad-module.ts"); })(); diff --git a/cli/tests/error_012_bad_dynamic_import_specifier.ts.out b/cli/tests/error_012_bad_dynamic_import_specifier.ts.out index 15658a6ebf599..45bce8261604f 100644 --- a/cli/tests/error_012_bad_dynamic_import_specifier.ts.out +++ b/cli/tests/error_012_bad_dynamic_import_specifier.ts.out @@ -1,5 +1,5 @@ Check [WILDCARD]error_012_bad_dynamic_import_specifier.ts error: Uncaught (in promise) TypeError: relative import path "bad-module.ts" not prefixed with / or ./ or ../ Imported from "[WILDCARD]/error_012_bad_dynamic_import_specifier.ts" - const badModule = await import("bad-module.ts"); - ^ - at async file:///[WILDCARD]/error_012_bad_dynamic_import_specifier.ts:3:21 + const _badModule = await import("bad-module.ts"); + ^ + at async file:///[WILDCARD]/error_012_bad_dynamic_import_specifier.ts:2:22 diff --git a/cli/tests/file_exists.ts b/cli/tests/file_exists.ts index 5fc5414b38996..20de4d4f2f37b 100644 --- a/cli/tests/file_exists.ts +++ b/cli/tests/file_exists.ts @@ -1,6 +1,6 @@ try { await Deno.open(Deno.args[0]); Deno.exit(0); -} catch (e) { +} catch (_e) { Deno.exit(1); } diff --git a/cli/tests/heapstats.js b/cli/tests/heapstats.js index fba9e66d9c0ff..675fac2d61038 100644 --- a/cli/tests/heapstats.js +++ b/cli/tests/heapstats.js @@ -14,6 +14,7 @@ function allocTest(alloc, allocAssert, deallocAssert) { const t1 = sample(); // Alloc + // deno-lint-ignore no-unused-vars let x = alloc(); const t2 = sample(); allocAssert(delta(t1, t2)); diff --git a/cli/tests/no_validate_asm.js b/cli/tests/no_validate_asm.js index 38ea0a446b3bf..ef999e0802658 100644 --- a/cli/tests/no_validate_asm.js +++ b/cli/tests/no_validate_asm.js @@ -1,7 +1,7 @@ // V8 logs any asmjs validation errors to stdout, but it shows line numbers that // are non-existent in the source. -const asmJsModule = function () { +const _asmJsModule = function () { "use asm"; function func( diff --git a/cli/tests/resolve_dns.ts b/cli/tests/resolve_dns.ts index 7865d9680af50..d765e0536a5ac 100644 --- a/cli/tests/resolve_dns.ts +++ b/cli/tests/resolve_dns.ts @@ -37,6 +37,6 @@ console.log(JSON.stringify(txt)); try { await Deno.resolveDns("not-found-example.com", "A", nameServer); -} catch (e) { +} catch (_e) { console.log("Error thrown for not-found-example.com"); } diff --git a/cli/tests/test/unhandled_rejection.ts b/cli/tests/test/unhandled_rejection.ts index 396e1c09d073d..32f3111eadba5 100644 --- a/cli/tests/test/unhandled_rejection.ts +++ b/cli/tests/test/unhandled_rejection.ts @@ -1,3 +1,3 @@ -new Promise((resolve, reject) => { +new Promise((_resolve, reject) => { reject(new Error("rejection")); }); diff --git a/cli/tests/test_type_error/foo_test.ts b/cli/tests/test_type_error/foo_test.ts index 68d1afccf8662..4b9404558b678 100644 --- a/cli/tests/test_type_error/foo_test.ts +++ b/cli/tests/test_type_error/foo_test.ts @@ -1 +1 @@ -const a: string = 1; +const _a: string = 1; diff --git a/cli/tests/unit/opcall_test.ts b/cli/tests/unit/opcall_test.ts index 6bade65457fd7..bd549570e8759 100644 --- a/cli/tests/unit/opcall_test.ts +++ b/cli/tests/unit/opcall_test.ts @@ -17,7 +17,7 @@ unitTest(async function sendAsyncStackTrace() { declare global { namespace Deno { // deno-lint-ignore no-explicit-any - var core: any; // eslint-disable-line no-var + var core: any; } } diff --git a/cli/tests/workers/bench_large_message.ts b/cli/tests/workers/bench_large_message.ts index 53076e7113adf..7f6cb26ce01a5 100644 --- a/cli/tests/workers/bench_large_message.ts +++ b/cli/tests/workers/bench_large_message.ts @@ -7,7 +7,7 @@ function oneWorker(i: number) { new URL("worker_large_message.js", import.meta.url).href, { type: "module" }, ); - worker.onmessage = (e): void => { + worker.onmessage = (_e): void => { if (countDown > 0) { countDown--; return; diff --git a/cli/tests/workers/permissions_blob_local.ts.out b/cli/tests/workers/permissions_blob_local.ts.out index fab2388d8ddf0..0f6ae1435f04a 100644 --- a/cli/tests/workers/permissions_blob_local.ts.out +++ b/cli/tests/workers/permissions_blob_local.ts.out @@ -1,4 +1,4 @@ error: Uncaught (in worker "") Requires read access to "[WILDCARD]local_file.ts", run again with the --allow-read flag at blob:null/[WILDCARD]:1:0 error: Uncaught (in promise) Error: Unhandled error event reached main worker. - at Worker.#poll (deno:runtime/js/11_workers.js:246:23) + at Worker.#poll (deno:runtime/js/11_workers.js:245:23) diff --git a/cli/tests/workers/permissions_blob_remote.ts.out b/cli/tests/workers/permissions_blob_remote.ts.out index c89f7b41cce29..751218ba47796 100644 --- a/cli/tests/workers/permissions_blob_remote.ts.out +++ b/cli/tests/workers/permissions_blob_remote.ts.out @@ -1,4 +1,4 @@ error: Uncaught (in worker "") Requires net access to "example.com", run again with the --allow-net flag at blob:null/[WILDCARD]:1:0 error: Uncaught (in promise) Error: Unhandled error event reached main worker. - at Worker.#poll (deno:runtime/js/11_workers.js:246:23) + at Worker.#poll (deno:runtime/js/11_workers.js:245:23) diff --git a/cli/tests/workers/permissions_data_local.ts.out b/cli/tests/workers/permissions_data_local.ts.out index a1e1de8ab4267..00a2516591dcc 100644 --- a/cli/tests/workers/permissions_data_local.ts.out +++ b/cli/tests/workers/permissions_data_local.ts.out @@ -1,4 +1,4 @@ error: Uncaught (in worker "") Requires read access to "[WILDCARD]local_file.ts", run again with the --allow-read flag at data:application/javascript;base64,[WILDCARD]:1:0 error: Uncaught (in promise) Error: Unhandled error event reached main worker. - at Worker.#poll (deno:runtime/js/11_workers.js:246:23) + at Worker.#poll (deno:runtime/js/11_workers.js:245:23) diff --git a/cli/tests/workers/permissions_data_remote.ts.out b/cli/tests/workers/permissions_data_remote.ts.out index 2c40806724e69..f2b5fa48bcda4 100644 --- a/cli/tests/workers/permissions_data_remote.ts.out +++ b/cli/tests/workers/permissions_data_remote.ts.out @@ -1,4 +1,4 @@ error: Uncaught (in worker "") Requires net access to "example.com", run again with the --allow-net flag at data:application/javascript;base64,aW1wb3J0ICJodHRwczovL2V4YW1wbGUuY29tL3NvbWUvZmlsZS50cyI7:1:0 error: Uncaught (in promise) Error: Unhandled error event reached main worker. - at Worker.#poll (deno:runtime/js/11_workers.js:246:23) + at Worker.#poll (deno:runtime/js/11_workers.js:245:23) diff --git a/cli/tests/workers/permissions_dynamic_remote.ts.out b/cli/tests/workers/permissions_dynamic_remote.ts.out index 8600fa19161c1..63a8af51f107d 100644 --- a/cli/tests/workers/permissions_dynamic_remote.ts.out +++ b/cli/tests/workers/permissions_dynamic_remote.ts.out @@ -3,4 +3,4 @@ await import("https://example.com/some/file.ts"); ^ at async http://localhost:4545/cli/tests/workers/dynamic_remote.ts:2:1 [WILDCARD]error: Uncaught (in promise) Error: Unhandled error event reached main worker. - at Worker.#poll (deno:runtime/js/11_workers.js:246:23) + at Worker.#poll (deno:runtime/js/11_workers.js:245:23) diff --git a/cli/tests/workers/permissions_remote_remote.ts.out b/cli/tests/workers/permissions_remote_remote.ts.out index 714150a3a557a..964f8b8e916a2 100644 --- a/cli/tests/workers/permissions_remote_remote.ts.out +++ b/cli/tests/workers/permissions_remote_remote.ts.out @@ -1,4 +1,4 @@ error: Uncaught (in worker "") Requires net access to "example.com", run again with the --allow-net flag at http://localhost:4545/cli/tests/workers/static_remote.ts:2:0 error: Uncaught (in promise) Error: Unhandled error event reached main worker. - at Worker.#poll (deno:runtime/js/11_workers.js:246:23) + at Worker.#poll (deno:runtime/js/11_workers.js:245:23) diff --git a/cli/tests/workers/test.ts b/cli/tests/workers/test.ts index 954737b3a9182..bf1e46a34341f 100644 --- a/cli/tests/workers/test.ts +++ b/cli/tests/workers/test.ts @@ -198,7 +198,7 @@ Deno.test({ { type: "module" }, ); - racyWorker.onmessage = (e): void => { + racyWorker.onmessage = (_e): void => { setTimeout(() => { promise.resolve(); }, 100); @@ -353,7 +353,7 @@ Deno.test({ ); const arr: number[] = []; w.addEventListener("message", () => arr.push(1)); - w.onmessage = (e): void => { + w.onmessage = (_e): void => { arr.push(2); }; w.addEventListener("message", () => arr.push(3)); diff --git a/cli/tests/workers/worker_large_message.js b/cli/tests/workers/worker_large_message.js index f7b7da8a02a96..a1ddae4f981dd 100644 --- a/cli/tests/workers/worker_large_message.js +++ b/cli/tests/workers/worker_large_message.js @@ -3,7 +3,7 @@ const dataSmall = ""; const dataLarge = "x".repeat(10 * 1024); -onmessage = function (e) { +onmessage = function (_e) { for (let i = 0; i <= 10; i++) { if (i % 2 == 0) { postMessage(dataLarge); diff --git a/cli/tests/workers/worker_with_top_level_await.ts b/cli/tests/workers/worker_with_top_level_await.ts index 6c55289008837..bc77c7932e803 100644 --- a/cli/tests/workers/worker_with_top_level_await.ts +++ b/cli/tests/workers/worker_with_top_level_await.ts @@ -6,7 +6,7 @@ function delay(ms: number): Promise { }); } -onmessage = (e: MessageEvent) => { +onmessage = (_e: MessageEvent) => { postMessage("triggered worker handler"); close(); }; diff --git a/cli/tsc/compiler.d.ts b/cli/tsc/compiler.d.ts index e5ce12cd323f5..949d98ee0b90a 100644 --- a/cli/tsc/compiler.d.ts +++ b/cli/tsc/compiler.d.ts @@ -5,7 +5,6 @@ import * as _ts from "../dts/typescript"; declare global { - // deno-lint-ignore no-namespace namespace ts { var libs: string[]; var libMap: Map; @@ -22,7 +21,6 @@ declare global { var performance: Performance; } - // deno-lint-ignore no-namespace namespace ts { export = _ts; } diff --git a/extensions/fetch/21_formdata.js b/extensions/fetch/21_formdata.js index c50cf4cf77f63..379d5eca129ac 100644 --- a/extensions/fetch/21_formdata.js +++ b/extensions/fetch/21_formdata.js @@ -11,7 +11,7 @@ /// "use strict"; -((window) => { +((_window) => { const webidl = globalThis.__bootstrap.webidl; const { Blob, File, _byteSequence } = globalThis.__bootstrap.file; diff --git a/extensions/fetch/23_request.js b/extensions/fetch/23_request.js index 603a37a5fe651..480b83182b5c7 100644 --- a/extensions/fetch/23_request.js +++ b/extensions/fetch/23_request.js @@ -16,7 +16,7 @@ const { HTTP_TOKEN_CODE_POINT_RE, byteUpperCase } = window.__bootstrap.infra; const { URL } = window.__bootstrap.url; const { guardFromHeaders } = window.__bootstrap.headers; - const { InnerBody, mixinBody, extractBody } = window.__bootstrap.fetchBody; + const { mixinBody, extractBody } = window.__bootstrap.fetchBody; const { getLocationHref } = window.__bootstrap.location; const mimesniff = window.__bootstrap.mimesniff; const { @@ -38,7 +38,7 @@ * @property {() => string} url * @property {() => string} currentUrl * @property {[string, string][]} headerList - * @property {null | InnerBody} body + * @property {null | typeof __window.bootstrap.fetchBody.InnerBody} body * @property {"follow" | "error" | "manual"} redirectMode * @property {number} redirectCount * @property {string[]} urlList @@ -61,7 +61,7 @@ * @param {string} method * @param {string} url * @param {[string, string][]} headerList - * @param {InnerBody} body + * @param {typeof __window.bootstrap.fetchBody.InnerBody} body * @returns */ function newInnerRequest(method, url, headerList = [], body = null) { diff --git a/extensions/fetch/23_response.js b/extensions/fetch/23_response.js index 6bd7a64875fc4..6d9874c6a555b 100644 --- a/extensions/fetch/23_response.js +++ b/extensions/fetch/23_response.js @@ -15,7 +15,7 @@ ((window) => { const webidl = window.__bootstrap.webidl; const { HTTP_TAB_OR_SPACE, regexMatcher } = window.__bootstrap.infra; - const { InnerBody, extractBody, mixinBody } = window.__bootstrap.fetchBody; + const { extractBody, mixinBody } = window.__bootstrap.fetchBody; const { getLocationHref } = window.__bootstrap.location; const mimesniff = window.__bootstrap.mimesniff; const { URL } = window.__bootstrap.url; @@ -47,7 +47,7 @@ * @property {number} status * @property {string} statusMessage * @property {[string, string][]} headerList - * @property {null | InnerBody} body + * @property {null | typeof __window.bootstrap.fetchBody.InnerBody} body * @property {string} [error] */ diff --git a/extensions/file/01_file.js b/extensions/file/01_file.js index 05c4105723bf6..cbbf98e7d83ff 100644 --- a/extensions/file/01_file.js +++ b/extensions/file/01_file.js @@ -216,6 +216,7 @@ }); } + // deno-lint-ignore no-this-alias const O = this; /** @type {number} */ let relativeStart; diff --git a/extensions/timers/01_timers.js b/extensions/timers/01_timers.js index 756e38875147f..66faf85fd7ca7 100644 --- a/extensions/timers/01_timers.js +++ b/extensions/timers/01_timers.js @@ -344,7 +344,6 @@ opStartGlobalTimer(timeout); await opWaitGlobalTimer(); pendingEvents--; - // eslint-disable-next-line @typescript-eslint/no-use-before-define prepareReadyTimers(); } diff --git a/extensions/web/02_event.js b/extensions/web/02_event.js index 35112132e05a2..b6b5609bcc37c 100644 --- a/extensions/web/02_event.js +++ b/extensions/web/02_event.js @@ -706,7 +706,7 @@ for (let i = 0; i < handlers.length; i++) { const listener = handlers[i]; - let capture, once, passive, signal; + let capture, once, passive; if (typeof listener.options === "boolean") { capture = listener.options; once = false; diff --git a/extensions/web/08_text_encoding.js b/extensions/web/08_text_encoding.js index c293633c3139d..2804ff6a0215b 100644 --- a/extensions/web/08_text_encoding.js +++ b/extensions/web/08_text_encoding.js @@ -4474,7 +4474,7 @@ return ((validLen + placeHoldersLen) * 3) / 4 - placeHoldersLen; } - function _byteLength(b64, validLen, placeHoldersLen) { + function _byteLength(_b64, validLen, placeHoldersLen) { return ((validLen + placeHoldersLen) * 3) / 4 - placeHoldersLen; } diff --git a/extensions/webidl/00_webidl.js b/extensions/webidl/00_webidl.js index 6bf98be064f75..6fffa93190350 100644 --- a/extensions/webidl/00_webidl.js +++ b/extensions/webidl/00_webidl.js @@ -385,7 +385,6 @@ function isArrayBufferDetached(V) { try { - // eslint-disable-next-line no-new new Uint8Array(V); return false; } catch { diff --git a/runtime/js/11_workers.js b/runtime/js/11_workers.js index dca83c818172d..641833778b7de 100644 --- a/runtime/js/11_workers.js +++ b/runtime/js/11_workers.js @@ -7,7 +7,6 @@ const { getLocationHref } = window.__bootstrap.location; const { log, pathFromURL } = window.__bootstrap.util; const { defineEventHandler } = window.__bootstrap.webUtil; - const build = window.__bootstrap.build.build; function createWorker( specifier, diff --git a/runtime/js/40_http.js b/runtime/js/40_http.js index afc5635ac9c8d..eb3c58a6327c5 100644 --- a/runtime/js/40_http.js +++ b/runtime/js/40_http.js @@ -77,6 +77,7 @@ } [Symbol.asyncIterator]() { + // deno-lint-ignore no-this-alias const httpConn = this; return { async next() { diff --git a/runtime/js/40_testing.js b/runtime/js/40_testing.js index f835a0cf79669..8abb8a6c87eaa 100644 --- a/runtime/js/40_testing.js +++ b/runtime/js/40_testing.js @@ -4,7 +4,7 @@ ((window) => { const core = window.Deno.core; const { parsePermissions } = window.__bootstrap.worker; - const { setExitHandler, exit } = window.__bootstrap.os; + const { setExitHandler } = window.__bootstrap.os; const { Console, inspectArgs } = window.__bootstrap.console; const { metrics } = window.__bootstrap.metrics; const { assert } = window.__bootstrap.util; diff --git a/runtime/js/99_main.js b/runtime/js/99_main.js index 082c83593e619..796d5178f37c4 100644 --- a/runtime/js/99_main.js +++ b/runtime/js/99_main.js @@ -59,8 +59,6 @@ delete Object.prototype.__proto__; } } - const encoder = new TextEncoder(); - function workerClose() { if (isClosing) { return; diff --git a/third_party b/third_party index 3bd4e3652304e..6c449eaecb078 160000 --- a/third_party +++ b/third_party @@ -1 +1 @@ -Subproject commit 3bd4e3652304eb97177e1fc217943529322f4680 +Subproject commit 6c449eaecb0783b06003b5eecd2893bd2617d66e diff --git a/tools/wpt/runner.ts b/tools/wpt/runner.ts index b106283d2a78a..eae53094df0c9 100644 --- a/tools/wpt/runner.ts +++ b/tools/wpt/runner.ts @@ -21,7 +21,7 @@ export async function runWithTestUtil( if (req.status == 200) { break; } - } catch (err) { + } catch (_err) { // do nothing if this fails } const passedTime = performance.now() - start; @@ -61,7 +61,7 @@ export interface TestCaseResult { export async function runSingleTest( url: URL, - options: ManifestTestOptions, + _options: ManifestTestOptions, reporter: (result: TestCaseResult) => void, ): Promise { const bundle = await generateBundle(url); diff --git a/tools/wpt/testharnessreport.js b/tools/wpt/testharnessreport.js index 8cff0752c6eb6..d3e7833767364 100644 --- a/tools/wpt/testharnessreport.js +++ b/tools/wpt/testharnessreport.js @@ -1,13 +1,15 @@ // Copyright 2018-2021 the Deno authors. All rights reserved. MIT license. + window.add_result_callback(({ message, name, stack, status }) => { - Deno.writeAllSync( - Deno.stderr, - new TextEncoder().encode( - `${JSON.stringify({ name, status, message, stack })}\n`, - ), + const data = new TextEncoder().encode( + `${JSON.stringify({ name, status, message, stack })}\n`, ); + let bytesWritten = 0; + while (bytesWritten < data.byteLength) { + bytesWritten += Deno.stderr.writeSync(data.subarray(bytesWritten)); + } }); -window.add_completion_callback((tests, harnessStatus) => { +window.add_completion_callback((_tests, _harnessStatus) => { Deno.exit(0); });