mirror of
https://github.com/nodejs/node.git
synced 2026-11-25 23:01:06 -05:00
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:
9 files changed
+20
No files matched your search
@@ -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
|
||||
|
||||
@@ -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');
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
const {
|
||||
ArrayFrom,
|
||||
ArrayIsArray,
|
||||
Boolean,
|
||||
MathFloor,
|
||||
ObjectDefineProperties,
|
||||
ObjectDefineProperty,
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
|
||||
const {
|
||||
ArrayIsArray,
|
||||
Boolean,
|
||||
ObjectAssign,
|
||||
ObjectCreate,
|
||||
ObjectKeys,
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -1,5 +1,9 @@
|
||||
'use strict';
|
||||
|
||||
const {
|
||||
Boolean,
|
||||
} = primordials;
|
||||
|
||||
const { Interface } = require('readline');
|
||||
const path = require('path');
|
||||
const fs = require('fs');
|
||||
|
||||
@@ -23,6 +23,7 @@
|
||||
|
||||
const {
|
||||
ArrayIsArray,
|
||||
Boolean,
|
||||
ObjectDefineProperty,
|
||||
ObjectSetPrototypeOf,
|
||||
} = primordials;
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
|
||||
const {
|
||||
ArrayIsArray,
|
||||
Boolean,
|
||||
ObjectDefineProperties,
|
||||
ObjectDefineProperty,
|
||||
ObjectKeys,
|
||||
|
||||
Reference in new issue
Block a user