Parse-SDK-JS
Parse-SDK-JS copied to clipboard
style: Fix pre-commit hook and enable Prettier for TypeScript
Pull Request
- Report security issues confidentially.
- Any contribution is under this license.
- Link this pull request to an issue.
Issue
After Husky updated to v8 it has been broken.
Approach
Run the typescript parser for prettier, style and lint TS files. Prettier now runs before every commit and enforces the styling convention. No functional changes have been made.
Tasks
- [x] Add tests
- [x] Add changes to documentation (guides, repository pages, code comments)
Thanks for opening this pull request!
- ❌ Please link an issue that describes the reason for this pull request, otherwise your pull request will be closed. Make sure to write it as
Closes: #123in the PR description, so I can recognize it.
Codecov Report
All modified and coverable lines are covered by tests :white_check_mark:
Project coverage is 100.00%. Comparing base (
b50790a) to head (bd2e49f). Report is 47 commits behind head on alpha.
Additional details and impacted files
@@ Coverage Diff @@
## alpha #2141 +/- ##
==========================================
Coverage 100.00% 100.00%
==========================================
Files 61 64 +3
Lines 6186 6371 +185
Branches 1499 1535 +36
==========================================
+ Hits 6186 6371 +185
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
Does this pre-commit hook run prettier and then lint fix? The 2 produce different outputs.
I see now this is running the prettier script which also runs lint fix; I assume it would only run prettier. All good.
@mtrezza I made some changes to bring the hook closer to the original implementation. This is ready for review.
🎉 This change has been released in version 5.2.0-alpha.2
🎉 This change has been released in version 5.2.0-beta.1
🎉 This change has been released in version 5.2.0