diff --git a/eslint.config.js b/eslint.config.js index 7bc09a0..931f4d3 100644 --- a/eslint.config.js +++ b/eslint.config.js @@ -56,7 +56,6 @@ module.exports = [ rules: { '@typescript-eslint/ban-types': 'off', '@typescript-eslint/explicit-function-return-type': 'off', - '@typescript-eslint/no-explicit-any': 'off', '@typescript-eslint/no-unused-vars': [ 'error', { diff --git a/packages/frontend/src/app-history.ts b/packages/frontend/src/app-history.ts index 412a845..6e1e8db 100644 --- a/packages/frontend/src/app-history.ts +++ b/packages/frontend/src/app-history.ts @@ -1,7 +1,7 @@ import { createBrowserHistory, History } from 'history' class AppHistory { - public static getInstance(): History { + public static getInstance(): History { if (!AppHistory.history) { AppHistory.history = createBrowserHistory() } diff --git a/packages/frontend/src/components/text-input.tsx b/packages/frontend/src/components/text-input.tsx index d5e2dc5..1e24ad4 100644 --- a/packages/frontend/src/components/text-input.tsx +++ b/packages/frontend/src/components/text-input.tsx @@ -91,7 +91,7 @@ class TextInput extends React.Component { type={type} placeholder={placeholder} floating={Boolean(floating)} - onBlur={(event: any) => this.onBlur(event)} + onBlur={(event: React.FocusEvent) => this.onBlur(event)} valid={valid} onChange={this.onChange} onKeyDown={onKeyDown} diff --git a/packages/frontend/src/components/text-time-input.tsx b/packages/frontend/src/components/text-time-input.tsx index 3a5bf88..8311d11 100644 --- a/packages/frontend/src/components/text-time-input.tsx +++ b/packages/frontend/src/components/text-time-input.tsx @@ -10,8 +10,8 @@ import Suggestions from './suggestions' import { useValidationHelper } from '../helper/validation-helper' interface TextTimeInputProps { - onSave: (entry: EntryInput) => any - onDelete?: () => any + onSave: (entry: EntryInput) => void + onDelete?: () => void clearOnSave?: boolean entry?: Pick disabled?: boolean diff --git a/packages/frontend/src/global.d.ts b/packages/frontend/src/global.d.ts index e37d11f..4c1c8fc 100644 --- a/packages/frontend/src/global.d.ts +++ b/packages/frontend/src/global.d.ts @@ -13,7 +13,7 @@ declare module '*.woff2' { declare module 'imagetracerjs' declare module '*.json' { - const json: any + const json: unknown export default json } diff --git a/packages/frontend/src/hooks/use-form-toast.ts b/packages/frontend/src/hooks/use-form-toast.ts index 806c88d..4d1e807 100644 --- a/packages/frontend/src/hooks/use-form-toast.ts +++ b/packages/frontend/src/hooks/use-form-toast.ts @@ -1,10 +1,10 @@ import { useEffect, useRef } from 'react' -import { FormState } from 'react-hook-form' +import { FieldValues, FormState } from 'react-hook-form' import strings from '../locales/localization' import { useToastContext } from './use-toast-context' -export const useFormToasts = >(formState: FormState): void => { +export const useFormToasts = (formState: FormState): void => { const { errors } = formState const errorKey = useRef('')