fix: resolve all 8 pre-existing lint errors (closes #29)
Fixed @typescript-eslint/no-explicit-any (4 occurrences): - FolderEditModal.tsx: proper error type checking instead of any - StepForm.tsx: explicit union type for visibility select - StepLibraryBrowser.tsx: explicit union types for stepType and sortBy selects Fixed react-hooks/set-state-in-effect (1 occurrence): - NodeEditorModal.tsx: replaced useEffect with direct state comparison Fixed @typescript-eslint/no-unused-vars (3 occurrences): - NodeEditorModal.tsx: removed unused useEffect import - NodeEditorModal.tsx: added eslint-disable for intentionally destructured children - usePermissions.ts: removed unused _tree parameter from canDeleteTree - TreeLibraryPage.tsx: updated canDeleteTree call site Fixed @typescript-eslint/no-empty-object-type (1 occurrence): - types/step.ts: changed empty interface to type alias Verification: - npm run lint: 0 errors (9 warnings are intentional exhaustive-deps) - npm run build: succeeds - TypeScript compilation: passes Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -164,7 +164,7 @@ export function StepLibraryBrowser({ onInsert, onCreateNew, showCreateButton = f
|
||||
<select
|
||||
aria-label="Filter by step type"
|
||||
value={selectedStepType || ''}
|
||||
onChange={(e) => setSelectedStepType((e.target.value as any) || undefined)}
|
||||
onChange={(e) => setSelectedStepType((e.target.value as 'decision' | 'action' | 'solution') || undefined)}
|
||||
className="rounded-md border border-input bg-background px-3 py-2 text-sm focus:outline-none focus:ring-2 focus:ring-ring"
|
||||
>
|
||||
<option value="">All Types</option>
|
||||
@@ -190,7 +190,7 @@ export function StepLibraryBrowser({ onInsert, onCreateNew, showCreateButton = f
|
||||
<select
|
||||
aria-label="Sort steps by"
|
||||
value={sortBy}
|
||||
onChange={(e) => setSortBy(e.target.value as any)}
|
||||
onChange={(e) => setSortBy(e.target.value as 'recent' | 'popular' | 'highest_rated' | 'most_used')}
|
||||
className="rounded-md border border-input bg-background px-3 py-2 text-sm focus:outline-none focus:ring-2 focus:ring-ring"
|
||||
>
|
||||
<option value="recent">Most Recent</option>
|
||||
|
||||
Reference in New Issue
Block a user