File tree Expand file tree Collapse file tree 3 files changed +6
-5
lines changed Expand file tree Collapse file tree 3 files changed +6
-5
lines changed Original file line number Diff line number Diff line change 8989 message : Use `const { clearInterval } = require('timers');` instead of the global.
9090 - name : clearTimeout
9191 message : Use `const { clearTimeout } = require('timers');` instead of the global.
92+ - name : console
93+ message : Use `const { console } = require('internal/console/global');` instead of the global.
9294 - name : crypto
9395 message : Use `const { crypto } = require('internal/crypto/webcrypto');` instead of the global.
9496 - name : Crypto
Original file line number Diff line number Diff line change 1919// https://github.com/google/caja/blob/HEAD/src/com/google/caja/ses/repairES5.js
2020// https://github.com/tc39/proposal-ses/blob/e5271cc42a257a05dcae2fd94713ed2f46c08620/shim/src/freeze.js
2121
22- /* global console */
2322'use strict' ;
2423
2524const {
@@ -133,6 +132,8 @@ const {
133132} = globalThis ;
134133
135134module . exports = function ( ) {
135+ const { Console } = require ( 'internal/console/constructor' ) ;
136+ const { console } = require ( 'internal/console/global' ) ;
136137 const {
137138 clearImmediate,
138139 clearInterval,
@@ -216,7 +217,7 @@ module.exports = function() {
216217 PromisePrototype , // 27.2
217218
218219 // Other APIs / Web Compatibility
219- console . Console . prototype ,
220+ Console . prototype ,
220221 WebAssembly . Module . prototype ,
221222 WebAssembly . Instance . prototype ,
222223 WebAssembly . Table . prototype ,
Original file line number Diff line number Diff line change 2727
2828'use strict' ;
2929
30- /* eslint-disable node-core/prefer-primordials */
30+ /* eslint-disable node-core/prefer-primordials, no-restricted-globals */
3131/* global console */
3232
3333module . exports = { versionCheck } ;
@@ -73,7 +73,6 @@ function read(fileName) {
7373}
7474const quit = process . exit ;
7575// Polyfill "readline()".
76- // eslint-disable-next-line no-restricted-globals
7776const logFile = globalThis . arguments [ globalThis . arguments . length - 1 ] ;
7877try {
7978 fs . accessSync ( logFile ) ;
@@ -163,7 +162,6 @@ function macCppfiltNm(out) {
163162 } ) ;
164163}
165164
166- // eslint-disable-next-line no-restricted-globals
167165Object . assign ( globalThis , {
168166 os,
169167 print,
You can’t perform that action at this time.
0 commit comments