From b6c4a6fc95786791e55130d42aa809f87d282caa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C3=ABl=20Zasso?= Date: Fri, 18 Feb 2022 10:36:48 +0100 Subject: [PATCH] tools: enable es2022 env in ESLint config This adds more globals to the set known by ESLint. --- .eslintrc.js | 6 +++--- lib/.eslintrc.yaml | 1 - test/.eslintrc.yaml | 5 ----- 3 files changed, 3 insertions(+), 9 deletions(-) diff --git a/.eslintrc.js b/.eslintrc.js index 83b855bbb5b159..7b8a55328ab37f 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -35,6 +35,9 @@ Module._findPath = (request, paths, isMain) => { module.exports = { root: true, + env: { + es2022: true, + }, extends: ['eslint:recommended', 'plugin:jsdoc/recommended'], plugins: ['jsdoc', 'markdown', 'node-core'], parser: '@babel/eslint-parser', @@ -314,12 +317,9 @@ module.exports = { 'node-core/no-duplicate-requires': 'error', }, globals: { - Atomics: 'readable', - BigInt: 'readable', Crypto: 'readable', CryptoKey: 'readable', fetch: 'readable', - globalThis: 'readable', Response: 'readable', SubtleCrypto: 'readable', }, diff --git a/lib/.eslintrc.yaml b/lib/.eslintrc.yaml index e31ba7d01c292e..d5686deb759641 100644 --- a/lib/.eslintrc.yaml +++ b/lib/.eslintrc.yaml @@ -175,7 +175,6 @@ rules: - name: WeakSet into: Safe globals: - Intl: false # Parameters passed to internal modules global: false require: false diff --git a/test/.eslintrc.yaml b/test/.eslintrc.yaml index c89a19bdfeaaae..878ea7b975df11 100644 --- a/test/.eslintrc.yaml +++ b/test/.eslintrc.yaml @@ -67,8 +67,3 @@ rules: # Global scoped methods and vars globals: WebAssembly: false - BigInt: false - BigInt64Array: false - BigUint64Array: false - SharedArrayBuffer: false - globalThis: false