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 — Change "comma-dangle" rule · Issue #19131 · nodejs/node

Change "comma-dangle" rule #19131

New issue
Copy link
New issue
Copy link
Closed
Closed
Change "comma-dangle" rule#19131
Copy link

Description

@daynin
daynin
opened on Mar 4, 2018
Issue body actions

What about changing this rule in eslint config? At the moment it's only-multiline which allows but does not require trailing commas, and it can create misunderstandings in code review process.

Besides, changing this rule to always-multiline will allow us to avoid misunderstandings and make diffs cleaner

Activity

  1. apapirovski commented on Mar 4, 2018

    @apapirovski
    apapirovski
    on Mar 4, 2018
    Contributor
    More actions

    There would be too much churn, I think. Also, off the top of my head I'm not even certain how far back V8 support for it goes. Would we be able to backport such a change to v6.x?

  2. daynin commented on Mar 4, 2018

    @daynin
    daynin
    on Mar 4, 2018
    ContributorAuthor
    More actions

    Ok, if we can't use always-multiline for some reason, let's use never instead only-multiline. I think it'll be much better

  3. apapirovski commented on Mar 4, 2018

    @apapirovski
    apapirovski
    on Mar 4, 2018
    Contributor
    More actions

    There's going to be churn either way. Long-term we would likely prefer always-multiline, it just might need to be a more gradual transition.

    Then again, if V6.x already supports trailing commas then if someone wanted to do that and immediately backport to all active release lines, I wouldn't personally stand in the way.

    Reacted by Gibson Fahnestock
  4. daynin commented on Mar 4, 2018

    @daynin
    daynin
    on Mar 4, 2018
    ContributorAuthor
    More actions

    @apapirovski v6 does not support trailing commas in function declarations and calls

  5. daynin commented on Mar 4, 2018

    @daynin
    daynin
    on Mar 4, 2018
    ContributorAuthor
    More actions

    So, we can use this rule for objects and arrays only

  6. daynin commented on Mar 4, 2018

    @daynin
    daynin
    on Mar 4, 2018
    ContributorAuthor
    More actions

    @apapirovski
    I can change the rule and fix all errors but

    ... immediately backport to all active release lines

    How can I do this?

  7. tniessen commented on Mar 5, 2018

    @tniessen
    tniessen
    on Mar 5, 2018
    Member
    More actions

    Not sure whether there is consensus about this, I myself am certainly not a fan of dangling commas and definitely not in favor of enforcing them. There are not too many situations where this rule actually reduces the diff size and it appears unnatural to me to end a list with a separator.

  8. daynin commented on Mar 5, 2018

    @daynin
    daynin
    on Mar 5, 2018
    ContributorAuthor
    More actions

    I am going to close this issue due to the concerns in this PR #19133. Thank you for the discussion!

  9. daynin
    closed this as completedon Mar 5, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      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.