Skip to content
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

Eslint: add comma-dangle always multi-line rule #1163

Merged
merged 2 commits into from
Jan 4, 2020

Conversation

simison
Copy link
Contributor

@simison simison commented Jan 4, 2020

Proposed Changes

  • Switch comma-dangle Eslint rule from never to always multi-line
  • Apply eslint --fix to all files

(I separated these steps into two commits)

This is kinda paving the way to eventually start using Prettier in the codebase (#932), although it's possible to turn off trailingComma option in Prettier so this isn't strickly necessary.

That said, it's a good convention to have since it's a bit more convenient to re-arrange different lists (variables, imports, etc) alphabetically without comma-hassle. 😁

This will also cause one less line-change in diffs when modifying the end of multi-line lists.

Testing Instructions

  • npm run lint passing?

Copy link
Contributor

@nicksellen nicksellen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm a fan of the multiline trailing comma dangle 👍

@simison simison merged commit 84c8eb9 into master Jan 4, 2020
@simison simison deleted the update/eslint-comma-dangle branch January 4, 2020 17:17
@mrkvon
Copy link
Contributor

mrkvon commented Jan 4, 2020

You're fast, guys 😁

Anyways, let's get other PRs rebased! This affects almost everything.

I like this, too. 👍

@simison
Copy link
Contributor Author

simison commented Jan 4, 2020

@mrkvon yup, and you can run npm run lint -- --fix to get commas in your PRs after rebasing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants