-
Notifications
You must be signed in to change notification settings - Fork 29.8k
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
tools: add lint rule to keep primordials in ASCII order #52592
tools: add lint rule to keep primordials in ASCII order #52592
Conversation
Review requested:
|
I wish we adopted |
Note that primordials are not imported. They are carried around by the function contexts in the internal modules (which are not ESM, either, but wrapped functions similar to CJS) |
This comment was marked as outdated.
This comment was marked as outdated.
Commit Queue failed- Loading data for nodejs/node/pull/52592 ✔ Done loading data for nodejs/node/pull/52592 ----------------------------------- PR info ------------------------------------ Title tools: add lint rule to keep primordials in ASCII order (#52592) ⚠ Could not retrieve the email or name of the PR author's from user's GitHub profile! Branch aduh95:primordials-ascii-order -> nodejs:main Labels lib / src, author ready, needs-ci Commits 5 - tools: add lint rule to keep primordials in ASCII order - fixup! tools: add lint rule to keep primordials in ASCII order - enforce multiline - fixup! enforce multiline - fixup! enforce multiline Committers 1 - Antoine du Hamel PR-URL: https://github.com/nodejs/node/pull/52592 Reviewed-By: Yagiz Nizipli Reviewed-By: Jacob Smith Reviewed-By: Moshe Atlow ------------------------------ Generated metadata ------------------------------ PR-URL: https://github.com/nodejs/node/pull/52592 Reviewed-By: Yagiz Nizipli Reviewed-By: Jacob Smith Reviewed-By: Moshe Atlow -------------------------------------------------------------------------------- ℹ This PR was created on Fri, 19 Apr 2024 14:12:46 GMT ✔ Approvals: 3 ✔ - Yagiz Nizipli (@anonrig) (TSC): https://github.com/nodejs/node/pull/52592#pullrequestreview-2013069800 ✔ - Jacob Smith (@JakobJingleheimer): https://github.com/nodejs/node/pull/52592#pullrequestreview-2011794306 ✔ - Moshe Atlow (@MoLow) (TSC): https://github.com/nodejs/node/pull/52592#pullrequestreview-2013335800 ✔ Last GitHub CI successful ℹ Last Full PR CI on 2024-04-20T10:58:00Z: https://ci.nodejs.org/job/node-test-pull-request/58543/ - Querying data for job/node-test-pull-request/58543/ ✔ Last Jenkins CI successful -------------------------------------------------------------------------------- ✔ No git cherry-pick in progress ✔ No git am in progress ✔ No git rebase in progress -------------------------------------------------------------------------------- - Bringing origin/main up to date... From https://github.com/nodejs/node * branch main -> FETCH_HEAD ✔ origin/main is now up-to-date - Downloading patch for 52592 From https://github.com/nodejs/node * branch refs/pull/52592/merge -> FETCH_HEAD ✔ Fetched commits as 461722d64cfd..a37d2682e6f6 -------------------------------------------------------------------------------- Auto-merging lib/internal/modules/esm/get_format.js [main 8c2d7fc8ad] tools: add lint rule to keep primordials in ASCII order Author: Antoine du Hamel Date: Fri Apr 19 16:06:52 2024 +0200 87 files changed, 281 insertions(+), 180 deletions(-) create mode 100644 test/parallel/test-eslint-alphabetize-primordials.js create mode 100644 tools/eslint-rules/alphabetize-primordials.js [main 85a6613c8b] fixup! tools: add lint rule to keep primordials in ASCII order Author: Antoine du Hamel Date: Fri Apr 19 16:14:58 2024 +0200 1 file changed, 1 insertion(+), 1 deletion(-) [main cbb4bf5260] enforce multiline Author: Antoine du Hamel Date: Fri Apr 19 17:27:10 2024 +0200 2 files changed, 23 insertions(+), 9 deletions(-) [main 7b4bc5cdc4] fixup! enforce multiline Author: Antoine du Hamel Date: Fri Apr 19 17:33:36 2024 +0200 10 files changed, 38 insertions(+), 10 deletions(-) [main 53e4c0aaee] fixup! enforce multiline Author: Antoine du Hamel Date: Fri Apr 19 18:39:23 2024 +0200 1 file changed, 7 insertions(+), 3 deletions(-) ✔ Patches applied There are 5 commits in the PR. Attempting autorebase. Rebasing (2/7) Rebasing (3/7)https://github.com/nodejs/node/actions/runs/8773332187 |
Landed in a596af0 |
PR-URL: #52592 Reviewed-By: Yagiz Nizipli <[email protected]> Reviewed-By: Jacob Smith <[email protected]> Reviewed-By: Moshe Atlow <[email protected]>
For the sake on consistency, reduce noise in PR reviews, and to minimize the chance of conflicts if two PR tries to introduce the same primordial.
Given the size of the change, we've done an OK job at keeping the ASCII order manually, however there's no reason to that work manually when our computer can do it better than us :)