summaryrefslogtreecommitdiff
path: root/ext/node/polyfills/_util
diff options
context:
space:
mode:
authorKenta Moriuchi <moriken@kimamass.com>2023-06-27 15:18:22 +0900
committerGitHub <noreply@github.com>2023-06-27 15:18:22 +0900
commite16b74d792c8fcdb46ab231575fc75f29d4d7fe7 (patch)
treedd3e21da57213ba623e287bc804c8014e00de6e2 /ext/node/polyfills/_util
parent814edcdd570b3fbef2001f7e6434320743a8f834 (diff)
chore(ext/node): disable prefer-primordials on a per-file basis (#19553)
Diffstat (limited to 'ext/node/polyfills/_util')
-rw-r--r--ext/node/polyfills/_util/_util_callbackify.ts3
-rw-r--r--ext/node/polyfills/_util/asserts.ts3
-rw-r--r--ext/node/polyfills/_util/async.ts3
-rw-r--r--ext/node/polyfills/_util/std_asserts.ts3
-rw-r--r--ext/node/polyfills/_util/std_fmt_colors.ts3
-rw-r--r--ext/node/polyfills/_util/std_testing_diff.ts3
6 files changed, 18 insertions, 0 deletions
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<T> extends Promise<T> {
readonly state: "pending" | "fulfilled" | "rejected";
resolve(value?: T | PromiseLike<T>): 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,