From e16b74d792c8fcdb46ab231575fc75f29d4d7fe7 Mon Sep 17 00:00:00 2001 From: Kenta Moriuchi Date: Tue, 27 Jun 2023 15:18:22 +0900 Subject: chore(ext/node): disable prefer-primordials on a per-file basis (#19553) --- ext/node/polyfills/_util/_util_callbackify.ts | 3 +++ ext/node/polyfills/_util/asserts.ts | 3 +++ ext/node/polyfills/_util/async.ts | 3 +++ ext/node/polyfills/_util/std_asserts.ts | 3 +++ ext/node/polyfills/_util/std_fmt_colors.ts | 3 +++ ext/node/polyfills/_util/std_testing_diff.ts | 3 +++ 6 files changed, 18 insertions(+) (limited to 'ext/node/polyfills/_util') diff --git a/ext/node/polyfills/_util/_util_callbackify.ts b/ext/node/polyfills/_util/_util_callbackify.ts index 511282b0f..c60122b56 100644 --- a/ext/node/polyfills/_util/_util_callbackify.ts +++ b/ext/node/polyfills/_util/_util_callbackify.ts @@ -21,6 +21,9 @@ // OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE // USE OR OTHER DEALINGS IN THE SOFTWARE. +// TODO(petamoriken): enable prefer-primordials for node polyfills +// deno-lint-ignore-file prefer-primordials + // These are simplified versions of the "real" errors in Node. import { nextTick } from "ext:deno_node/_next_tick.ts"; diff --git a/ext/node/polyfills/_util/asserts.ts b/ext/node/polyfills/_util/asserts.ts index 7760c8639..ad85ecbf2 100644 --- a/ext/node/polyfills/_util/asserts.ts +++ b/ext/node/polyfills/_util/asserts.ts @@ -1,5 +1,8 @@ // Copyright 2018-2023 the Deno authors. All rights reserved. MIT license. +// TODO(petamoriken): enable prefer-primordials for node polyfills +// deno-lint-ignore-file prefer-primordials + /** Assertion error class for node compat layer's internal code. */ export class NodeCompatAssertionError extends Error { constructor(message: string) { diff --git a/ext/node/polyfills/_util/async.ts b/ext/node/polyfills/_util/async.ts index b508dbfed..a05b670e8 100644 --- a/ext/node/polyfills/_util/async.ts +++ b/ext/node/polyfills/_util/async.ts @@ -2,6 +2,9 @@ // This module is vendored from std/async/deferred.ts and std/async/delay.ts // (with some modifications) +// TODO(petamoriken): enable prefer-primordials for node polyfills +// deno-lint-ignore-file prefer-primordials + export interface Deferred extends Promise { readonly state: "pending" | "fulfilled" | "rejected"; resolve(value?: T | PromiseLike): void; diff --git a/ext/node/polyfills/_util/std_asserts.ts b/ext/node/polyfills/_util/std_asserts.ts index b122cf65e..98eec94b7 100644 --- a/ext/node/polyfills/_util/std_asserts.ts +++ b/ext/node/polyfills/_util/std_asserts.ts @@ -1,6 +1,9 @@ // Copyright 2018-2023 the Deno authors. All rights reserved. MIT license. // vendored from std/testing/asserts.ts +// TODO(petamoriken): enable prefer-primordials for node polyfills +// deno-lint-ignore-file prefer-primordials + import { red } from "ext:deno_node/_util/std_fmt_colors.ts"; import { buildMessage, diff --git a/ext/node/polyfills/_util/std_fmt_colors.ts b/ext/node/polyfills/_util/std_fmt_colors.ts index d54e2c83d..5632c05c1 100644 --- a/ext/node/polyfills/_util/std_fmt_colors.ts +++ b/ext/node/polyfills/_util/std_fmt_colors.ts @@ -1,6 +1,9 @@ // Copyright 2018-2023 the Deno authors. All rights reserved. MIT license. // This file is vendored from std/fmt/colors.ts +// TODO(petamoriken): enable prefer-primordials for node polyfills +// deno-lint-ignore-file prefer-primordials + // TODO(kt3k): Initialize this at the start of runtime // based on Deno.noColor const noColor = false; diff --git a/ext/node/polyfills/_util/std_testing_diff.ts b/ext/node/polyfills/_util/std_testing_diff.ts index 74fe56596..bcd619255 100644 --- a/ext/node/polyfills/_util/std_testing_diff.ts +++ b/ext/node/polyfills/_util/std_testing_diff.ts @@ -1,6 +1,9 @@ // Copyright 2018-2023 the Deno authors. All rights reserved. MIT license. // This file was vendored from std/testing/_diff.ts +// TODO(petamoriken): enable prefer-primordials for node polyfills +// deno-lint-ignore-file prefer-primordials + import { bgGreen, bgRed, -- cgit v1.2.3