-
Notifications
You must be signed in to change notification settings - Fork 8
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
Add prettier config #472
Comments
we already have an eslint config set up and eslint supports some autofixing. i'd be open to prettier in addition, but have not taken the time to understand the implications of getting both to work together |
Right on, I'm not sure how all that works so I thought Prettier would help. Sounds like it's not needed and there is probably just some configuration that I would need to do. |
i definitely see the benefit of prettier, but have just never taken the time to sort through the details of getting it to work with eslint. more than happy to learn from someone that has done it or wants to figure it out, though. |
eslint and Prettier can play well together. Good news it many people have forged that trail: You can set up Prettier auto-format with hotkeys or on save. This creates consistent code format and saves time from having to manual make your code adhere to styles. Many discuss the benefits of prettier over eslint including stricter rules and opinionated-ness, so that it makes formatting decisions and folks don't have to fight over them. Also- you can set up this with Husky and Lerna to automatically run prettier and eslint when you commit: |
yep, i just havent taken the time to figure out the details around how. if someone wants to help get us over the hurdle, i'm happy to work through getting us there
i'm a huge advocate of this stance. this is most of the reason the eslint config is as strict as it is. in general the actual rules are less important to me than being consistent. tools like eslint and prettier are much better reminders than humans in several ways, but most importantly are disconnected enough to minimize disagreements from each contribution, as you mention.
|
I ran into a lot of errors when creating a new page. It would be nice to have a Prettier config setup to automatically format the code correctly.
The text was updated successfully, but these errors were encountered: