diff --git a/lib/.eslintrc.yaml b/lib/.eslintrc.yaml index 1b75d7e742e66d..d50f6f2f367146 100644 --- a/lib/.eslintrc.yaml +++ b/lib/.eslintrc.yaml @@ -11,6 +11,8 @@ rules: - error - name: Array message: "Use `const { Array } = primordials;` instead of the global." + - name: Boolean + message: "Use `const { Boolean } = primordials;` instead of the global." - name: JSON message: "Use `const { JSON } = primordials;` instead of the global." - name: Math diff --git a/lib/_http_client.js b/lib/_http_client.js index ceff4262569702..fb221cec5a4cbc 100644 --- a/lib/_http_client.js +++ b/lib/_http_client.js @@ -23,6 +23,7 @@ const { ArrayIsArray, + Boolean, ObjectAssign, ObjectKeys, ObjectSetPrototypeOf, diff --git a/lib/internal/cluster/round_robin_handle.js b/lib/internal/cluster/round_robin_handle.js index 5a12a61d4941ce..730a3eddd54b65 100644 --- a/lib/internal/cluster/round_robin_handle.js +++ b/lib/internal/cluster/round_robin_handle.js @@ -1,4 +1,9 @@ 'use strict'; + +const { + Boolean, +} = primordials; + const assert = require('internal/assert'); const net = require('net'); const { sendHelper } = require('internal/cluster/utils'); diff --git a/lib/internal/console/constructor.js b/lib/internal/console/constructor.js index ba9ef1a864d7eb..e929737aafa2c9 100644 --- a/lib/internal/console/constructor.js +++ b/lib/internal/console/constructor.js @@ -6,6 +6,7 @@ const { ArrayFrom, ArrayIsArray, + Boolean, ObjectDefineProperties, ObjectDefineProperty, ObjectKeys, diff --git a/lib/internal/http2/compat.js b/lib/internal/http2/compat.js index b8d7dadb94fa92..6a55b4edd19311 100644 --- a/lib/internal/http2/compat.js +++ b/lib/internal/http2/compat.js @@ -2,6 +2,7 @@ const { ArrayIsArray, + Boolean, ObjectAssign, ObjectCreate, ObjectKeys, diff --git a/lib/internal/readline/utils.js b/lib/internal/readline/utils.js index b6957f6e8a1a61..27110f82797c41 100644 --- a/lib/internal/readline/utils.js +++ b/lib/internal/readline/utils.js @@ -1,5 +1,9 @@ 'use strict'; +const { + Boolean, +} = primordials; + // Regex used for ansi escape code splitting // Adopted from https://github.com/chalk/ansi-regex/blob/master/index.js // License: MIT, authors: @sindresorhus, Qix-, and arjunmehta diff --git a/lib/internal/repl/history.js b/lib/internal/repl/history.js index 9eb32960d35dd5..845d3fdebd96db 100644 --- a/lib/internal/repl/history.js +++ b/lib/internal/repl/history.js @@ -1,5 +1,9 @@ 'use strict'; +const { + Boolean, +} = primordials; + const { Interface } = require('readline'); const path = require('path'); const fs = require('fs'); diff --git a/lib/net.js b/lib/net.js index 8fb5d2cd138ebb..3370ecf117046f 100644 --- a/lib/net.js +++ b/lib/net.js @@ -23,6 +23,7 @@ const { ArrayIsArray, + Boolean, ObjectDefineProperty, ObjectSetPrototypeOf, } = primordials; diff --git a/lib/perf_hooks.js b/lib/perf_hooks.js index 78b8ac5bca7fe1..cf0015a0224080 100644 --- a/lib/perf_hooks.js +++ b/lib/perf_hooks.js @@ -2,6 +2,7 @@ const { ArrayIsArray, + Boolean, ObjectDefineProperties, ObjectDefineProperty, ObjectKeys,