FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Replace Number to Primordials by Sebastien-Ahkrin · Pull Request #30700 · nodejs/node · GitHub

/ node Public

Replace Number to Primordials - #30700

Closed
Sebastien-Ahkrin wants to merge 1 commit into
nodejs:masterfrom
Sebastien-Ahkrin:Number-enforce
Closed

Replace Number to Primordials#30700
Sebastien-Ahkrin wants to merge 1 commit into
nodejs:masterfrom
Sebastien-Ahkrin:Number-enforce

Conversation

Copy link
Copy Markdown
Contributor

Update some file to replace Number to the primordial Number.
And i just have created a line in "/lib/.eslintrc.yaml".

rules:
  no-restricted-globals:
    - name: Number
      message: "Use `const { Number } = primordials;` instead of the global."

And replace every code :

const {
  ArrayIsArray,
  MathMax,
  ObjectCreate,
  ObjectKeys,
} = primordials;

By

const {
  ArrayIsArray,
  MathMax,
  ObjectCreate,
  ObjectKeys,
  Number,
} = primordials;

in theses files :

  • lib/internal/buffer.js
  • lib/internal/console/constructor.js
  • lib/internal/fs/utils.js
  • lib/internal/http2/util.js
  • lib/internal/repl.js
  • lib/internal/url.js
  • lib/internal/util/inspect.js
  • lib/net.js

This task was given to me by @targos thanks ❤️

I hope this PR will help you :x

nodejs-github-bot added the lib / src Issues and PRs related to general changes in the lib or src directory. label Nov 28, 2019
Sebastien-Ahkrin changed the title Number enforce Replace Number to Primordials Nov 28, 2019
Comment thread lib/internal/http2/util.js Outdated

targos commented Nov 28, 2019

Copy link
Copy Markdown
Member

Refs: #30697

Should land after #30686

Copy link
Copy Markdown
Collaborator

targos pushed a commit that referenced this pull request Nov 30, 2019
PR-URL: #30700
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>

targos commented Nov 30, 2019

Copy link
Copy Markdown
Member

Landed in 2070d3f. Thanks for the PR!

targos closed this Nov 30, 2019

This comment has been minimized.

targos pushed a commit that referenced this pull request Dec 1, 2019
PR-URL: #30700
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
BridgeAR mentioned this pull request Dec 3, 2019
targos pushed a commit that referenced this pull request Jan 14, 2020
PR-URL: #30700
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
BethGriggs pushed a commit that referenced this pull request Feb 6, 2020
PR-URL: #30700
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
MylesBorins mentioned this pull request Feb 8, 2020
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

lib / src Issues and PRs related to general changes in the lib or src directory.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants


Back | FazBrowse Home | New Git URL