batoulapps / adhan-js

High precision Islamic prayer time library for JavaScript
MIT License
376 stars 86 forks source link

refactor: format files using prettier #96

Closed abumalick closed 2 years ago

abumalick commented 2 years ago

here you go for the prettier PR @sgtsquiggs

codecov[bot] commented 2 years ago

Codecov Report

Merging #96 (ee6fc0c) into develop (c30047e) will decrease coverage by 0.49%. The diff coverage is 99.43%.

@@             Coverage Diff             @@
##           develop      #96      +/-   ##
===========================================
- Coverage    99.27%   98.78%   -0.50%     
===========================================
  Files           19       19              
  Lines          555      576      +21     
  Branches        98      116      +18     
===========================================
+ Hits           551      569      +18     
- Misses           4        6       +2     
- Partials         0        1       +1     
Impacted Files Coverage Δ
src/Adhan.js 100.00% <ø> (ø)
src/Prayer.js 100.00% <ø> (ø)
src/Rounding.js 100.00% <ø> (ø)
src/Shafaq.js 100.00% <ø> (ø)
src/PolarCircleResolution.js 86.84% <90.90%> (-1.40%) :arrow_down:
src/Astronomical.js 99.11% <99.10%> (-0.89%) :arrow_down:
src/CalculationMethod.js 100.00% <100.00%> (ø)
src/CalculationParameters.js 100.00% <100.00%> (ø)
src/Coordinates.js 100.00% <100.00%> (ø)
src/DateUtils.js 100.00% <100.00%> (ø)
... and 9 more

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update c30047e...ee6fc0c. Read the comment docs.

abumalick commented 2 years ago

Do you want me to update Adhan.js? @sgtsquiggs

sgtsquiggs commented 2 years ago

Yes please!

sgtsquiggs commented 2 years ago

Can you also retarget this MR to develop branch

z3bi commented 2 years ago

@abumalick the checks are failing because Adhan.js doesn't contain the latest changes. Please run "npm run build" and add Adhan.js and Adhan.js.map to your commit.

abumalick commented 2 years ago

@sgtsquiggs @z3bi do you want me to config prettier as a precommit hook? https://prettier.io/docs/en/precommit.html

z3bi commented 2 years ago

@sgtsquiggs @z3bi do you want me to config prettier as a precommit hook? https://prettier.io/docs/en/precommit.html

Yeah that would be great. We use Husky for our current githooks.

abumalick commented 2 years ago

Here you go, this configuration will format automatically the files before committing them. I added the generated build files to .prettierignore file to avoid formatting them

z3bi commented 2 years ago

@abumalick please also add the shared/ directory to ignore as well since they are brought in from another repo.

github-actions[bot] commented 2 years ago

:tada: This PR is included in version 4.4.0 :tada:

The release is available on:

Your semantic-release bot :package::rocket: