-
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
lib: change "comma-dangle" rule #19133
Conversation
- change the rule - fix all linting issues - close nodejs#19131
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
1384 changed files is an unacceptable amount of churn for one pr, i'm -1 on this
@devsnek but how can we do this gradually? One PR for one file? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
-1. This is so much churn. And no, please don't do this as multiple PRs.
What is the benefit to enforcing one rule here? The only benefit I am aware of with the dangling comma is that it reduces the size of diffs. Making this many changes in order to reduce diff size seems counter-productive.
Could you go into more detail please? AFAIK you're free to use either style in the codebase. I prefer trailing commas, but that's not something I'd request changes for in a PR review. |
I was going to suggest just adding this rule for |
Do you mean that people raising PRs (for some other reason) to a section of code could add commas at the same time? If so then agreed. |
If that is the case, then it is a regression. We still have the .eslintrc.yaml files in the directories that should be there for exactly that. I did not check if they still work or not. |
@apapirovski it is very likely #18566. |
I am going to close this due to the mentioned concerns. @daynin thanks a lot for your contribution anyway! |
Thanks for taking the trouble @daynin, and for the PRs to node! The effort is appreciated and the discussion is useful even if the decision is not to change things. |
@apapirovski I just checked if the .eslintrc.yaml in e.g. |
Checklist
make -j4 test
(UNIX), orvcbuild test
(Windows) passesAffected core subsystem(s)
lib, doc