-
Notifications
You must be signed in to change notification settings - Fork 3
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
Create .pre-commit-config.yaml #15
base: main
Are you sure you want to change the base?
Conversation
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.
If we don't use pre-commit locally this will end up adding commits to most PRs. Should we add pre-commit to our devDependencies
?
@NathanFarmer No developer should actually need to install anything, but I can add instructions for doing that. EditWe could have a |
I'm fine with having this - but I also think we don't need it for this repo. Is there a way to just opt out of pre-commit.ci? |
5ce73c7
to
9094ab7
Compare
Not easily because it's enabled org-wide. Although I would recommend using it to do some additional things like apply prettier formatting automatically. |
Codecov ReportAll modified and coverable lines are covered by tests ✅
✅ All tests successful. No failed tests found. Additional details and impacted files@@ Coverage Diff @@
## main #15 +/- ##
=======================================
Coverage 74.80% 74.80%
=======================================
Files 38 38
Lines 504 504
Branches 96 96
=======================================
Hits 377 377
Misses 90 90
Partials 37 37 ☔ View full report in Codecov by Sentry. |
Define a simple pre-commit config file.
These checks...
prevent invalid yaml or json syntaxensure files end with a new-lineremove trailing whitespace.I can remove any of these checks, if we don't like them.
The fixes are applied automatically, developers don't need to do anything to take advantage of these fixes.
In the future, we can also use pre-commit to do things like auto-apply
prettier
formatting.https://github.com/pre-commit/mirrors-prettier
Or any of a number of supported hooks
https://pre-commit.com/hooks.html