From b26dcbc69d56b6ac5780520dad47f10460127d3e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bartek=20Iwa=C5=84czuk?= Date: Sun, 17 Jan 2021 00:32:59 +0100 Subject: [PATCH] chore: Enforce ban-untagged-todo lint rule (#9135) --- .dlint.json | 9 +++++++++ cli/bench/deno_tcp.ts | 2 +- cli/tests/unit/buffer_test.ts | 4 ++-- cli/tests/unit/chown_test.ts | 4 ++-- cli/tests/unit/files_test.ts | 8 ++++---- op_crates/fetch/20_headers.js | 2 +- op_crates/fetch/26_fetch.js | 4 ++-- op_crates/web/01_event.js | 2 +- op_crates/web/21_filereader.js | 2 +- runtime/js/40_testing.js | 4 ++-- runtime/js/99_main.js | 2 +- std/encoding/_yaml/loader/loader.ts | 2 +- std/encoding/toml.ts | 2 +- std/fmt/printf.ts | 5 +++-- std/fmt/printf_test.ts | 24 +++++++++++++++--------- std/fs/copy_test.ts | 2 +- std/fs/expand_glob.ts | 1 - std/http/_io.ts | 2 +- std/http/cookie.ts | 2 +- std/http/file_server.ts | 6 +++--- std/http/file_server_test.ts | 2 +- std/io/bufio_test.ts | 2 +- std/mime/multipart_test.ts | 2 +- std/node/_fs/_fs_access.ts | 6 +++--- std/node/_fs/_fs_appendFile.ts | 4 ++-- std/node/global_test.ts | 2 +- std/node/module.ts | 6 +++--- std/node/timers.ts | 2 +- std/node/url.ts | 2 +- std/wasi/snapshot_preview1.ts | 14 ++++++++------ tools/lint.js | 4 +++- 31 files changed, 77 insertions(+), 58 deletions(-) create mode 100644 .dlint.json diff --git a/.dlint.json b/.dlint.json new file mode 100644 index 0000000000..afd6758d5c --- /dev/null +++ b/.dlint.json @@ -0,0 +1,9 @@ +{ + "rules": { + "tags": ["recommended"], + "include": [ + "ban-untagged-todo" + ], + "exclude": [] + } +} diff --git a/cli/bench/deno_tcp.ts b/cli/bench/deno_tcp.ts index a800a52a0c..e6ee4e239b 100644 --- a/cli/bench/deno_tcp.ts +++ b/cli/bench/deno_tcp.ts @@ -1,6 +1,6 @@ // Copyright 2018-2021 the Deno authors. All rights reserved. MIT license. // Used for benchmarking Deno's networking. -// TODO Replace this with a real HTTP server once +// TODO(bartlomieju): Replace this with a real HTTP server once // https://github.com/denoland/deno/issues/726 is completed. // Note: this is a keep-alive server. const addr = Deno.args[0] || "127.0.0.1:4500"; diff --git a/cli/tests/unit/buffer_test.ts b/cli/tests/unit/buffer_test.ts index 54ab139c97..ed3698bc17 100644 --- a/cli/tests/unit/buffer_test.ts +++ b/cli/tests/unit/buffer_test.ts @@ -128,8 +128,8 @@ unitTest(async function bufferBasicOperations(): Promise { await empty(buf, testString.slice(0, 20), new Uint8Array(5)); await empty(buf, "", new Uint8Array(100)); - // TODO buf.writeByte() - // TODO buf.readByte() + // TODO(bartlomieju): buf.writeByte() + // TODO(bartlomieju): buf.readByte() } }); diff --git a/cli/tests/unit/chown_test.ts b/cli/tests/unit/chown_test.ts index 8181225e39..2fac679ce5 100644 --- a/cli/tests/unit/chown_test.ts +++ b/cli/tests/unit/chown_test.ts @@ -96,7 +96,7 @@ unitTest( unitTest( { perms: { run: true, write: true }, ignore: Deno.build.os == "windows" }, async function chownSyncSucceed(): Promise { - // TODO: when a file's owner is actually being changed, + // TODO(bartlomieju): when a file's owner is actually being changed, // chown only succeeds if run under priviledged user (root) // The test script has no such privilege, so need to find a better way to test this case const { uid, gid } = await getUidAndGid(); @@ -152,7 +152,7 @@ unitTest( unitTest( { perms: { run: true, write: true }, ignore: Deno.build.os == "windows" }, async function chownWithUrl(): Promise { - // TODO: same as chownSyncSucceed + // TODO(bartlomieju): same as chownSyncSucceed const { uid, gid } = await getUidAndGid(); const enc = new TextEncoder(); diff --git a/cli/tests/unit/files_test.ts b/cli/tests/unit/files_test.ts index 1b6a99e8e9..152068004e 100644 --- a/cli/tests/unit/files_test.ts +++ b/cli/tests/unit/files_test.ts @@ -322,7 +322,7 @@ unitTest( // deno-lint-ignore no-explicit-any await file.write(null as any); }, - ); // TODO: Check error kind when dispatch_minimal pipes errors properly + ); // TODO(bartlomieju): Check error kind when dispatch_minimal pipes errors properly file.close(); await Deno.remove(tempDir, { recursive: true }); }, @@ -349,7 +349,7 @@ unitTest( // deno-lint-ignore no-explicit-any await file.read(null as any); }, TypeError); - // TODO: Check error kind when dispatch_minimal pipes errors properly + // TODO(bartlomieju): Check error kind when dispatch_minimal pipes errors properly file.close(); await Deno.remove(tempDir, { recursive: true }); @@ -382,7 +382,7 @@ unitTest( assert(fileInfo.size === 5); f.close(); - // TODO: test different modes + // TODO(bartlomieju): test different modes await Deno.remove(tempDir, { recursive: true }); }, ); @@ -425,7 +425,7 @@ unitTest( assert(fileInfo.size === 5); f.close(); - // TODO: test different modes + // TODO(bartlomieju): test different modes await Deno.remove(tempDir, { recursive: true }); }, ); diff --git a/op_crates/fetch/20_headers.js b/op_crates/fetch/20_headers.js index 7ee19945ed..27626018a3 100644 --- a/op_crates/fetch/20_headers.js +++ b/op_crates/fetch/20_headers.js @@ -16,7 +16,7 @@ const headersData = Symbol("headers data"); - // TODO: headerGuard? Investigate if it is needed + // TODO(bartlomieju): headerGuard? Investigate if it is needed // node-fetch did not implement this but it is in the spec function normalizeParams(name, value) { name = String(name).toLowerCase(); diff --git a/op_crates/fetch/26_fetch.js b/op_crates/fetch/26_fetch.js index f5147d6b99..c8a470033a 100644 --- a/op_crates/fetch/26_fetch.js +++ b/op_crates/fetch/26_fetch.js @@ -283,7 +283,7 @@ } function getStream(blobBytes) { - // TODO: Align to spec https://fetch.spec.whatwg.org/#concept-construct-readablestream + // TODO(bartlomieju): Align to spec https://fetch.spec.whatwg.org/#concept-construct-readablestream return new ReadableStream({ type: "bytes", start: (controller) => { @@ -1240,7 +1240,7 @@ let body; let clientRid = null; let redirected = false; - let remRedirectCount = 20; // TODO: use a better way to handle + let remRedirectCount = 20; // TODO(bartlomieju): use a better way to handle if (typeof input === "string" || input instanceof URL) { url = typeof input === "string" ? input : input.href; diff --git a/op_crates/web/01_event.js b/op_crates/web/01_event.js index f4932179e9..578f771f6c 100644 --- a/op_crates/web/01_event.js +++ b/op_crates/web/01_event.js @@ -668,7 +668,7 @@ setRelatedTarget(eventImpl, null); } - // TODO: invoke activation targets if HTML nodes will be implemented + // TODO(bartlomieju): invoke activation targets if HTML nodes will be implemented // if (activationTarget !== null) { // if (!eventImpl.defaultPrevented) { // activationTarget._activationBehavior(); diff --git a/op_crates/web/21_filereader.js b/op_crates/web/21_filereader.js index c82c528649..eee96e9d89 100644 --- a/op_crates/web/21_filereader.js +++ b/op_crates/web/21_filereader.js @@ -61,7 +61,7 @@ if (!chunk.done && chunk.value instanceof Uint8Array) { chunks.push(chunk.value); - // TODO: (only) If roughly 50ms have passed since last progress + // TODO(bartlomieju): (only) If roughly 50ms have passed since last progress { const size = chunks.reduce((p, i) => p + i.byteLength, 0); const ev = new ProgressEvent("progress", { diff --git a/runtime/js/40_testing.js b/runtime/js/40_testing.js index ce11150f40..f4f55e9a1d 100644 --- a/runtime/js/40_testing.js +++ b/runtime/js/40_testing.js @@ -199,8 +199,8 @@ finishing test case.`; exposeForTest("reportToConsole", reportToConsole); - // TODO: already implements AsyncGenerator, but add as "implements to class" - // TODO: implements PromiseLike + // TODO(bartlomieju): already implements AsyncGenerator, but add as "implements to class" + // TODO(bartlomieju): implements PromiseLike class TestRunner { #usedOnly = false; diff --git a/runtime/js/99_main.js b/runtime/js/99_main.js index 440ea2a8a6..b55074355e 100644 --- a/runtime/js/99_main.js +++ b/runtime/js/99_main.js @@ -278,7 +278,7 @@ delete Object.prototype.__proto__; self: util.readOnly(globalThis), onmessage: util.writable(onmessage), onerror: util.writable(onerror), - // TODO: should be readonly? + // TODO(bartlomieju): should be readonly? close: util.nonEnumerable(workerClose), postMessage: util.writable(postMessage), workerMessageRecvCallback: util.nonEnumerable(workerMessageRecvCallback), diff --git a/std/encoding/_yaml/loader/loader.ts b/std/encoding/_yaml/loader/loader.ts index 8bd623347a..322f5ce0d3 100644 --- a/std/encoding/_yaml/loader/loader.ts +++ b/std/encoding/_yaml/loader/loader.ts @@ -667,7 +667,7 @@ function readDoubleQuotedScalar( if (isEOL(ch)) { skipSeparationSpace(state, false, nodeIndent); - // TODO: rework to inline fn with no type cast? + // TODO(bartlomieju): rework to inline fn with no type cast? } else if (ch < 256 && simpleEscapeCheck[ch]) { state.result += simpleEscapeMap[ch]; state.position++; diff --git a/std/encoding/toml.ts b/std/encoding/toml.ts index 0bd0ee9843..6cd8faa71a 100644 --- a/std/encoding/toml.ts +++ b/std/encoding/toml.ts @@ -464,7 +464,7 @@ class Parser { for (let i = 0; i < this.tomlLines.length; i++) { const line = this.tomlLines[i]; - // TODO (zekth) Handle unflat of array of tables + // TODO(zekth): Handle unflat of array of tables if (this._isGroup(line)) { // if the current group is an array we push the // parsed objects in it. diff --git a/std/fmt/printf.ts b/std/fmt/printf.ts index 4f8a83933b..6a821f2089 100644 --- a/std/fmt/printf.ts +++ b/std/fmt/printf.ts @@ -151,7 +151,8 @@ class Printf { } } // switch c break; - case State.POSITIONAL: // either a verb or * only verb for now, TODO + case State.POSITIONAL: + // TODO(bartlomieju): either a verb or * only verb for now if (c === "*") { const worp = this.flags.precision === -1 ? WorP.WIDTH @@ -689,7 +690,7 @@ class Printf { if (i !== 0 && this.flags.space) { hex += sharp ? " 0x" : " "; } - // TODO: for now only taking into account the + // TODO(bartlomieju): for now only taking into account the // lower half of the codePoint, ie. as if a string // is a list of 8bit values instead of UCS2 runes const c = (val.charCodeAt(i) & 0xff).toString(16); diff --git a/std/fmt/printf_test.ts b/std/fmt/printf_test.ts index 6b6e25a372..f240858481 100644 --- a/std/fmt/printf_test.ts +++ b/std/fmt/printf_test.ts @@ -266,17 +266,18 @@ const tests: Array<[string, any, string]> = [ ["%3c", "⌘".charCodeAt(0), " ⌘"], ["%-3c", "⌘".charCodeAt(0), "⌘ "], // Runes that are not printable. - // {"%c", '\U00000e00', "\u0e00"}, // TODO check if \U escape exists in js + // {"%c", '\U00000e00', "\u0e00"}, + // TODO(bartlomieju) check if \U escape exists in js //["%c", '\U0010ffff'.codePointAt(0), "\U0010ffff"], // Runes that are not valid. ["%c", -1, "�"], - // TODO surrogate half, doesn't make sense in itself, how + // TODO(bartomieju): surrogate half, doesn't make sense in itself, how // to determine in JS? // ["%c", 0xDC80, "�"], ["%c", 0x110000, "�"], ["%c", 0xfffffffff, "�"], - // TODO + // TODO(bartlomieju): // escaped characters // Runes that are not printable. // Runes that are not valid. @@ -291,7 +292,8 @@ const tests: Array<[string, any, string]> = [ ["%.0s", "日本語日本語", ""], ["%.5s", "日本語日本語", "日本語日本"], ["%.10s", "日本語日本語", "日本語日本語"], - // ["%08q", "abc", `000"abc"`], // TODO verb q + // ["%08q", "abc", `000"abc"`], + // TODO(bartlomieju): verb q // ["%-8q", "abc", `"abc" `], //["%.5q", "abcdefghijklmnopqrstuvwxyz", `"abcde"`], ["%.5x", "abcdefghijklmnopqrstuvwxyz", "6162636465"], @@ -301,7 +303,8 @@ const tests: Array<[string, any, string]> = [ // our %x takes lower byte of string "%.1x", "日本語", "e6"],, ["%.1x", "日本語", "e5"], //["%10.1q", "日本語日本語", ` "日"`], - // ["%10v", null, " "], // TODO null, undefined ... + // ["%10v", null, " "], + // TODO(bartlomieju): null, undefined ... // ["%-10v", null, " "], // integers @@ -353,8 +356,10 @@ const tests: Array<[string, any, string]> = [ ["%-#20.8x", 0x1234abc, "0x01234abc "], ["%-#20.8X", 0x1234abc, "0X01234ABC "], ["%-#20.8o", parseInt("01234", 8), "00001234 "], - // Test correct f.intbuf overflow checks. // TODO, lazy - // unicode format // TODO, decide whether unicode verb makes sense %U + // Test correct f.intbuf overflow checks. + // TODO(bartlomieju): lazy + // unicode format + // TODO(bartlomieju): decide whether unicode verb makes sense %U // floats ["%+.3e", 0.0, "+0.000e+00"], @@ -490,10 +495,11 @@ const tests: Array<[string, any, string]> = [ ["%g", 1.23456789e-3, "0.00123457"], // see above prec6 = precdef6 - (-3+1) //["%g", 1.23456789e20, "1.23456789e+20"], ["%g", 1.23456789e20, "1.23457e+20"], - // arrays // TODO + // arrays + // TODO(bartlomieju): // slice : go specific - // TODO decide how to handle deeper types, arrays, objects + // TODO(bartlomieju): decide how to handle deeper types, arrays, objects // byte arrays and slices with %b,%c,%d,%o,%U and %v // f.space should and f.plus should not have an effect with %v. // f.space and f.plus should have an effect with %d. diff --git a/std/fs/copy_test.ts b/std/fs/copy_test.ts index 32933b8e09..40d7cb19a7 100644 --- a/std/fs/copy_test.ts +++ b/std/fs/copy_test.ts @@ -327,7 +327,7 @@ testCopySync( assert(destStatInfo.atime instanceof Date); assert(destStatInfo.mtime instanceof Date); - // TODO: Activate test when https://github.com/denoland/deno/issues/2411 + // TODO(bartlomieju): Activate test when https://github.com/denoland/deno/issues/2411 // is fixed // assertEquals(destStatInfo.atime, srcStatInfo.atime); // assertEquals(destStatInfo.mtime, srcStatInfo.mtime); diff --git a/std/fs/expand_glob.ts b/std/fs/expand_glob.ts index 3582065581..ec0f560d82 100644 --- a/std/fs/expand_glob.ts +++ b/std/fs/expand_glob.ts @@ -32,7 +32,6 @@ interface SplitPath { winRoot?: string; } -// TODO: Maybe make this public somewhere. function split(path: string): SplitPath { const s = SEP_PATTERN.source; const segments = path diff --git a/std/http/_io.ts b/std/http/_io.ts index 5bdf930e6c..529f59cb52 100644 --- a/std/http/_io.ts +++ b/std/http/_io.ts @@ -65,7 +65,7 @@ export function chunkedBodyReader(h: Headers, r: BufReader): Deno.Reader { } const line = await tp.readLine(); if (line === null) throw new Deno.errors.UnexpectedEof(); - // TODO: handle chunk extension + // TODO(bartlomieju): handle chunk extension const [chunkSizeString] = line.split(";"); const chunkSize = parseInt(chunkSizeString, 16); if (Number.isNaN(chunkSize) || chunkSize < 0) { diff --git a/std/http/cookie.ts b/std/http/cookie.ts index c48a94d959..486afd6c64 100644 --- a/std/http/cookie.ts +++ b/std/http/cookie.ts @@ -178,7 +178,7 @@ export function setCookie(res: { headers?: Headers }, cookie: Cookie): void { if (!res.headers) { res.headers = new Headers(); } - // TODO (zekth) : Add proper parsing of Set-Cookie headers + // TODO(zekth) : Add proper parsing of Set-Cookie headers // Parsing cookie headers to make consistent set-cookie header // ref: https://tools.ietf.org/html/rfc6265#section-4.1.1 const v = toString(cookie); diff --git a/std/http/file_server.ts b/std/http/file_server.ts index 5b8811c08d..8fd2e74842 100644 --- a/std/http/file_server.ts +++ b/std/http/file_server.ts @@ -2,8 +2,8 @@ // Copyright 2018-2021 the Deno authors. All rights reserved. MIT license. // This program serves files in the current directory over HTTP. -// TODO Stream responses instead of reading them into memory. -// TODO Add tests like these: +// TODO(bartlomieju): Stream responses instead of reading them into memory. +// TODO(bartlomieju): Add tests like these: // https://github.com/indexzero/http-server/blob/master/test/http-server-test.js import { extname, posix } from "../path/mod.ts"; @@ -141,7 +141,7 @@ export async function serveFile( }; } -// TODO: simplify this after deno.stat and deno.readDir are fixed +// TODO(bartlomieju): simplify this after deno.stat and deno.readDir are fixed async function serveDir( req: ServerRequest, dirPath: string, diff --git a/std/http/file_server_test.ts b/std/http/file_server_test.ts index beb0c830d7..638121b45a 100644 --- a/std/http/file_server_test.ts +++ b/std/http/file_server_test.ts @@ -201,7 +201,7 @@ Deno.test("serveDirectory", async function (): Promise { assert(page.includes("README.md")); // `Deno.FileInfo` is not completely compatible with Windows yet - // TODO: `mode` should work correctly in the future. + // TODO(bartlomieju): `mode` should work correctly in the future. // Correct this test case accordingly. Deno.build.os !== "windows" && assert(/(\s)*\([a-zA-Z-]{10}\)(\s)*<\/td>/.test(page)); diff --git a/std/io/bufio_test.ts b/std/io/bufio_test.ts index 8715cc3b83..d6a0856deb 100644 --- a/std/io/bufio_test.ts +++ b/std/io/bufio_test.ts @@ -55,7 +55,7 @@ const readMakers: ReadMaker[] = [ fn: (r): iotest.OneByteReader => new iotest.OneByteReader(r), }, { name: "half", fn: (r): iotest.HalfReader => new iotest.HalfReader(r) }, - // TODO { name: "data+err", r => new iotest.DataErrReader(r) }, + // TODO(bartlomieju): { name: "data+err", r => new iotest.DataErrReader(r) }, // { name: "timeout", fn: r => new iotest.TimeoutReader(r) }, ]; diff --git a/std/mime/multipart_test.ts b/std/mime/multipart_test.ts index 6d392f7c22..eee3005f1f 100644 --- a/std/mime/multipart_test.ts +++ b/std/mime/multipart_test.ts @@ -236,7 +236,7 @@ Deno.test({ assert(file.tempfile != null); assertEquals(file.size, size); assertEquals(file.type, "application/octet-stream"); - // TODO checksum of tmp & sampleFile + // TODO(bartlomieju): checksum of tmp & sampleFile } finally { await Deno.remove(multipartFile); await Deno.remove(sampleFile); diff --git a/std/node/_fs/_fs_access.ts b/std/node/_fs/_fs_access.ts index cb1903677f..3211e16400 100644 --- a/std/node/_fs/_fs_access.ts +++ b/std/node/_fs/_fs_access.ts @@ -4,7 +4,7 @@ import { notImplemented } from "../_utils.ts"; /** Revist once https://github.com/denoland/deno/issues/4017 lands */ -//TODO - 'path' can also be a Buffer. Neither of these polyfills +// TODO(bartlomieju) 'path' can also be a Buffer. Neither of these polyfills //is available yet. See https://github.com/denoland/deno/issues/3403 export function access( _path: string | URL, @@ -14,8 +14,8 @@ export function access( notImplemented("Not yet available"); } -//TODO - 'path' can also be a Buffer. Neither of these polyfills -//is available yet. See https://github.com/denoland/deno/issues/3403 +// TODO(bartlomieju) 'path' can also be a Buffer. Neither of these polyfills +// is available yet. See https://github.com/denoland/deno/issues/3403 // eslint-disable-next-line @typescript-eslint/no-unused-vars export function accessSync(path: string | URL, mode?: number): void { notImplemented("Not yet available"); diff --git a/std/node/_fs/_fs_appendFile.ts b/std/node/_fs/_fs_appendFile.ts index 5a76176325..fab72d0f73 100644 --- a/std/node/_fs/_fs_appendFile.ts +++ b/std/node/_fs/_fs_appendFile.ts @@ -45,7 +45,7 @@ export function appendFile( : undefined; if (mode) { - //TODO rework once https://github.com/denoland/deno/issues/4017 completes + // TODO(bartlomieju) rework once https://github.com/denoland/deno/issues/4017 completes notImplemented("Deno does not yet support setting mode on create"); } Deno.open(pathOrRid as string, getOpenOptions(flag)) @@ -100,7 +100,7 @@ export function appendFileSync( : undefined; if (mode) { - // TODO rework once https://github.com/denoland/deno/issues/4017 completes + // TODO(bartlomieju) rework once https://github.com/denoland/deno/issues/4017 completes notImplemented("Deno does not yet support setting mode on create"); } diff --git a/std/node/global_test.ts b/std/node/global_test.ts index 60c997daf4..2ff768f887 100644 --- a/std/node/global_test.ts +++ b/std/node/global_test.ts @@ -7,7 +7,7 @@ import timers from "./timers.ts"; // Definitions for this are quite delicate // This ensures modifications to the global namespace don't break on TypeScript -// TODO +// TODO(bartlomieju): // Deno lint marks globals defined by this module as undefined // probably gonna change in the future diff --git a/std/node/module.ts b/std/node/module.ts index a7052668ae..6716b02d95 100644 --- a/std/node/module.ts +++ b/std/node/module.ts @@ -389,7 +389,7 @@ class Module { const module = new Module(filename, parent); if (isMain) { - // TODO: set process info + // TODO(bartlomieju): set process info // process.mainModule = module; module.id = "."; } @@ -1052,7 +1052,7 @@ type RequireWrapper = ( ) => void; function wrapSafe(filename: string, content: string): RequireWrapper { - // TODO: fix this + // TODO(bartlomieju): fix this const wrapper = Module.wrap(content); // deno-lint-ignore no-explicit-any const [f, err] = (Deno as any).core.evalContext(wrapper, filename); @@ -1135,7 +1135,7 @@ function makeRequireFunction(mod: Module): RequireFunction { } resolve.paths = paths; - // TODO: set main + // TODO(bartlomieju): set main // require.main = process.mainModule; // Enable support to add extra extension types. diff --git a/std/node/timers.ts b/std/node/timers.ts index acc2610f72..44c150aaf0 100644 --- a/std/node/timers.ts +++ b/std/node/timers.ts @@ -1,5 +1,5 @@ // Copyright 2018-2021 the Deno authors. All rights reserved. MIT license. -// TODO: implement the 'NodeJS.Timeout' and 'NodeJS.Immediate' versions of the timers. +// TODO(bartlomieju): implement the 'NodeJS.Timeout' and 'NodeJS.Immediate' versions of the timers. // https://github.com/DefinitelyTyped/DefinitelyTyped/blob/1163ead296d84e7a3c80d71e7c81ecbd1a130e9a/types/node/v12/globals.d.ts#L1120-L1131 export const setTimeout = window.setTimeout; export const clearTimeout = window.clearTimeout; diff --git a/std/node/url.ts b/std/node/url.ts index a0a3e5f337..9d2fbe7578 100644 --- a/std/node/url.ts +++ b/std/node/url.ts @@ -76,7 +76,7 @@ function getPathFromURLWin(url: URL): string { pathname = pathname.replace(forwardSlashRegEx, "\\"); pathname = decodeURIComponent(pathname); if (hostname !== "") { - //TODO add support for punycode encodings + // TODO(bartlomieju): add support for punycode encodings return `\\\\${hostname}${pathname}`; } else { // Otherwise, it's a local path that requires a drive letter diff --git a/std/wasi/snapshot_preview1.ts b/std/wasi/snapshot_preview1.ts index b15557e004..9a1796e2ee 100644 --- a/std/wasi/snapshot_preview1.ts +++ b/std/wasi/snapshot_preview1.ts @@ -590,8 +590,10 @@ export default class Context { const memoryView = new DataView(this.#memory.buffer); memoryView.setUint8(offset, entry.type!); memoryView.setUint16(offset + 2, entry.flags!, true); - memoryView.setBigUint64(offset + 8, 0n, true); // TODO - memoryView.setBigUint64(offset + 16, 0n, true); // TODO + // TODO(bartlomieju) + memoryView.setBigUint64(offset + 8, 0n, true); + // TODO(bartlomieju) + memoryView.setBigUint64(offset + 16, 0n, true); return ERRNO_SUCCESS; }), @@ -1371,19 +1373,19 @@ export default class Context { } if ((fdflags & FDFLAGS_DSYNC) != 0) { - // TODO (caspervonb) review if we can emulate this. + // TODO(caspervonb): review if we can emulate this. } if ((fdflags & FDFLAGS_NONBLOCK) != 0) { - // TODO (caspervonb) review if we can emulate this. + // TODO(caspervonb): review if we can emulate this. } if ((fdflags & FDFLAGS_RSYNC) != 0) { - // TODO (caspervonb) review if we can emulate this. + // TODO(caspervonb): review if we can emulate this. } if ((fdflags & FDFLAGS_SYNC) != 0) { - // TODO (caspervonb) review if we can emulate this. + // TODO(caspervonb): review if we can emulate this. } if (!options.read && !options.write && !options.truncate) { diff --git a/tools/lint.js b/tools/lint.js index b31ad29946..0d90e8546e 100755 --- a/tools/lint.js +++ b/tools/lint.js @@ -4,10 +4,12 @@ import { buildMode, getPrebuiltToolPath, getSources, + join, ROOT_PATH, } from "./util.js"; async function dlint() { + const configFile = join(ROOT_PATH, ".dlint.json"); const execPath = getPrebuiltToolPath("dlint"); console.log("dlint"); @@ -49,7 +51,7 @@ async function dlint() { } for (const chunk of chunks) { const p = Deno.run({ - cmd: [execPath, "run", ...chunk], + cmd: [execPath, "run", "--config=" + configFile, ...chunk], }); const { success } = await p.status(); if (!success) {