Skip to content
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

Closed
wants to merge 3 commits into from
Closed

Prettier pre-commit hook #57

wants to merge 3 commits into from

Conversation

dbanksdesign
Copy link
Member

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!

@netlify
Copy link

netlify bot commented Sep 8, 2021

✔️ 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

@kaelig
Copy link
Member

kaelig commented Sep 9, 2021

Useful for folks who don't have the prettier extension installed in VS Code!

Copy link
Member

@kaelig kaelig left a 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
Copy link
Member

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!)?

Copy link
Member

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?)

.husky/pre-commit Show resolved Hide resolved
.husky/pre-commit Show resolved Hide resolved
@dbanksdesign
Copy link
Member Author

Closing this in favor of #70

@jina jina deleted the lint-commit-hook branch September 14, 2021 21:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants