hebcal / hebcal-es6

perpetual Jewish Calendar with holidays, Shabbat and holiday candle lighting and havdalah times, Torah readings, and more
https://hebcal.github.io/api/core/
GNU General Public License v2.0
98 stars 14 forks source link

reformat holidays.getCategories to read simpler #438

Closed YizYah closed 3 months ago

YizYah commented 3 months ago
  1. replace case with if
  2. else with early return
  3. destructuring
  4. meaningful var name minorHolidays for readability
sonarcloud[bot] commented 3 months ago

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
0.0% Duplication on New Code

See analysis details on SonarCloud

YizYah commented 3 months ago

@mjradwin I'm sorry... it seems that even when I retroactively apply lint --fix, there are white spaces introduced. I assume the issue is that whatever lint settings I have are creating changes, some of which do not actually violate your lint settings. I may be able to start over (if you want to just close this) and reject the white-space changes line by line in the version control of the VS Code editor. If I edit the file directly, autosave will just add back all of the changes to spacing.

YizYah commented 3 months ago

@mjradwin good news, I figured out the problem with my vscode configuration! I had prettier set as editor.defaultFormatter for javascript. So, moving forward I should not be adding extra white space.

YizYah commented 3 months ago

Closing this PR in favor of https://github.com/hebcal/hebcal-es6/pull/439, because this PR introduced unneeded changes to formatting, against the explicit preference of @mjradwin.