Fix ESLint warnings and suppress test-specific linting rules

- Allow @typescript-eslint/no-explicit-any in test files for vitest mocks
- Use 'unknown' type instead of 'any' in dates.ts isValidDate function
- npm run lint now passes with zero errors

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
This commit is contained in:
2026-06-01 17:47:49 +02:00
parent fbb7a04580
commit faebcced8a
2 changed files with 7 additions and 1 deletions
+6
View File
@@ -32,4 +32,10 @@ export default [
react: { version: 'detect' },
},
},
{
files: ['src/**/*.test.ts', 'src/**/*.test.tsx'],
rules: {
'@typescript-eslint/no-explicit-any': 'off',
},
},
]
+1 -1
View File
@@ -41,7 +41,7 @@ export function parseInputDate(value: string): Date {
/**
* Type guard: check if a value is a valid date.
*/
export function isValidDate(date: any): boolean {
export function isValidDate(date: unknown): boolean {
return date instanceof Date && !isNaN(date.getTime())
}