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

Automatically run prettier on staged files #8573

Closed
RichardOtvos opened this issue Apr 9, 2019 · 2 comments
Closed

Automatically run prettier on staged files #8573

RichardOtvos opened this issue Apr 9, 2019 · 2 comments

Comments

@RichardOtvos
Copy link
Contributor

Now that we have Prettier on the codebase, do you think it would be a good idea, to run it to js files that has been staged, so we avoid committing badly formatted code?

I'm thinking about using lint-staged to format our files like how create-react-app does here: https://github.com/facebook/create-react-app/blob/master/package.json#L46

I'm happy to work on this if it's something we want, but thought we could discuss it before, I put time into this.

@kellyselden
Copy link
Member

kellyselden commented Apr 9, 2019

If it touches the git hooks, I'm pretty much opposed.

Edit: That was pretty strong words, my appologies. I've had some repo destroying issues with git hooks before, just not sure I want to walk into that.

@RichardOtvos
Copy link
Contributor Author

@kellyselden no worries 😄
Yeah, I see how this can be pretty controversial, that's why I wanted to talk about it, see what you guys think.

Also that repo destroying story sounds scary 😬

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

No branches or pull requests

2 participants