Skip to content

Commit

Permalink
chore: clean code
Browse files Browse the repository at this point in the history
  • Loading branch information
kerm1it committed Dec 28, 2020
1 parent dbe843b commit 1329de9
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/utils/dateUtil.ts
Original file line number Diff line number Diff line change
Expand Up @@ -230,14 +230,15 @@ export function parseValue<DateType>(
return generateConfig.locale.parse(locale.locale, value, formatList as string[]);
}

// eslint-disable-next-line consistent-return
export function getCellDateDisabled<DateType>({
cellDate,
mode,
disabledDate,
generateConfig,
}: {
cellDate: DateType;
mode: PanelMode;
mode: Omit<PanelMode, 'time'>;
generateConfig: GenerateConfig<DateType>;
disabledDate?: (date: DateType) => boolean;
}): boolean {
Expand Down Expand Up @@ -292,7 +293,6 @@ export function getCellDateDisabled<DateType>({
}
return true;
};
// eslint-disable-next-line @typescript-eslint/switch-exhaustiveness-check
switch (mode) {
case 'date':
case 'week': {
Expand All @@ -318,5 +318,4 @@ export function getCellDateDisabled<DateType>({
return getDisabledFromRange('year', startYear, endYear);
}
}
return false;
}

0 comments on commit 1329de9

Please sign in to comment.