Skip to content

Enforce Trailing Commas by Default #68

@btnwtn

Description

@btnwtn

I propose that trailing commas should be enabled by default. IE8 is a non issue for most, and this will provide better diffing.

const arr = [
  'multi',
  'line'
]

should be formatted as:

const arr = [
  'multi',
  'line',
]

I would also suggest not enabling it for function arguments, considering that this is not in the official spec yet and won't be fully supported without a transpiler like babel. e.g.:

foo(
  arg1,
  arg2,
)

should be formatted as:

foo(
  arg1,
  arg2
)

Metadata

Metadata

Assignees

No one assigned

    Labels

    lang:javascriptIssues affecting JSlocked-due-to-inactivityPlease open a new issue and fill out the template instead of commenting.

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions