-
Notifications
You must be signed in to change notification settings - Fork 1
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
chore: lint-staged improvements #556
Conversation
This makes two improvements to `lint-staged`: - Run Prettier on all files, not just some extensions. - Only check files, not fix them. This addresses a race condition (search [lint-staged's docs][0] for "race condition"). [0]: https://www.npmjs.com/package/lint-staged
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'm tempted to suggest removing the eslint step from lint-staged. But maybe better to consider in a follow-up after getting some consensus
], | ||
"*.{js,css,md}": "prettier --write" |
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.
the inclusion of css here is amusing 😄
This makes two improvements to
lint-staged
:Run Prettier on all files, not just some extensions.
Only check files, not fix them. This addresses a race condition (search lint-staged's docs for "race condition").
(I know there's some controversy about whether to use
lint-staged
at all, but I think these are improvements we can adopt regardless.)