diff --git a/eslint.config.mjs b/eslint.config.mjs index 6dd026b88ff2..4e7a1fcd914e 100644 --- a/eslint.config.mjs +++ b/eslint.config.mjs @@ -122,35 +122,38 @@ 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', + WebSocket: 'readonly', WritableStream: 'readonly', - WritableStreamDefaultWriter: 'readonly', WritableStreamDefaultController: 'readonly', - WebSocket: 'readonly', + WritableStreamDefaultWriter: 'readonly', }, }, }, diff --git a/lib/eslint.config_partial.mjs b/lib/eslint.config_partial.mjs index e5c857936511..e6cac7391815 100644 --- a/lib/eslint.config_partial.mjs +++ b/lib/eslint.config_partial.mjs @@ -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: 'WritableStream', message: "Use `const { WritableStream } = require('internal/webstreams/writablestream')` instead of the global.", @@ -360,6 +372,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.", @@ -368,6 +384,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.",