Skip to content

Conversation

@MichaelDeBoey
Copy link
Contributor

This will make formatting errors less possible and will now run over all sort of files not only .js files

@MichaelDeBoey MichaelDeBoey mentioned this pull request Apr 19, 2019
@adamwathan
Copy link
Member

I'm a bit conflicted on this because I'll often rewrite code in a different way if I don't like how Prettier formats it (which is often), so I don't really love the idea of Prettier formatting the code silently.

Could we instead just run eslint as a precommit hook to prevent people from committing without manually reviewing any formatting errors?

@MichaelDeBoey
Copy link
Contributor Author

I like the idea of not having to bother the way something is formatted.

If I like it or not, Prettier takes care of it and there can't be any discussion about it too.
Specially when working in teams (or OSS), this really has a proven value for me.

@azdanov
Copy link

azdanov commented Apr 20, 2019

I think prettier is useful for larger projects to keep code style the same. Otherwise, each PR must conform to some arbitrary visual standard.

A good example is Laravel Style CI.

Don't worry if your code styling isn't perfect! StyleCI will automatically merge any style fixes into the Laravel repository after pull requests are merged. This allows us to focus on the content of the contribution and not the code style.

@MichaelDeBoey
Copy link
Contributor Author

@azdanov That's exactly why I added the pre-commit hook 😉

@adamwathan
Copy link
Member

Going to say no to this for now for the reasons I stated above – I just don't like letting Prettier do it's thing silently, I'd rather be able to review the results before the code gets committed. Thanks though.

@adamwathan adamwathan closed this Apr 22, 2019
@MichaelDeBoey MichaelDeBoey deleted the prettier branch April 23, 2019 07:43
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