Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.Sign up
Add .eslintrc.json to support use of Prettier code formatter #19296
On other projects, I've used the Prettier code formatter via the official Atom package. It saves a lot of time hassling with code formatting, and not having it enabled for Atom is causing me to waste a lot of time fixing linting errors.
On Atom, we're using JS Standard Style, which conflicts with the Prettier's default formatting. This is okay, because the Prettier package can run
With this change, you can now get nice auto-formatting when you install Prettier Atom and enable ES Lint support in the package settings.
We have a lot of files that aren't formatted with prettier, so this might generate a bit of churn initially, but I think the productivity savings will be worth it in the long run.
One particular issue is that Atom's source files don't have a consistent style with respect to spaces inside of curly brackets. Prettier defaults to having spaces (
@Arcanemagus the plugin I'm using bundles its own version of
May 9, 2019
That's cool! I'm going to try it!
As a followup, it would be cool to add first-class support for prettier (so it can be executed across all codebase by running
This way we avoid files going back and forth in codestyle depending on whether the committer is using prettier