tools: fix the list of globals in ESLint config files

Signed-off-by: Antoine du Hamel <duhamelantoine1995@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/65281
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
This commit is contained in:
Antoine du Hamel committed 2026-09-15 10:49:08 +02:00
1 parent a623ee29d9
commit 19779f121f
2 files changed
+31 -8

No files matched your search

+11 -8
View File
@@ -122,36 +122,39 @@ export default [
ByteLengthQueuingStrategy: 'readonly',
CompressionStream: 'readonly',
CountQueuingStrategy: 'readonly',
CustomEvent: 'readonly',
crypto: 'readonly',
Crypto: 'readonly',
CryptoKey: 'readonly',
CustomEvent: 'readonly',
DecompressionStream: 'readonly',
DisposableStack: 'readonly',
EventSource: 'readonly',
fetch: 'readonly',
Float16Array: 'readonly',
FormData: 'readonly',
localStorage: 'readonly',
navigator: 'readonly',
QuotaExceededError: 'readonly',
ReadableByteStreamController: 'readonly',
ReadableStream: 'readonly',
ReadableStreamDefaultReader: 'readonly',
ReadableStreamBYOBReader: 'readonly',
ReadableStreamBYOBRequest: 'readonly',
ReadableByteStreamController: 'readonly',
ReadableStreamDefaultController: 'readonly',
ReadableStreamDefaultReader: 'readonly',
Response: 'readonly',
sessionStorage: 'readonly',
ShadowRealm: 'readonly',
Storage: 'readonly',
SubtleCrypto: 'readonly',
TextDecoderStream: 'readonly',
TextEncoderStream: 'readonly',
TransformStream: 'readonly',
TransformStreamDefaultController: 'readonly',
ShadowRealm: 'readonly',
SubtleCrypto: 'readonly',
WritableStream: 'readonly',
WritableStreamDefaultWriter: 'readonly',
WritableStreamDefaultController: 'readonly',
WebSocket: 'readonly',
Worker: 'readonly',
WritableStream: 'readonly',
WritableStreamDefaultController: 'readonly',
WritableStreamDefaultWriter: 'readonly',
},
},
},
+20
View File
@@ -252,6 +252,10 @@ export default [
name: 'SharedArrayBuffer',
message: "Use `const { constructSharedArrayBuffer } = require('internal/util');` instead of the global.",
},
{
name: 'Storage',
message: "Use `const { Storage } = require('internal/webstorage');` instead of the global.",
},
// Temporal is not available in primordials because it can be
// disabled with --no-harmony-temporal CLI flag.
{
@@ -286,6 +290,10 @@ export default [
name: 'URL',
message: "Use `const { URL } = require('internal/url');` instead of the global.",
},
{
name: 'URLPattern',
message: "Use `const { URLPattern } = require('internal/url');` instead of the global.",
},
{
name: 'URLSearchParams',
message: "Use `const { URLSearchParams } = require('internal/url');` instead of the global.",
@@ -296,6 +304,10 @@ export default [
name: 'WebAssembly',
message: 'Use `const { WebAssembly } = globalThis;` instead of the global.',
},
{
name: 'WebSocket',
message: 'Use `const { WebSocket } = require("internal/deps/undici/src/lib/web/websocket/websocket.js");` instead of the global.',
},
{
name: 'Worker',
message: "Use `const { Worker } = require('internal/webworker');` instead of the global.",
@@ -364,6 +376,10 @@ export default [
name: 'globalThis',
message: 'Use `const { globalThis } = primordials;` instead of the global.',
},
{
name: 'localStorage',
message: "Use `const { localStorage } = require('internal/webstorage');` instead of the global.",
},
{
name: 'performance',
message: "Use `const { performance } = require('perf_hooks');` instead of the global.",
@@ -372,6 +388,10 @@ export default [
name: 'queueMicrotask',
message: "Use `const { queueMicrotask } = require('internal/process/task_queues');` instead of the global.",
},
{
name: 'sessionStorage',
message: "Use `const { sessionStorage } = require('internal/webstorage');` instead of the global.",
},
{
name: 'setImmediate',
message: "Use `const { setImmediate } = require('timers');` instead of the global.",