diff options
author | Joyee Cheung <joyeec9h3@gmail.com> | 2019-04-04 11:36:41 +0800 |
---|---|---|
committer | Joyee Cheung <joyeec9h3@gmail.com> | 2019-04-06 12:04:36 +0800 |
commit | de230555369087282213d337ecc1c315fbb74230 (patch) | |
tree | 19e10179deff9ba47dac546af566e09a4a3f9a66 /lib/util.js | |
parent | 864860e9f3d4eed0b0b81af55197d7e525ea6306 (diff) | |
download | android-node-v8-de230555369087282213d337ecc1c315fbb74230.tar.gz android-node-v8-de230555369087282213d337ecc1c315fbb74230.tar.bz2 android-node-v8-de230555369087282213d337ecc1c315fbb74230.zip |
lib: remove `env: node` in eslint config for lib files
This patch removes the redundant `require-globals` custom
eslint rule by removing `env: node` in the eslint config
and whitelist the globals that can be accessed in native
modules instead of black listing them. This makes sense
for our `lib/` files because here we are creating the
Node.js environment instead of running in a normal user
land Node.js environment.
PR-URL: https://github.com/nodejs/node/pull/27082
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Diffstat (limited to 'lib/util.js')
-rw-r--r-- | lib/util.js | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/util.js b/lib/util.js index a508c3cead..f6b3082760 100644 --- a/lib/util.js +++ b/lib/util.js @@ -113,8 +113,8 @@ function timestamp() { } // Log is just a thin wrapper to console.log that prepends a timestamp -function log() { - console.log('%s - %s', timestamp(), exports.format.apply(exports, arguments)); +function log(...args) { + console.log('%s - %s', timestamp(), format(...args)); } /** @@ -218,7 +218,7 @@ function getSystemErrorName(err) { } // Keep the `exports =` so that various functions can still be monkeypatched -module.exports = exports = { +module.exports = { _errnoException: errnoException, _exceptionWithHostPort: exceptionWithHostPort, _extend, |