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
Prettier pre-commit hook #57
Conversation
✔️ Deploy Preview for dtcg-tr ready! 🔨 Explore the source changes: e4936a9 🔍 Inspect the deploy log: https://app.netlify.com/sites/dtcg-tr/deploys/6139125d774f170008a821cf 😎 Browse the preview: https://deploy-preview-57--dtcg-tr.netlify.app |
Useful for folks who don't have the prettier extension installed in VS Code! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you! A few questions - perhaps one blocker if it only works on Unix systems and not Windows.
"editor.formatOnSave": true, | ||
"editor.formatOnPaste": true | ||
"editor.formatOnPaste": true, | ||
"files.insertFinalNewline": true |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should be taken care of by editorconfig (which I forgot to add to the list of recommended extensions, sorry!)?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(I added editorconfig to the list of recommended extensions, do we still need this?)
Closing this in favor of #70 |
I got annoyed that a pull request was failing a linting check, but not telling me why it was failing. Instead, what repositories generally do is have a pre-commit hook that runs prettier on files that were changed in the commit and writes the prettier changes. This way the contributor won't have to remember to run prettier and fix the issue by hand. Open to suggestions though!