-
Notifications
You must be signed in to change notification settings - Fork 19
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
Introduce Prettier to format files before git commit #466
Comments
kalpeshsingh
added a commit
to kalpeshsingh/frontend.social
that referenced
this issue
Sep 2, 2020
add prettier script, configuration file and add it in lint-staged to format and again add formatted files during git commit shoonyatech#466
kalpeshsingh
added a commit
to kalpeshsingh/frontend.social
that referenced
this issue
Sep 2, 2020
add prettier script, configuration file and add it in lint-staged to format and again add formatted files during git commit shoonyatech#466
Merged
souvikbasu
pushed a commit
that referenced
this issue
Sep 8, 2020
add prettier script, configuration file and add it in lint-staged to format and again add formatted files during git commit #466
Closing this as PR is merged. |
kalpeshsingh
added a commit
to kalpeshsingh/frontend.social
that referenced
this issue
Sep 26, 2020
add prettier script, configuration file and add it in lint-staged to format and again add formatted files during git commit shoonyatech#466
kalpeshsingh
added a commit
to kalpeshsingh/frontend.social
that referenced
this issue
Sep 26, 2020
* chore: enforce commit message formate using commitlint shoonyatech#475 * build(frontend.social): add prettier to format files add prettier script, configuration file and add it in lint-staged to format and again add formatted files during git commit shoonyatech#466 * Prettier integration (#3) * chore(package.json): add prettier and remove file glob from format script * chore(package.json): updgrade lint-stage dependency for improvement * chore: enforce commit message formate using commitlint shoonyatech#475
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This is part of main issue #457
Motivation
When multiple people contribute then it gets out of hand when we don't enforce code formatting. We can use tools like Prettier to make formatting consistent in a codebase without manual effort.
Steps to achieve
Assuming you have prettier at global level..prettierrc
file for configuration (feel free to add your team's decided configuration)lint-staged
configurationBefore
After
Additional changes
lint-staged
to^10.3.0
(so we don't need to use"git add
inlint-staged
)prettier
so developers don't need to install it at global level🚧 Words of caution
npm run format
to fix existing formatting issues in all the files. I want to give this opportunity to one of the contributor as it will affect 132 files will require a sanity testing.The text was updated successfully, but these errors were encountered: