lib: enforce ASCII order in error code imports#52625
Merged
nodejs-github-bot merged 1 commit intonodejs:mainfrom Apr 23, 2024
Merged
lib: enforce ASCII order in error code imports#52625nodejs-github-bot merged 1 commit intonodejs:mainfrom
nodejs-github-bot merged 1 commit intonodejs:mainfrom
Conversation
Collaborator
|
Review requested:
|
benjamingr
reviewed
Apr 21, 2024
|
|
||
| [codesSelector](node) { | ||
| if (node.value.type !== 'ObjectPattern') { | ||
| context.report({ node, message: 'Use destructuring to define error codes used in the file' }); |
Member
There was a problem hiding this comment.
What's wrong with importing codes and then using codes.SOME_ERROR? (It should have an equally low chance for a conflict I think?)
Contributor
Author
There was a problem hiding this comment.
Correct, that one is just for consistency (as you can see in the change list, destructuring is what happens in most files already)
benjamingr
approved these changes
Apr 21, 2024
Member
benjamingr
left a comment
There was a problem hiding this comment.
LGTM with question on code
RSLGTM on the applied reorders
jasnell
approved these changes
Apr 21, 2024
atlowChemi
approved these changes
Apr 21, 2024
Collaborator
Collaborator
Collaborator
|
Landed in 231548b |
aduh95
added a commit
that referenced
this pull request
Apr 29, 2024
PR-URL: #52625 Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Chemi Atlow <chemi@atlow.co.il>
bmeck
pushed a commit
to bmeck/node
that referenced
this pull request
Jun 22, 2024
PR-URL: nodejs#52625 Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Chemi Atlow <chemi@atlow.co.il>
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
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Similarly to a596af0, we can reduce the chances of git conflicts (although much rarer for error codes) and the amount of nitpicking in PRs.