Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tools,lib: remove global and Intl from the list of globals #42014

Merged
merged 1 commit into from Feb 18, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 0 additions & 2 deletions lib/.eslintrc.yaml
Expand Up @@ -167,9 +167,7 @@ rules:
- name: WeakSet
into: Safe
globals:
Intl: false
# Parameters passed to internal modules
global: false
require: false
process: false
exports: false
Expand Down
6 changes: 3 additions & 3 deletions lib/internal/per_context/primordials.js
Expand Up @@ -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
Expand Down Expand Up @@ -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`);
Expand All @@ -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`);
Expand Down