-
Notifications
You must be signed in to change notification settings - Fork 577
Enable stricter eslint rules #9336
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
Conversation
@@ -81,7 +81,7 @@ export class CalendarAgendaView implements Component<CalendarAgendaViewAttrs> { | |||
|
|||
const agendaChildren = this.renderAgenda(attrs, isDesktopLayout) | |||
|
|||
if (attrs.selectedTime && attrs.eventsForDays.size > 0 && this.lastScrolledDate != attrs.selectedDate) { | |||
if (attrs.selectedTime && attrs.eventsForDays.size > 0 && this.lastScrolledDate !== attrs.selectedDate) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We might need to use getTime()
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
new Date(0) === new Date(0) // false
new Date(0) == new Date(0) // false
we should have done it before too, huh?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes we should've
@@ -216,7 +222,7 @@ function expandByDayRuleForWeeklyEvents(targetWeekDay: any, date: DateTime, wkst | |||
newDate = newDate.plus({ weeks: 1 }) | |||
} | |||
|
|||
if (newDate.toMillis() >= nextEvent || (wkst != WeekDaysJsValue.MO && newDate.toMillis() >= intervalStart.plus({ weeks: 1 }).toMillis())) { | |||
if (newDate.toMillis() >= nextEvent || (wkst !== WeekDaysJsValue.MO && newDate.toMillis() >= intervalStart.plus({ weeks: 1 }).toMillis())) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This comparison is using the wrong enum, wkst
should be compared against WeekdayNumbers
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ah, good catch! could you push up a fix? I'm not sure I know how to fix it
Close #9333 Co-authored-by: hrb-hub <hrb-hub@users.noreply.github.com>
Co-authored-by: hrb-hub <hrb-hub@users.noreply.github.com>
Co-authored-by: hrb-hub <hrb-hub@users.noreply.github.com>
…ries with ByDay rules and weekstart
#9333