From 4b4703ad3274b8bbab7dbb0d8dfa4886f693c6c4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C3=ABl=20Zasso?= Date: Tue, 10 Dec 2019 14:49:23 +0100 Subject: [PATCH] lib: enforce use of BigInt from primordials --- lib/.eslintrc.yaml | 2 ++ lib/internal/buffer.js | 1 + lib/internal/fs/utils.js | 1 + 3 files changed, 4 insertions(+) diff --git a/lib/.eslintrc.yaml b/lib/.eslintrc.yaml index 0a5197e882b241..81042a5c9d6f27 100644 --- a/lib/.eslintrc.yaml +++ b/lib/.eslintrc.yaml @@ -11,6 +11,8 @@ rules: - error - name: Array message: "Use `const { Array } = primordials;` instead of the global." + - name: BigInt + message: "Use `const { BigInt } = primordials;` instead of the global." - name: Boolean message: "Use `const { Boolean } = primordials;` instead of the global." - name: JSON diff --git a/lib/internal/buffer.js b/lib/internal/buffer.js index 8d55f780fadc2d..ff703f11fd648e 100644 --- a/lib/internal/buffer.js +++ b/lib/internal/buffer.js @@ -1,6 +1,7 @@ 'use strict'; const { + BigInt, MathFloor, Number, } = primordials; diff --git a/lib/internal/fs/utils.js b/lib/internal/fs/utils.js index ac258bdb112876..f75e71a914c217 100644 --- a/lib/internal/fs/utils.js +++ b/lib/internal/fs/utils.js @@ -2,6 +2,7 @@ const { ArrayIsArray, + BigInt, DateNow, Number, NumberIsFinite,