Skip to content
This repository was archived by the owner on Jun 4, 2024. It is now read-only.

Setup prettier #482

Closed
wants to merge 2 commits into from
Closed

Setup prettier #482

wants to merge 2 commits into from

Conversation

n-riesco
Copy link
Contributor

@n-riesco n-riesco commented Jul 5, 2018

@mfix22 @nicolaskruchten
@tarzzz @shannonlal @kndungu

I've noticed that prettier has an option to ignore files without a pragma (see this commit for an example of how it works).

I've also added husky to setup a git hook, so that prettier runs automatically before a git commit.

If you all are happy with this incremental approach, let's merge this PR.

Closes #475

@nicolaskruchten
Copy link
Contributor

I would be more in favour of running it over a larger/complete set of files early on, otherwise it will make PR reviews in the future more challenging as we will have "ran prettier" interspersed with other commits...

@kndungu
Copy link
Contributor

kndungu commented Jul 5, 2018

💯

It's about time 🎆

Suggestion: Consider adding "arrowParens": "always" to the Prettier config

Will turn

const addOne = param => param + 1

To

const addOne = (param) => param + 1

@n-riesco
Copy link
Contributor Author

n-riesco commented Jul 5, 2018

@kndungu I can't believe I've missed that option! Of course, I'll add it.

@n-riesco
Copy link
Contributor Author

n-riesco commented Jul 5, 2018

@nicolaskruchten @kndungu @tarzzz Let's be pragmatic about the temporary use of pragmas. I'm not going to run prettier on the whole code base just before an on-prem release.

The benefit of having DawnLabs' contributions formatted right away outweighs the nuisance of adding a pragma.

@nicolaskruchten
Copy link
Contributor

nicolaskruchten commented Jul 5, 2018 via email

@n-riesco
Copy link
Contributor Author

n-riesco commented Jul 5, 2018

@mfix22 You see, most people but me want to run prettier on the whole code base. I will do that after the on-prem release, but if you want to be able to use prettier with your contributions before, I'll merge this PR now, so that you can do so.

@n-riesco n-riesco force-pushed the prettier/initial-setup branch from fa88c50 to 4e90d4a Compare July 5, 2018 21:40
@n-riesco
Copy link
Contributor Author

n-riesco commented Jul 9, 2018

I'm closing since there is no interest in merging before the onprem release.

@n-riesco n-riesco closed this Jul 9, 2018
@n-riesco n-riesco mentioned this pull request Jul 9, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

setup prettier
3 participants