From de230555369087282213d337ecc1c315fbb74230 Mon Sep 17 00:00:00 2001 From: Joyee Cheung Date: Thu, 4 Apr 2019 11:36:41 +0800 Subject: 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 Reviewed-By: Ruben Bridgewater --- lib/crypto.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib/crypto.js') diff --git a/lib/crypto.js b/lib/crypto.js index e80c7a8327..44d4800624 100644 --- a/lib/crypto.js +++ b/lib/crypto.js @@ -145,7 +145,7 @@ function createVerify(algorithm, options) { return new Verify(algorithm, options); } -module.exports = exports = { +module.exports = { // Methods createCipheriv, createDecipheriv, @@ -218,7 +218,7 @@ function getFipsForced() { return 1; } -Object.defineProperties(exports, { +Object.defineProperties(module.exports, { createCipher: { enumerable: false, value: deprecate(createCipher, -- cgit v1.2.3