Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace Number to Primordials #30700

Closed

Conversation

Sebastien-Ahkrin
Copy link
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 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 Sebastien-Ahkrin changed the title Number enforce Replace Number to Primordials Nov 28, 2019
lib/internal/http2/util.js Outdated Show resolved Hide resolved
@targos
Copy link
Member

targos commented Nov 28, 2019

Refs: #30697

Should land after #30686

@nodejs-github-bot
Copy link
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
Copy link
Member

targos commented Nov 30, 2019

Landed in 2070d3f. Thanks for the PR!

@targos targos closed this Nov 30, 2019
@ghost

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 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 MylesBorins mentioned this pull request Feb 8, 2020
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