diff --git a/src/hooks/useLocalStorage.tsx b/src/hooks/useLocalStorage.tsx index dd1ded94..a7c7d405 100644 --- a/src/hooks/useLocalStorage.tsx +++ b/src/hooks/useLocalStorage.tsx @@ -34,7 +34,6 @@ const getLocalStorageServerSnapshot = () => { export function useLocalStorage(key: string, initialValue: T) { const getSnapshot = () => { - // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment const stored = JSON.parse(getLocalStorageItem(key) ?? ''); return JSON.stringify({ ...initialValue, @@ -51,11 +50,8 @@ export function useLocalStorage(key: string, initialValue: T) { const setState = useCallback( (v: unknown) => { try { - /* eslint-disable @typescript-eslint/no-unsafe-call */ - // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment const nextState = typeof v === 'function' ? v(JSON.parse(store || '{}')) : v; - /* eslint-enable @typescript-eslint/no-unsafe-call */ if (nextState === undefined || nextState === null) { removeLocalStorageItem(key);