| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 10ca3bb commit 0f4f2dd
3 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -91,6 +91,8 @@ rules: | |||
| 91 | 91 | message: Use `const { clearInterval } = require('timers');` instead of the global. | |
| 92 | 92 | - name: clearTimeout | |
| 93 | 93 | message: Use `const { clearTimeout } = require('timers');` instead of the global. | |
| 94 | + - name: console | ||
| 95 | + message: Use `const { console } = require('internal/console/global');` instead of the global. | ||
| 94 | 96 | - name: crypto | |
| 95 | 97 | message: Use `const { crypto } = require('internal/crypto/webcrypto');` instead of the global. | |
| 96 | 98 | - name: Crypto | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -19,7 +19,6 @@ | |||
| 19 | 19 | // https://github.com/google/caja/blob/HEAD/src/com/google/caja/ses/repairES5.js | |
| 20 | 20 | // https://github.com/tc39/proposal-ses/blob/e5271cc42a257a05dcae2fd94713ed2f46c08620/shim/src/freeze.js | |
| 21 | 21 | ||
| 22 | - /* global console */ | ||
| 23 | 22 | 'use strict'; | |
| 24 | 23 | ||
| 25 | 24 | const { | |
@@ -133,6 +132,8 @@ const { | |||
| 133 | 132 | } = globalThis; | |
| 134 | 133 | ||
| 135 | 134 | module.exports = function() { | |
| 135 | + const { Console } = require('internal/console/constructor'); | ||
| 136 | + const { console } = require('internal/console/global'); | ||
| 136 | 137 | const { | |
| 137 | 138 | clearImmediate, | |
| 138 | 139 | clearInterval, | |
@@ -216,7 +217,7 @@ module.exports = function() { | |||
| 216 | 217 | PromisePrototype, // 27.2 | |
| 217 | 218 | ||
| 218 | 219 | // Other APIs / Web Compatibility | |
| 219 | - console.Console.prototype, | ||
| 220 | + Console.prototype, | ||
| 220 | 221 | WebAssembly.Module.prototype, | |
| 221 | 222 | WebAssembly.Instance.prototype, | |
| 222 | 223 | WebAssembly.Table.prototype, | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -27,7 +27,7 @@ | |||
| 27 | 27 | ||
| 28 | 28 | 'use strict'; | |
| 29 | 29 | ||
| 30 | - /* eslint-disable node-core/prefer-primordials */ | ||
| 30 | + /* eslint-disable node-core/prefer-primordials, no-restricted-globals */ | ||
| 31 | 31 | /* global console */ | |
| 32 | 32 | ||
| 33 | 33 | module.exports = { versionCheck }; | |
@@ -73,7 +73,6 @@ function read(fileName) { | |||
| 73 | 73 | } | |
| 74 | 74 | const quit = process.exit; | |
| 75 | 75 | // Polyfill "readline()". | |
| 76 | - // eslint-disable-next-line no-restricted-globals | ||
| 77 | 76 | const logFile = globalThis.arguments[globalThis.arguments.length - 1]; | |
| 78 | 77 | try { | |
| 79 | 78 | fs.accessSync(logFile); | |
@@ -163,7 +162,6 @@ function macCppfiltNm(out) { | |||
| 163 | 162 | }); | |
| 164 | 163 | } | |
| 165 | 164 | ||
| 166 | - // eslint-disable-next-line no-restricted-globals | ||
| 167 | 165 | Object.assign(globalThis, { | |
| 168 | 166 | os, | |
| 169 | 167 | print, | |
| Back | FazBrowse Home | New Git URL |
0 commit comments