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
Low-pri: Use prettier in our repo? #383
Comments
I could be convinced either way. At the moment it's annoying enough with I trip up on lint, adding more restrictions could be a pain. |
I would love this if a bot can run |
Marking as P3. If someone would like to own adding prettier support before stable, let us know and we can assign accordingly. |
FYI, I came across the following setup while looking at {
"scripts": {
"format": "prettier --trailing-comma es5 --single-quote --write 'packages/*/*.js' 'packages/*/!(node_modules)/**/*.js'",
"precommit": "lint-staged"
},
"devDependencies": {
"eslint": "3.16.1",
"husky": "^0.13.2",
"lint-staged": "^3.3.1",
"prettier": "^0.21.0"
},
"lint-staged": {
"*.js": [
"prettier --trailing-comma es5 --single-quote --write",
"git add"
]
}
} I'd have to explore it a bit more, but if we did decide to integrate with |
I am using the same for preact-material-components. Its a pretty quick thing, i'll see if i can plug it in on a separate branch |
I've been using prettier for Gatsby and other stuff for a while now. Most magical thing ever especially when you set up your editor to run it on save. You can write out super ugly code knowing it'll get prettied up when you save. Really helps ensure a nice consistent codebase. |
After addy explained that this can make the changes on your behalf, I'm more than willing to give this a trey if someone sets it up. |
Cool—still low-pri, and it would be good to normalize our ESLint configs (#478) first. |
@addyosmani @gauntface i have made changes to bring We might need to make a call if we need to support this in our |
@prateekbh @jeffposnick have either of you managed to get this to run and play nice with out eslint config? If not can we close this issue? |
Yes, I have a repo where prettier is integrated, but it conflicts with our lint configuration. e.g.
this gets converted to
also it removes braces around arrow functions if there's only one parameter
If you guys think we can make an exception for this in our eslint config, then I can go ahead and submit the PR, else feel free to close the issue |
Oh, that's a bummer about The one-time |
Library Affected:
all
Not a top priority, but how would folks feel about running https://github.com/prettier/prettier, configured with our ESLint rules, over the contents of our repo?
It's a good way of standardizing whitespace and other formatting.
The text was updated successfully, but these errors were encountered: