GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — lib: change "comma-dangle" rule by daynin · Pull Request #19133 · nodejs/node

Conversation

@daynin

@daynin daynin commented Mar 4, 2018

Copy link
Copy Markdown
Contributor
  • change the rule
  • fix all linting issues
  • close Change "comma-dangle" rule #19131
Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • tests and/or benchmarks are included
  • documentation is changed or added
  • commit message follows commit guidelines
Affected core subsystem(s)

lib, doc

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@daynin
lib: change "comma-dangle" rule
cc428d2
- change the rule
- fix all linting issues
- close nodejs#19131
@nodejs-github-bot nodejs-github-bot added the tools Issues and PRs related to the tools directory. label Mar 4, 2018
devsnek
devsnek suggested changes Mar 4, 2018
View reviewed changes

@devsnek devsnek left a comment

Copy link
Copy Markdown
Member

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

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@daynin

daynin commented Mar 4, 2018

Copy link
Copy Markdown
Contributor Author

@devsnek but how can we do this gradually? One PR for one file?

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

cjihrig
cjihrig requested changes Mar 4, 2018
View reviewed changes

@cjihrig cjihrig left a comment

Copy link
Copy Markdown
Contributor

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.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@gibfahn

gibfahn commented Mar 5, 2018

Copy link
Copy Markdown
Member

@devsnek but how can we do this gradually? One PR for one file?

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.

it can create misunderstandings in code review process.

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.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@apapirovski

apapirovski commented Mar 5, 2018

Copy link
Copy Markdown
Contributor

I was going to suggest just adding this rule for lib but it looks like we recently went away from having separate lint configs on per directory basis. As per my comment on the original issue, I think doing this on an ongoing basis and being hopeful that eventually we get to the point where this rule can be enabled, is probably the most reasonable outcome.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@gibfahn

gibfahn commented Mar 5, 2018 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Member

I think doing this on an ongoing basis

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.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@BridgeAR

BridgeAR commented Mar 5, 2018

Copy link
Copy Markdown
Member

@apapirovski

I was going to suggest just adding this rule for lib but it looks like we recently went away from having separate lint configs on per directory basis.

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.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@apapirovski

apapirovski commented Mar 5, 2018 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor

@BridgeAR Seems my editor (Atom) recently decided to start ignoring these hidden files... ugh. I guess I have to hunt down what changed.

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.

@gibfahn Yeah, exactly.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@BridgeAR

BridgeAR commented Mar 5, 2018

Copy link
Copy Markdown
Member

@apapirovski it is very likely #18566.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@BridgeAR

BridgeAR commented Mar 5, 2018

Copy link
Copy Markdown
Member

I am going to close this due to the mentioned concerns.

@daynin thanks a lot for your contribution anyway!

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@BridgeAR BridgeAR closed this Mar 5, 2018
@daynin

daynin commented Mar 5, 2018 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor Author

@BridgeAR ok. And I'll close this issue too #19131

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@daynin
daynin deleted the change-comma-dangle-rule branch March 5, 2018 18:28
@daynin daynin mentioned this pull request Mar 5, 2018
Change "comma-dangle" rule #19131
Closed
@gibfahn

gibfahn commented Mar 5, 2018

Copy link
Copy Markdown
Member

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.

BridgeAR reacted with thumbs up emoji
All reactions
  • 👍 1 reaction

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@BridgeAR

BridgeAR commented Mar 7, 2018

Copy link
Copy Markdown
Member

@apapirovski I just checked if the .eslintrc.yaml in e.g. ./lib is still used and for me it does seem to be the case.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@vsemozhetbyt vsemozhetbyt mentioned this pull request May 13, 2018
tools: always use a trailing comma in arrays #20703
Closed
4 tasks done
@Trott Trott mentioned this pull request Jun 6, 2018
test,tools: refactor custom ESLint for readability #21134
Closed
2 tasks done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@cjihrig cjihrig cjihrig requested changes
+1 more reviewer
@devsnek devsnek devsnek requested changes
Reviewers whose approvals may not affect merge requirements

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

tools Issues and PRs related to the tools directory.

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Change "comma-dangle" rule

Uh oh!

There was an error while loading. Please reload this page.

7 participants

@daynin @gibfahn @apapirovski @BridgeAR @cjihrig @devsnek @nodejs-github-bot
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.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.