Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix lint errors in datepicker and refactor setExcludedDates method #1113

Merged
merged 2 commits into from
Jan 24, 2025

Conversation

chrispymm
Copy link
Contributor

Fixes all linting errors for the datepicker component.

Refactors the setExludedDates method to both fix linting errors and increase readability.

@chrispymm chrispymm requested a review from a team as a code owner January 23, 2025 21:07
@chrispymm chrispymm changed the base branch from js-linting-take-two to main January 23, 2025 21:08
…to appease eslint

The large map function in the setExcldedDates method was hard to read, and eslint didn't like it
didn't have an obvious return value. This commit refactors part of the
map into a parseDateRangeString function making the code much more
readable and control flow more obvious.
@chrispymm chrispymm merged commit a5dc2d7 into main Jan 24, 2025
22 checks passed
@chrispymm chrispymm deleted the js-lint-datepicker branch January 24, 2025 13:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants