configure lint staged (#588)

* chore: upgrade monorepo deps

* chore: configure lint-staged

* refactor: lenient use of any
This commit is contained in:
Carlos Valente
2023-11-13 22:04:55 +01:00
committed by GitHub
parent 140daef7e7
commit a41fe8806b
22 changed files with 1107 additions and 514 deletions
+1 -1
View File
@@ -1,4 +1,4 @@
export function isNumeric(num: any) {
export function isNumeric(num: unknown) {
if (typeof num === 'number' && !isNaN(num)) {
return true;
}
@@ -8,7 +8,7 @@ import { dayInMs } from '../timeConstants.js';
* @param {EndAction} [fallback]
*/
export function validateEndAction(maybeAction: unknown, fallback = EndAction.None) {
return Object.values(EndAction).includes(maybeAction as any) ? (maybeAction as EndAction) : fallback;
return Object.values(EndAction).includes(maybeAction as EndAction) ? (maybeAction as EndAction) : fallback;
}
/**
@@ -17,7 +17,7 @@ export function validateEndAction(maybeAction: unknown, fallback = EndAction.Non
* @param {TimerType} [fallback]
*/
export function validateTimerType(maybeTimerType: unknown, fallback = TimerType.CountDown) {
return Object.values(TimerType).includes(maybeTimerType as any) ? (maybeTimerType as TimerType) : fallback;
return Object.values(TimerType).includes(maybeTimerType as TimerType) ? (maybeTimerType as TimerType) : fallback;
}
/**