diff --git a/eslint.config.js b/eslint.config.js index 71a48b1..e27c3f7 100644 --- a/eslint.config.js +++ b/eslint.config.js @@ -27,7 +27,14 @@ export default tseslint.config( "warn", { allowConstantExport: true }, ], - "@typescript-eslint/no-unused-vars": "off", + "@typescript-eslint/no-unused-vars": [ + "error", + { + "argsIgnorePattern": "^_", + "varsIgnorePattern": "^_", + "ignoreRestSiblings": true, + }, + ], "custom/no-placeholder-comments": "error", "no-warning-comments": [ "error", diff --git a/src/components/NoteContent.tsx b/src/components/NoteContent.tsx index 2e7257e..a7a7c30 100644 --- a/src/components/NoteContent.tsx +++ b/src/components/NoteContent.tsx @@ -73,7 +73,7 @@ export function NoteContent({ ); } - } catch (e) { + } catch { // If decoding fails, just render as text parts.push(fullMatch); } diff --git a/src/components/auth/LoginDialog.tsx b/src/components/auth/LoginDialog.tsx index bd45ca1..846f951 100644 --- a/src/components/auth/LoginDialog.tsx +++ b/src/components/auth/LoginDialog.tsx @@ -1,7 +1,7 @@ // NOTE: This file is stable and usually should not be modified. // It is important that all functionality in this file is preserved, and should only be modified if explicitly requested. -import React, { useEffect, useRef, useState } from 'react'; +import React, { useRef, useState } from 'react'; import { Shield, Upload } from 'lucide-react'; import { Button } from '@/components/ui/button.tsx'; import { Input } from '@/components/ui/input.tsx'; diff --git a/src/hooks/useToast.ts b/src/hooks/useToast.ts index 2c14125..62cc2e2 100644 --- a/src/hooks/useToast.ts +++ b/src/hooks/useToast.ts @@ -15,13 +15,6 @@ type ToasterToast = ToastProps & { action?: ToastActionElement } -const actionTypes = { - ADD_TOAST: "ADD_TOAST", - UPDATE_TOAST: "UPDATE_TOAST", - DISMISS_TOAST: "DISMISS_TOAST", - REMOVE_TOAST: "REMOVE_TOAST", -} as const - let count = 0 function genId() { @@ -29,23 +22,21 @@ function genId() { return count.toString() } -type ActionType = typeof actionTypes - type Action = | { - type: ActionType["ADD_TOAST"] + type: "ADD_TOAST"; toast: ToasterToast } | { - type: ActionType["UPDATE_TOAST"] + type: "UPDATE_TOAST"; toast: Partial } | { - type: ActionType["DISMISS_TOAST"] + type: "DISMISS_TOAST"; toastId?: ToasterToast["id"] } | { - type: ActionType["REMOVE_TOAST"] + type: "REMOVE_TOAST"; toastId?: ToasterToast["id"] }