summaryrefslogtreecommitdiff
path: root/.eslintrc.js
diff options
context:
space:
mode:
authorFilip Skokan <panva.ip@gmail.com>2022-12-16 20:55:42 +0100
committerGitHub <noreply@github.com>2022-12-16 19:55:42 +0000
commit7ad069c53c550eb6530260780b48d23a9582df24 (patch)
treeebb40d785f7bda317c69e12b886cb40837ff765a /.eslintrc.js
parent992fba4b49543e6a4570586adbd1923b15c30c6d (diff)
downloadnode-new-7ad069c53c550eb6530260780b48d23a9582df24.tar.gz
crypto: use globalThis.crypto over require('crypto').webcrypto
PR-URL: https://github.com/nodejs/node/pull/45817 Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com> Reviewed-By: James M Snell <jasnell@gmail.com>
Diffstat (limited to '.eslintrc.js')
-rw-r--r--.eslintrc.js6
1 files changed, 6 insertions, 0 deletions
diff --git a/.eslintrc.js b/.eslintrc.js
index b676485c59..c608434c9d 100644
--- a/.eslintrc.js
+++ b/.eslintrc.js
@@ -239,6 +239,12 @@ module.exports = {
selector: "CallExpression[callee.name='isNaN']",
message: 'Use Number.isNaN() instead of the global isNaN() function.',
},
+ {
+ // TODO(@panva): move this to no-restricted-properties
+ // when https://github.com/eslint/eslint/issues/16412 is fixed
+ selector: "Identifier[name='webcrypto']",
+ message: 'Use `globalThis.crypto`.',
+ },
],
'no-return-await': 'error',
'no-self-compare': 'error',