summaryrefslogtreecommitdiff
path: root/lib/internal/bootstrap
diff options
context:
space:
mode:
authorMichaƫl Zasso <targos@protonmail.com>2019-03-31 13:30:12 +0200
committerZYSzys <zyszys98@gmail.com>2019-04-03 21:36:08 +0800
commit0817840f775032169ddd70c85ac059f18ffcc81c (patch)
treec34b2577637895064116a86b8a1d095d2d26e1a3 /lib/internal/bootstrap
parent8a6dcd040f35b023f0cc0208c4bc553fcc7e6a4d (diff)
downloadandroid-node-v8-0817840f775032169ddd70c85ac059f18ffcc81c.tar.gz
android-node-v8-0817840f775032169ddd70c85ac059f18ffcc81c.tar.bz2
android-node-v8-0817840f775032169ddd70c85ac059f18ffcc81c.zip
lib: force using primordials for JSON, Math and Reflect
Use the "no-restricted-globals" ESLint rule to lint for it. PR-URL: https://github.com/nodejs/node/pull/27027 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Gus Caplan <me@gus.host> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Diffstat (limited to 'lib/internal/bootstrap')
-rw-r--r--lib/internal/bootstrap/node.js3
-rw-r--r--lib/internal/bootstrap/primordials.js2
2 files changed, 2 insertions, 3 deletions
diff --git a/lib/internal/bootstrap/node.js b/lib/internal/bootstrap/node.js
index abd88afce0..a94dcfc4d1 100644
--- a/lib/internal/bootstrap/node.js
+++ b/lib/internal/bootstrap/node.js
@@ -34,9 +34,8 @@
// This file is compiled as if it's wrapped in a function with arguments
// passed by node::RunBootstrapping()
/* global process, require, internalBinding, isMainThread, ownsProcessState */
-/* global primordials */
-const { Object, Symbol } = primordials;
+const { JSON, Object, Symbol } = primordials;
const config = internalBinding('config');
const { deprecate } = require('internal/util');
diff --git a/lib/internal/bootstrap/primordials.js b/lib/internal/bootstrap/primordials.js
index df399dc173..e1fef7f886 100644
--- a/lib/internal/bootstrap/primordials.js
+++ b/lib/internal/bootstrap/primordials.js
@@ -1,6 +1,6 @@
'use strict';
-/* global primordials */
+/* eslint-disable no-restricted-globals */
// This file subclasses and stores the JS builtins that come from the VM
// so that Node.js's builtin modules do not need to later look these up from