Skip to content

Commit

Permalink
tools: enable es2022 env in ESLint config
Browse files Browse the repository at this point in the history
This adds more globals to the set known by ESLint.

PR-URL: nodejs#42043
Reviewed-By: Mestery <mestery@protonmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Darshan Sen <raisinten@gmail.com>
  • Loading branch information
targos authored Feb 20, 2022
1 parent 7643c52 commit 30eb678
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 8 deletions.
6 changes: 3 additions & 3 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down Expand Up @@ -314,13 +317,10 @@ module.exports = {
'node-core/no-duplicate-requires': 'error',
},
globals: {
Atomics: 'readable',
BigInt: 'readable',
Crypto: 'readable',
CryptoKey: 'readable',
fetch: 'readable',
FormData: 'readable',
globalThis: 'readable',
Response: 'readable',
SubtleCrypto: 'readable',
},
Expand Down
5 changes: 0 additions & 5 deletions test/.eslintrc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,3 @@ rules:
# Global scoped methods and vars
globals:
WebAssembly: false
BigInt: false
BigInt64Array: false
BigUint64Array: false
SharedArrayBuffer: false
globalThis: false

0 comments on commit 30eb678

Please sign in to comment.