lib: enforce use of Boolean from primordials

Refs: https://github.com/nodejs/node/issues/30697

PR-URL: https://github.com/nodejs/node/pull/30698
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com>
This commit is contained in:
Michaël Zasso committed 2019-12-01 10:20:10 +01:00
1 parent ae2c7d0b02
commit 892bde635e
9 files changed
+20

No files matched your search

+2
View File
@@ -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
+1
View File
@@ -23,6 +23,7 @@
const {
ArrayIsArray,
Boolean,
ObjectAssign,
ObjectKeys,
ObjectSetPrototypeOf,
@@ -1,4 +1,9 @@
'use strict';
const {
Boolean,
} = primordials;
const assert = require('internal/assert');
const net = require('net');
const { sendHelper } = require('internal/cluster/utils');
+1
View File
@@ -6,6 +6,7 @@
const {
ArrayFrom,
ArrayIsArray,
Boolean,
MathFloor,
ObjectDefineProperties,
ObjectDefineProperty,
+1
View File
@@ -2,6 +2,7 @@
const {
ArrayIsArray,
Boolean,
ObjectAssign,
ObjectCreate,
ObjectKeys,
+4
View File
@@ -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
+4
View File
@@ -1,5 +1,9 @@
'use strict';
const {
Boolean,
} = primordials;
const { Interface } = require('readline');
const path = require('path');
const fs = require('fs');
+1
View File
@@ -23,6 +23,7 @@
const {
ArrayIsArray,
Boolean,
ObjectDefineProperty,
ObjectSetPrototypeOf,
} = primordials;
+1
View File
@@ -2,6 +2,7 @@
const {
ArrayIsArray,
Boolean,
ObjectDefineProperties,
ObjectDefineProperty,
ObjectKeys,