Parse-SDK-JS icon indicating copy to clipboard operation
Parse-SDK-JS copied to clipboard

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

Open dplewis opened this issue 1 year ago • 2 comments

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

  • [x] Add tests
  • [x] Add changes to documentation (guides, repository pages, code comments)

dplewis avatar May 17 '24 14:05 dplewis

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: #123 in 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.

codecov[bot] avatar May 17 '24 18:05 codecov[bot]

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 avatar May 18 '24 17:05 mtrezza

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

dplewis avatar May 18 '24 19:05 dplewis

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

parseplatformorg avatar Jun 07 '24 10:06 parseplatformorg

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

parseplatformorg avatar Jun 24 '24 20:06 parseplatformorg

🎉 This change has been released in version 5.2.0

parseplatformorg avatar Jun 29 '24 14:06 parseplatformorg