Skip to content

Trailing Comma Rule #883

Closed
Closed
@marcelofabri

Description

In collections, it's possible to keep a trailing comma in the end:

let array = [
  1,
  2,
  3,
]

I've seen people that like this pattern (because the last line wouldn't change in a diff if another item is added later) and people who don't (because it's an extra unneeded symbol).

We could have a configuration so both styles (they're exclusive) could be validated in the same rule.

Metadata

Assignees

No one assigned

    Labels

    rule-requestRequests for a new rules.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions