mirror of
https://github.com/zebrajr/node.git
synced 2026-01-15 12:15:26 +00:00
lib: enforce use of primordial Number
PR-URL: https://github.com/nodejs/node/pull/30700 Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
This commit is contained in:
committed by
Michaël Zasso
parent
1f9a5ae7aa
commit
2070d3f8eb
@@ -17,6 +17,8 @@ rules:
|
||||
message: "Use `const { JSON } = primordials;` instead of the global."
|
||||
- name: Math
|
||||
message: "Use `const { Math } = primordials;` instead of the global."
|
||||
- name: Number
|
||||
message: "Use `const { Number } = primordials;` instead of the global."
|
||||
- name: Object
|
||||
message: "Use `const { Object } = primordials;` instead of the global."
|
||||
- name: Reflect
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
|
||||
const {
|
||||
MathFloor,
|
||||
Number,
|
||||
} = primordials;
|
||||
|
||||
const {
|
||||
|
||||
@@ -8,6 +8,7 @@ const {
|
||||
ArrayIsArray,
|
||||
Boolean,
|
||||
MathFloor,
|
||||
Number,
|
||||
ObjectDefineProperties,
|
||||
ObjectDefineProperty,
|
||||
ObjectKeys,
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
const {
|
||||
ArrayIsArray,
|
||||
DateNow,
|
||||
Number,
|
||||
NumberIsFinite,
|
||||
ObjectSetPrototypeOf,
|
||||
ReflectOwnKeys,
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
const {
|
||||
ArrayIsArray,
|
||||
MathMax,
|
||||
Number,
|
||||
ObjectCreate,
|
||||
ObjectKeys,
|
||||
} = primordials;
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
'use strict';
|
||||
|
||||
const {
|
||||
Number,
|
||||
NumberIsNaN,
|
||||
ObjectCreate,
|
||||
} = primordials;
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
|
||||
const {
|
||||
Array,
|
||||
Number,
|
||||
ObjectCreate,
|
||||
ObjectDefineProperties,
|
||||
ObjectDefineProperty,
|
||||
|
||||
@@ -16,6 +16,7 @@ const {
|
||||
MathMin,
|
||||
MathRound,
|
||||
MathSqrt,
|
||||
Number,
|
||||
NumberIsNaN,
|
||||
NumberPrototypeValueOf,
|
||||
ObjectAssign,
|
||||
@@ -39,7 +40,7 @@ const {
|
||||
SymbolPrototypeValueOf,
|
||||
SymbolIterator,
|
||||
SymbolToStringTag,
|
||||
uncurryThis
|
||||
uncurryThis,
|
||||
} = primordials;
|
||||
|
||||
const {
|
||||
|
||||
@@ -24,6 +24,7 @@
|
||||
const {
|
||||
ArrayIsArray,
|
||||
Boolean,
|
||||
Number,
|
||||
NumberIsNaN,
|
||||
ObjectDefineProperty,
|
||||
ObjectSetPrototypeOf,
|
||||
|
||||
Reference in New Issue
Block a user