openwallet-foundation-labs / sd-jwt-js

A JavaScript implementation of the Selective Disclosure JWT (SD-JWT) spec.
https://sdjwt.js.org/
Apache License 2.0
36 stars 12 forks source link

Feat/husky #185

Closed cre8 closed 5 months ago

cre8 commented 5 months ago

Adding husky to work to format the files before commiting them.

Signed-off-by: Mirko Mollik mirko.mollik@fit.fraunhofer.de

codecov[bot] commented 5 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 98.02%. Comparing base (f19b76c) to head (ef9f151). Report is 1 commits behind head on main.

:exclamation: Current head ef9f151 differs from pull request most recent head 2ff575f. Consider uploading reports for the commit 2ff575f to get more accurate results

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #185 +/- ## ======================================= Coverage 98.02% 98.02% ======================================= Files 23 23 Lines 2074 2074 Branches 307 307 ======================================= Hits 2033 2033 Misses 41 41 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

cre8 commented 5 months ago

@lukasjhan When I am using the commit via the command line like git commit -m "fix: foo,....." it works fine. It seems that vscode git commit ui is ignoring the pre commit, so it will create two commits (which is not a big deal since all commits will be squashed).

I used husky because it had the biggest community

berendsliedrecht commented 5 months ago

Not the biggest fan of husky as the CI validates everything and husky just slows me down :'). No real issue, just find it a bit annoying and thats mainly why we disabled it within Credo.

lukasjhan commented 5 months ago

Not the biggest fan of husky as the CI validates everything and husky just slows me down :'). No real issue, just find it a bit annoying and thats mainly why we disabled it within Credo.

I've never used it before but, um.. Is it because husky check the codes every time I commit?

cre8 commented 5 months ago

@berendsliedrecht the problem with lerna publish is that it will update the package.json files to add the new version number, commit and push it. We can not stop in the middle to run the format command so it get's aligned with biome.

Or we go the other way around and change the biome rules so they fit with the changes lerna is performing.

lukasjhan commented 5 months ago

I think it will be okay since the code base is not large like credo.

berendsliedrecht commented 5 months ago

Yeah the size and biome performance should help a lot. As long as we don't have to wait for 50s+ for a commit it's all good :).