mirror of
https://github.com/nodejs/node.git
synced 2026-11-24 21:50:36 -05:00
tools,lib: remove global and Intl from the list of globals
Refs: https://github.com/nodejs/node/pull/38230 Refs: https://github.com/nodejs/node/pull/38419 PR-URL: https://github.com/nodejs/node/pull/42014 Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: Shingo Inoue <leko.noor@gmail.com> Reviewed-By: Mestery <mestery@protonmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com>
This commit is contained in:
1 parent
bcf53a89f7
commit
cfafb45c2b
2 files changed
+3
-5
No files matched your search
@@ -173,9 +173,7 @@ rules:
|
||||
- name: WeakSet
|
||||
into: Safe
|
||||
globals:
|
||||
Intl: false
|
||||
# Parameters passed to internal modules
|
||||
global: false
|
||||
require: false
|
||||
process: false
|
||||
exports: false
|
||||
|
||||
@@ -162,7 +162,7 @@ function copyPrototype(src, dest, prefix) {
|
||||
'Reflect',
|
||||
].forEach((name) => {
|
||||
// eslint-disable-next-line no-restricted-globals
|
||||
copyPropsRenamed(global[name], primordials, name);
|
||||
copyPropsRenamed(globalThis[name], primordials, name);
|
||||
});
|
||||
|
||||
// Create copies of intrinsic objects
|
||||
@@ -206,7 +206,7 @@ function copyPrototype(src, dest, prefix) {
|
||||
'WeakSet',
|
||||
].forEach((name) => {
|
||||
// eslint-disable-next-line no-restricted-globals
|
||||
const original = global[name];
|
||||
const original = globalThis[name];
|
||||
primordials[name] = original;
|
||||
copyPropsRenamed(original, primordials, name);
|
||||
copyPrototype(original.prototype, primordials, `${name}Prototype`);
|
||||
@@ -219,7 +219,7 @@ function copyPrototype(src, dest, prefix) {
|
||||
'Promise',
|
||||
].forEach((name) => {
|
||||
// eslint-disable-next-line no-restricted-globals
|
||||
const original = global[name];
|
||||
const original = globalThis[name];
|
||||
primordials[name] = original;
|
||||
copyPropsRenamedBound(original, primordials, name);
|
||||
copyPrototype(original.prototype, primordials, `${name}Prototype`);
|
||||
|
||||
Reference in new issue
Block a user