mirror of
https://github.com/denoland/deno.git
synced 2024-11-24 15:19:26 -05:00
chore: update deno_lint binary used in CI to v0.5.0 (#10652)
This commit is contained in:
parent
21d62b9b9e
commit
cda09c166f
51 changed files with 59 additions and 69 deletions
1
cli/dts/lib.deno.shared_globals.d.ts
vendored
1
cli/dts/lib.deno.shared_globals.d.ts
vendored
|
@ -571,7 +571,6 @@ declare class CustomEvent<T = any> 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.
|
||||
|
|
|
@ -6,7 +6,7 @@ async function call(): Promise<void> {
|
|||
console.log("before await fn()");
|
||||
await fn();
|
||||
console.log("after await fn()");
|
||||
} catch (error) {
|
||||
} catch (_error) {
|
||||
console.log("catch");
|
||||
}
|
||||
console.log("after try-catch");
|
||||
|
|
|
@ -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();
|
||||
|
|
|
@ -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.
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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]
|
||||
|
|
|
@ -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
|
||||
}
|
|
@ -1 +1,2 @@
|
|||
// deno-lint-ignore no-unused-vars
|
||||
import { A } from "./recursive_imports/A.ts";
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
class A {
|
||||
class _A {
|
||||
b = this.a;
|
||||
constructor(public a: unknown) {}
|
||||
}
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
/** Some JSDoc */
|
||||
// eslint-disable-next-line @typescript-eslint/explicit-function-return-type
|
||||
export function foo() {
|
||||
}
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
// eslint-disable-next-line
|
||||
import * as badModule from "./bad-module.ts";
|
||||
|
||||
console.log(badModule);
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
(async (): Promise<void> => {
|
||||
// eslint-disable-next-line
|
||||
const badModule = await import("./bad-module.ts");
|
||||
const _badModule = await import("./bad-module.ts");
|
||||
})();
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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();
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
// eslint-disable-next-line
|
||||
import * as badModule from "bad-module.ts";
|
||||
|
||||
console.log(badModule);
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
(async (): Promise<void> => {
|
||||
// eslint-disable-next-line
|
||||
const badModule = await import("bad-module.ts");
|
||||
const _badModule = await import("bad-module.ts");
|
||||
})();
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
try {
|
||||
await Deno.open(Deno.args[0]);
|
||||
Deno.exit(0);
|
||||
} catch (e) {
|
||||
} catch (_e) {
|
||||
Deno.exit(1);
|
||||
}
|
||||
|
|
|
@ -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));
|
||||
|
|
|
@ -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(
|
||||
|
|
|
@ -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");
|
||||
}
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
new Promise((resolve, reject) => {
|
||||
new Promise((_resolve, reject) => {
|
||||
reject(new Error("rejection"));
|
||||
});
|
||||
|
|
|
@ -1 +1 @@
|
|||
const a: string = 1;
|
||||
const _a: string = 1;
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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));
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -6,7 +6,7 @@ function delay(ms: number): Promise<void> {
|
|||
});
|
||||
}
|
||||
|
||||
onmessage = (e: MessageEvent) => {
|
||||
onmessage = (_e: MessageEvent) => {
|
||||
postMessage("triggered worker handler");
|
||||
close();
|
||||
};
|
||||
|
|
2
cli/tsc/compiler.d.ts
vendored
2
cli/tsc/compiler.d.ts
vendored
|
@ -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<string, string>;
|
||||
|
@ -22,7 +21,6 @@ declare global {
|
|||
var performance: Performance;
|
||||
}
|
||||
|
||||
// deno-lint-ignore no-namespace
|
||||
namespace ts {
|
||||
export = _ts;
|
||||
}
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
/// <reference lib="esnext" />
|
||||
"use strict";
|
||||
|
||||
((window) => {
|
||||
((_window) => {
|
||||
const webidl = globalThis.__bootstrap.webidl;
|
||||
const { Blob, File, _byteSequence } = globalThis.__bootstrap.file;
|
||||
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -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]
|
||||
*/
|
||||
|
||||
|
|
|
@ -216,6 +216,7 @@
|
|||
});
|
||||
}
|
||||
|
||||
// deno-lint-ignore no-this-alias
|
||||
const O = this;
|
||||
/** @type {number} */
|
||||
let relativeStart;
|
||||
|
|
|
@ -344,7 +344,6 @@
|
|||
opStartGlobalTimer(timeout);
|
||||
await opWaitGlobalTimer();
|
||||
pendingEvents--;
|
||||
// eslint-disable-next-line @typescript-eslint/no-use-before-define
|
||||
prepareReadyTimers();
|
||||
}
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
@ -385,7 +385,6 @@
|
|||
|
||||
function isArrayBufferDetached(V) {
|
||||
try {
|
||||
// eslint-disable-next-line no-new
|
||||
new Uint8Array(V);
|
||||
return false;
|
||||
} catch {
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -77,6 +77,7 @@
|
|||
}
|
||||
|
||||
[Symbol.asyncIterator]() {
|
||||
// deno-lint-ignore no-this-alias
|
||||
const httpConn = this;
|
||||
return {
|
||||
async next() {
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -59,8 +59,6 @@ delete Object.prototype.__proto__;
|
|||
}
|
||||
}
|
||||
|
||||
const encoder = new TextEncoder();
|
||||
|
||||
function workerClose() {
|
||||
if (isClosing) {
|
||||
return;
|
||||
|
|
|
@ -1 +1 @@
|
|||
Subproject commit 3bd4e3652304eb97177e1fc217943529322f4680
|
||||
Subproject commit 6c449eaecb0783b06003b5eecd2893bd2617d66e
|
|
@ -21,7 +21,7 @@ export async function runWithTestUtil<T>(
|
|||
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<TestResult> {
|
||||
const bundle = await generateBundle(url);
|
||||
|
|
|
@ -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);
|
||||
});
|
||||
|
|
Loading…
Reference in a new issue