diff options
author | Michaƫl Zasso <targos@protonmail.com> | 2019-03-31 13:30:12 +0200 |
---|---|---|
committer | ZYSzys <zyszys98@gmail.com> | 2019-04-03 21:36:08 +0800 |
commit | 0817840f775032169ddd70c85ac059f18ffcc81c (patch) | |
tree | c34b2577637895064116a86b8a1d095d2d26e1a3 /lib/internal/fs | |
parent | 8a6dcd040f35b023f0cc0208c4bc553fcc7e6a4d (diff) | |
download | android-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/fs')
-rw-r--r-- | lib/internal/fs/promises.js | 2 | ||||
-rw-r--r-- | lib/internal/fs/read_file_context.js | 2 | ||||
-rw-r--r-- | lib/internal/fs/streams.js | 2 | ||||
-rw-r--r-- | lib/internal/fs/utils.js | 2 |
4 files changed, 8 insertions, 0 deletions
diff --git a/lib/internal/fs/promises.js b/lib/internal/fs/promises.js index 93c8fc0f88..ae7d616503 100644 --- a/lib/internal/fs/promises.js +++ b/lib/internal/fs/promises.js @@ -1,5 +1,7 @@ 'use strict'; +const { Math } = primordials; + const { F_OK, O_SYMLINK, diff --git a/lib/internal/fs/read_file_context.js b/lib/internal/fs/read_file_context.js index 4961ee820a..a4e7a3563b 100644 --- a/lib/internal/fs/read_file_context.js +++ b/lib/internal/fs/read_file_context.js @@ -1,5 +1,7 @@ 'use strict'; +const { Math } = primordials; + const { Buffer } = require('buffer'); const { FSReqCallback, close, read } = internalBinding('fs'); diff --git a/lib/internal/fs/streams.js b/lib/internal/fs/streams.js index 24c79dffb5..3b797edc58 100644 --- a/lib/internal/fs/streams.js +++ b/lib/internal/fs/streams.js @@ -1,5 +1,7 @@ 'use strict'; +const { Math } = primordials; + const { FSReqCallback, writeBuffers diff --git a/lib/internal/fs/utils.js b/lib/internal/fs/utils.js index 99e820d294..a6157f7684 100644 --- a/lib/internal/fs/utils.js +++ b/lib/internal/fs/utils.js @@ -1,5 +1,7 @@ 'use strict'; +const { Reflect } = primordials; + const { Buffer, kMaxLength } = require('buffer'); const { codes: { |