Skip to content

Conversation

@boneskull
Copy link
Member

This adds Prettier w/ ESLint integration. Formatting is managed via prettier-eslint-cli which formats with Prettier then applies ESLint fixes thereafter.

The only noticeable conflict with our semistandard-based ESLint config is the lack of a space after the function keyword; this particular rule is suppressed by eslint-plugin-prettier and its ilk.

The motivations here:

  1. Consistency
  2. Automation
  3. Avoid debate about code style

lint-staged and husky are here to automatically format staged JS files as a pre-commit hook. I personally use this setup in other places and it hasn't caused any friction.

@boneskull boneskull added the type: chore generally involving deps, tooling, configuration, etc. label Apr 22, 2018
@coveralls
Copy link

Coverage Status

Coverage remained the same at 90.009% when pulling 5759baf on prettier into efff26f on master.

Copy link
Contributor

@Bamieh Bamieh left a comment

Choose a reason for hiding this comment

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

a huge +1 on this. I personally prefer the functions to be written like this.

Copy link
Contributor

@outsideris outsideris left a comment

Choose a reason for hiding this comment

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

Automation is always good!

@Munter
Copy link
Contributor

Munter commented Apr 22, 2018

Awesome!

@boneskull boneskull merged commit 5fc5845 into master Apr 22, 2018
@boneskull boneskull deleted the prettier branch April 22, 2018 19:18
@bakkot bakkot mentioned this pull request May 12, 2018
@boneskull boneskull added this to the next milestone May 17, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type: chore generally involving deps, tooling, configuration, etc.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants