diff --git a/eslint.config.mjs b/eslint.config.mjs index 5f2e5b3b857..003f460e1f7 100644 --- a/eslint.config.mjs +++ b/eslint.config.mjs @@ -120,6 +120,7 @@ export default [ { languageOptions: { globals: { + AsyncDisposableStack: 'readonly', ByteLengthQueuingStrategy: 'readonly', CompressionStream: 'readonly', CountQueuingStrategy: 'readonly', @@ -128,6 +129,7 @@ export default [ Crypto: 'readonly', CryptoKey: 'readonly', DecompressionStream: 'readonly', + DisposableStack: 'readonly', EventSource: 'readable', fetch: 'readonly', Float16Array: 'readonly', diff --git a/lib/eslint.config_partial.mjs b/lib/eslint.config_partial.mjs index 6392d515e94..646359807a8 100644 --- a/lib/eslint.config_partial.mjs +++ b/lib/eslint.config_partial.mjs @@ -356,11 +356,22 @@ export default [ name: 'SubtleCrypto', message: "Use `const { SubtleCrypto } = require('internal/crypto/webcrypto');` instead of the global.", }, - // Float16Array is not available in primordials because it's only available with --js-float16array CLI flag. + // Float16Array is not available in primordials because it can be + // disabled with --no-js-float16array CLI flag. { name: 'Float16Array', message: 'Use `const { Float16Array } = globalThis;` instead of the global.', }, + // DisposableStack and AsyncDisposableStack are not available in primordials because they can be + // disabled with --no-js-explicit-resource-management CLI flag. + { + name: 'DisposableStack', + message: 'Use `const { DisposableStack } = globalThis;` instead of the global.', + }, + { + name: 'AsyncDisposableStack', + message: 'Use `const { AsyncDisposableStack } = globalThis;` instead of the global.', + }, ], 'no-restricted-modules': [ 'error',