parse-community / Parse-SDK-JS

The JavaScript SDK for Parse Platform
https://parseplatform.org
Apache License 2.0
1.32k stars 596 forks source link

style: Fix pre-commit hook and enable Prettier for TypeScript #2141

Closed dplewis closed 3 months ago

dplewis commented 3 months ago

Pull Request

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

parse-github-assistant[bot] commented 3 months ago

Thanks for opening this pull request!

codecov[bot] commented 3 months ago

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 ```diff @@ 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.

mtrezza commented 3 months ago

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.

dplewis commented 3 months ago

@mtrezza I made some changes to bring the hook closer to the original implementation. This is ready for review.

parseplatformorg commented 2 months ago

🎉 This change has been released in version 5.2.0-alpha.2

parseplatformorg commented 1 month ago

🎉 This change has been released in version 5.2.0-beta.1

parseplatformorg commented 1 month ago

🎉 This change has been released in version 5.2.0