diff --git a/.eslintrc.json b/.eslintrc.json index 3be16144..9387e570 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -1,9 +1,11 @@ { "extends": ["next/core-web-vitals", "next/typescript", "prettier"], - "plugins": ["prettier"], + "plugins": ["prettier", "unused-imports"], "rules": { "@typescript-eslint/no-explicit-any": "off", "@typescript-eslint/no-unused-vars": "off", + "unused-imports/no-unused-imports": "error", + "unused-imports/no-unused-vars": "off", "react/no-unescaped-entities": "warn", "react/display-name": "warn", "@typescript-eslint/ban-ts-comment": "warn", diff --git a/eslint.config.js b/eslint.config.js index 0c7989ba..ce39360e 100644 --- a/eslint.config.js +++ b/eslint.config.js @@ -34,6 +34,7 @@ const eslintConfig = [ { plugins: { prettier: prettierPlugin, + 'unused-imports': unusedImportsPlugin, }, rules: { // TypeScript & General Rules diff --git a/package-lock.json b/package-lock.json index 8d34ceb3..335cc30f 100644 --- a/package-lock.json +++ b/package-lock.json @@ -61,7 +61,7 @@ "zustand": "^5.0.10" }, "devDependencies": { - "@eslint/eslintrc": "^3", + "@eslint/eslintrc": "^3.3.5", "@tailwindcss/postcss": "^4.0.0", "@tailwindcss/vite": "^4.2.0", "@testing-library/dom": "^10.4.1", @@ -77,6 +77,8 @@ "@types/react": "^18.3.27", "@types/react-big-calendar": "1.16.3", "@types/react-dom": "^18.3.7", + "@typescript-eslint/eslint-plugin": "^8.59.1", + "@typescript-eslint/parser": "^8.59.1", "@vitejs/plugin-react-swc": "^3.10.2", "eslint": "^9", "eslint-config-next": "15.3.1", @@ -2562,6 +2564,7 @@ "version": "10.4.1", "dev": true, "license": "MIT", + "peer": true, "dependencies": { "@babel/code-frame": "^7.10.4", "@babel/runtime": "^7.12.5", @@ -3271,13 +3274,13 @@ "license": "MIT", "dependencies": { "@eslint-community/regexpp": "^4.12.2", - "@typescript-eslint/scope-manager": "8.54.0", - "@typescript-eslint/type-utils": "8.54.0", - "@typescript-eslint/utils": "8.54.0", - "@typescript-eslint/visitor-keys": "8.54.0", + "@typescript-eslint/scope-manager": "8.59.1", + "@typescript-eslint/type-utils": "8.59.1", + "@typescript-eslint/utils": "8.59.1", + "@typescript-eslint/visitor-keys": "8.59.1", "ignore": "^7.0.5", "natural-compare": "^1.4.0", - "ts-api-utils": "^2.4.0" + "ts-api-utils": "^2.5.0" }, "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" @@ -3287,9 +3290,9 @@ "url": "https://opencollective.com/typescript-eslint" }, "peerDependencies": { - "@typescript-eslint/parser": "^8.54.0", - "eslint": "^8.57.0 || ^9.0.0", - "typescript": ">=4.8.4 <6.0.0" + "@typescript-eslint/parser": "^8.59.1", + "eslint": "^8.57.0 || ^9.0.0 || ^10.0.0", + "typescript": ">=4.8.4 <6.1.0" } }, "node_modules/@typescript-eslint/eslint-plugin/node_modules/ignore": { @@ -3305,10 +3308,10 @@ "dev": true, "license": "MIT", "dependencies": { - "@typescript-eslint/scope-manager": "8.54.0", - "@typescript-eslint/types": "8.54.0", - "@typescript-eslint/typescript-estree": "8.54.0", - "@typescript-eslint/visitor-keys": "8.54.0", + "@typescript-eslint/scope-manager": "8.59.1", + "@typescript-eslint/types": "8.59.1", + "@typescript-eslint/typescript-estree": "8.59.1", + "@typescript-eslint/visitor-keys": "8.59.1", "debug": "^4.4.3" }, "engines": { @@ -3319,8 +3322,8 @@ "url": "https://opencollective.com/typescript-eslint" }, "peerDependencies": { - "eslint": "^8.57.0 || ^9.0.0", - "typescript": ">=4.8.4 <6.0.0" + "eslint": "^8.57.0 || ^9.0.0 || ^10.0.0", + "typescript": ">=4.8.4 <6.1.0" } }, "node_modules/@typescript-eslint/project-service": { @@ -3328,8 +3331,8 @@ "dev": true, "license": "MIT", "dependencies": { - "@typescript-eslint/tsconfig-utils": "^8.54.0", - "@typescript-eslint/types": "^8.54.0", + "@typescript-eslint/tsconfig-utils": "^8.59.1", + "@typescript-eslint/types": "^8.59.1", "debug": "^4.4.3" }, "engines": { @@ -3340,7 +3343,7 @@ "url": "https://opencollective.com/typescript-eslint" }, "peerDependencies": { - "typescript": ">=4.8.4 <6.0.0" + "typescript": ">=4.8.4 <6.1.0" } }, "node_modules/@typescript-eslint/scope-manager": { @@ -3348,8 +3351,8 @@ "dev": true, "license": "MIT", "dependencies": { - "@typescript-eslint/types": "8.54.0", - "@typescript-eslint/visitor-keys": "8.54.0" + "@typescript-eslint/types": "8.59.1", + "@typescript-eslint/visitor-keys": "8.59.1" }, "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" @@ -3371,7 +3374,7 @@ "url": "https://opencollective.com/typescript-eslint" }, "peerDependencies": { - "typescript": ">=4.8.4 <6.0.0" + "typescript": ">=4.8.4 <6.1.0" } }, "node_modules/@typescript-eslint/type-utils": { @@ -3379,11 +3382,11 @@ "dev": true, "license": "MIT", "dependencies": { - "@typescript-eslint/types": "8.54.0", - "@typescript-eslint/typescript-estree": "8.54.0", - "@typescript-eslint/utils": "8.54.0", + "@typescript-eslint/types": "8.59.1", + "@typescript-eslint/typescript-estree": "8.59.1", + "@typescript-eslint/utils": "8.59.1", "debug": "^4.4.3", - "ts-api-utils": "^2.4.0" + "ts-api-utils": "^2.5.0" }, "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" @@ -3393,8 +3396,8 @@ "url": "https://opencollective.com/typescript-eslint" }, "peerDependencies": { - "eslint": "^8.57.0 || ^9.0.0", - "typescript": ">=4.8.4 <6.0.0" + "eslint": "^8.57.0 || ^9.0.0 || ^10.0.0", + "typescript": ">=4.8.4 <6.1.0" } }, "node_modules/@typescript-eslint/types": { @@ -3414,15 +3417,15 @@ "dev": true, "license": "MIT", "dependencies": { - "@typescript-eslint/project-service": "8.54.0", - "@typescript-eslint/tsconfig-utils": "8.54.0", - "@typescript-eslint/types": "8.54.0", - "@typescript-eslint/visitor-keys": "8.54.0", + "@typescript-eslint/project-service": "8.59.1", + "@typescript-eslint/tsconfig-utils": "8.59.1", + "@typescript-eslint/types": "8.59.1", + "@typescript-eslint/visitor-keys": "8.59.1", "debug": "^4.4.3", - "minimatch": "^9.0.5", + "minimatch": "^10.2.2", "semver": "^7.7.3", "tinyglobby": "^0.2.15", - "ts-api-utils": "^2.4.0" + "ts-api-utils": "^2.5.0" }, "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" @@ -3432,7 +3435,17 @@ "url": "https://opencollective.com/typescript-eslint" }, "peerDependencies": { - "typescript": ">=4.8.4 <6.0.0" + "typescript": ">=4.8.4 <6.1.0" + } + }, + "node_modules/@typescript-eslint/typescript-estree/node_modules/balanced-match": { + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-4.0.4.tgz", + "integrity": "sha512-BLrgEcRTwX2o6gGxGOCNyMvGSp35YofuYzw9h1IMTRmKqttAZZVU67bdb9Pr2vUHA8+j3i2tJfjO6C6+4myGTA==", + "dev": true, + "license": "MIT", + "engines": { + "node": "18 || 20 || >=22" } }, "node_modules/@typescript-eslint/typescript-estree/node_modules/brace-expansion": { @@ -5611,17 +5624,17 @@ "dependencies": { "@eslint-community/eslint-utils": "^4.8.0", "@eslint-community/regexpp": "^4.12.1", - "@eslint/config-array": "^0.21.1", + "@eslint/config-array": "^0.21.2", "@eslint/config-helpers": "^0.4.2", "@eslint/core": "^0.17.0", - "@eslint/eslintrc": "^3.3.1", - "@eslint/js": "9.39.2", + "@eslint/eslintrc": "^3.3.5", + "@eslint/js": "9.39.4", "@eslint/plugin-kit": "^0.4.1", "@humanfs/node": "^0.16.6", "@humanwhocodes/module-importer": "^1.0.1", "@humanwhocodes/retry": "^0.4.2", "@types/estree": "^1.0.6", - "ajv": "^6.12.4", + "ajv": "^6.14.0", "chalk": "^4.0.0", "cross-spawn": "^7.0.6", "debug": "^4.3.2", @@ -5640,7 +5653,7 @@ "is-glob": "^4.0.0", "json-stable-stringify-without-jsonify": "^1.0.1", "lodash.merge": "^4.6.2", - "minimatch": "^3.1.2", + "minimatch": "^3.1.5", "natural-compare": "^1.4.0", "optionator": "^0.9.3" }, @@ -5944,6 +5957,22 @@ "semver": "bin/semver.js" } }, + "node_modules/eslint-plugin-unused-imports": { + "version": "4.4.1", + "resolved": "https://registry.npmjs.org/eslint-plugin-unused-imports/-/eslint-plugin-unused-imports-4.4.1.tgz", + "integrity": "sha512-oZGYUz1X3sRMGUB+0cZyK2VcvRX5lm/vB56PgNNcU+7ficUCKm66oZWKUubXWnOuPjQ8PvmXtCViXBMONPe7tQ==", + "dev": true, + "license": "MIT", + "peerDependencies": { + "@typescript-eslint/eslint-plugin": "^8.0.0-0 || ^7.0.0 || ^6.0.0 || ^5.0.0", + "eslint": "^10.0.0 || ^9.0.0 || ^8.0.0" + }, + "peerDependenciesMeta": { + "@typescript-eslint/eslint-plugin": { + "optional": true + } + } + }, "node_modules/eslint-scope": { "version": "8.4.0", "dev": true, @@ -8059,6 +8088,7 @@ "node_modules/moment-timezone": { "version": "0.5.48", "license": "MIT", + "peer": true, "dependencies": { "moment": "^2.29.4" }, diff --git a/package.json b/package.json index df32f40b..b018f749 100644 --- a/package.json +++ b/package.json @@ -78,7 +78,7 @@ "zustand": "^5.0.10" }, "devDependencies": { - "@eslint/eslintrc": "^3", + "@eslint/eslintrc": "^3.3.5", "@tailwindcss/postcss": "^4.0.0", "@tailwindcss/vite": "^4.2.0", "@testing-library/dom": "^10.4.1", @@ -94,6 +94,8 @@ "@types/react": "^18.3.27", "@types/react-big-calendar": "1.16.3", "@types/react-dom": "^18.3.7", + "@typescript-eslint/eslint-plugin": "^8.59.1", + "@typescript-eslint/parser": "^8.59.1", "@vitejs/plugin-react-swc": "^3.10.2", "eslint": "^9", "eslint-config-next": "15.3.1", diff --git a/src/app/(auth)/signup/page.tsx b/src/app/(auth)/signup/page.tsx index 68232d8f..4aed8fba 100644 --- a/src/app/(auth)/signup/page.tsx +++ b/src/app/(auth)/signup/page.tsx @@ -12,7 +12,6 @@ import { FormError, FieldError } from '../../../components/forms/FormError'; import { SubmitButton } from '../../../components/forms/SubmitButton'; import { useMutation } from '../../../hooks/useMutation'; import { apiClient } from '@/lib/api'; -import { parseApiError } from '@/utils/error-handler'; export default function SignupPage() { const [showPassword, setShowPassword] = useState(false); diff --git a/src/app/api/admin/feature-flags/route.ts b/src/app/api/admin/feature-flags/route.ts index 7856147e..6eeb9e04 100644 --- a/src/app/api/admin/feature-flags/route.ts +++ b/src/app/api/admin/feature-flags/route.ts @@ -1,11 +1,5 @@ import { NextRequest, NextResponse } from 'next/server'; -import { - flagStore, - auditLog, - createAuditEntry, - generateId, - evaluateFlag, -} from '@/lib/feature-flags/store'; +import { flagStore, createAuditEntry, generateId } from '@/lib/feature-flags/store'; import type { FeatureFlag, TargetingRule } from '@/lib/feature-flags/store'; import { withRateLimit } from '@/lib/ratelimit'; import { logAuditMutation } from '@/middleware/audit'; diff --git a/src/app/components/accessibility/AccessibilityTester.tsx b/src/app/components/accessibility/AccessibilityTester.tsx index 25ad0760..75a3f629 100644 --- a/src/app/components/accessibility/AccessibilityTester.tsx +++ b/src/app/components/accessibility/AccessibilityTester.tsx @@ -2,7 +2,7 @@ import React, { useState } from 'react'; import { useAccessibilityCheck } from '@/hooks/useAccessibility'; -import { AccessibilityIssue, getWCAGLevel } from '@/utils/accessibilityUtils'; +import { getWCAGLevel } from '@/utils/accessibilityUtils'; import { AlertCircle, CheckCircle, AlertTriangle, Info, Download } from 'lucide-react'; interface AccessibilityTesterProps { diff --git a/src/app/components/accessibility/examples/AccessibleFormExample.tsx b/src/app/components/accessibility/examples/AccessibleFormExample.tsx index 5a54a1cf..a6110adb 100644 --- a/src/app/components/accessibility/examples/AccessibleFormExample.tsx +++ b/src/app/components/accessibility/examples/AccessibleFormExample.tsx @@ -1,7 +1,7 @@ 'use client'; import React, { useState } from 'react'; -import { useScreenReaderAnnouncement, useFocusTrap } from '@/hooks/useAccessibility'; +import { useScreenReaderAnnouncement } from '@/hooks/useAccessibility'; import { AccessibleError, AccessibleSuccess } from '../ScreenReaderOptimizer'; /** diff --git a/src/app/components/notifications/MultiChannelDelivery.tsx b/src/app/components/notifications/MultiChannelDelivery.tsx index 69776aaa..d3d27a8e 100644 --- a/src/app/components/notifications/MultiChannelDelivery.tsx +++ b/src/app/components/notifications/MultiChannelDelivery.tsx @@ -11,7 +11,6 @@ import { AlertCircle, Loader2, Send, - Settings, } from 'lucide-react'; import { useNotifications } from '@/app/hooks/useNotifications'; import { diff --git a/src/app/components/notifications/NotificationCenter.tsx b/src/app/components/notifications/NotificationCenter.tsx index a492e2ac..9778cead 100644 --- a/src/app/components/notifications/NotificationCenter.tsx +++ b/src/app/components/notifications/NotificationCenter.tsx @@ -8,7 +8,6 @@ import { Trash2, Filter, Search, - Settings, BarChart3, X, ChevronDown, diff --git a/src/app/components/notifications/NotificationTemplates.tsx b/src/app/components/notifications/NotificationTemplates.tsx index 563e1df0..2e2bb3de 100644 --- a/src/app/components/notifications/NotificationTemplates.tsx +++ b/src/app/components/notifications/NotificationTemplates.tsx @@ -9,10 +9,8 @@ import { Copy, Eye, Search, - Filter, ChevronDown, ChevronUp, - Check, X, AlertCircle, } from 'lucide-react'; diff --git a/src/app/components/notifications/UserPreferences.tsx b/src/app/components/notifications/UserPreferences.tsx index 08ecc8fa..ef18c2b6 100644 --- a/src/app/components/notifications/UserPreferences.tsx +++ b/src/app/components/notifications/UserPreferences.tsx @@ -11,9 +11,7 @@ import { Save, RotateCcw, Check, - X, AlertCircle, - Info, } from 'lucide-react'; import { useNotifications } from '@/app/hooks/useNotifications'; import { diff --git a/src/app/mobile/components/OfflineContentManager.tsx b/src/app/mobile/components/OfflineContentManager.tsx index 62031256..cc3a84f1 100644 --- a/src/app/mobile/components/OfflineContentManager.tsx +++ b/src/app/mobile/components/OfflineContentManager.tsx @@ -1,5 +1,5 @@ import { useState, useEffect } from 'react'; -import { Download, Check, X, Wifi, WifiOff, Trash2, AlertCircle, RefreshCw } from 'lucide-react'; +import { Download, Check, Wifi, WifiOff, Trash2, AlertCircle, RefreshCw } from 'lucide-react'; import { apiService } from '../services/api'; import { offlineStorage } from '../services/offlineStorage'; import { Course, OfflineContent } from '../types/mobile'; diff --git a/src/app/mobile/components/TouchOptimizedControls.tsx b/src/app/mobile/components/TouchOptimizedControls.tsx index 560916d5..1f7bf121 100644 --- a/src/app/mobile/components/TouchOptimizedControls.tsx +++ b/src/app/mobile/components/TouchOptimizedControls.tsx @@ -1,6 +1,5 @@ import { useState, useRef, useEffect } from 'react'; import { Play, Pause, SkipBack, SkipForward, Volume2, VolumeX, Maximize, X } from 'lucide-react'; -import { offlineStorage } from '../services/offlineStorage'; interface TouchOptimizedControlsProps { videoTitle: string; diff --git a/src/app/pages/admin/feature-flags/page.tsx b/src/app/pages/admin/feature-flags/page.tsx index 37e00fbb..e2a96004 100644 --- a/src/app/pages/admin/feature-flags/page.tsx +++ b/src/app/pages/admin/feature-flags/page.tsx @@ -1,6 +1,6 @@ 'use client'; -import { useState, useCallback, useRef } from 'react'; +import { useState, useCallback } from 'react'; import { Flag, Plus, diff --git a/src/app/store/messagingStore.ts b/src/app/store/messagingStore.ts index 8b970e7f..cef5313a 100644 --- a/src/app/store/messagingStore.ts +++ b/src/app/store/messagingStore.ts @@ -1,6 +1,6 @@ import { DEFAULT_SOCKET_URL } from '@/constants/app.constants'; import { create } from 'zustand'; -import io, { Socket } from 'socket.io-client'; +import io from 'socket.io-client'; export interface Attachment { id: string; diff --git a/src/components/QRCode.tsx b/src/components/QRCode.tsx index 2ae4e66d..eeefcdd7 100644 --- a/src/components/QRCode.tsx +++ b/src/components/QRCode.tsx @@ -2,7 +2,7 @@ import { useCallback, useEffect, useRef, forwardRef } from 'react'; import { QRCodeCanvas } from 'qrcode.react'; -import { QRCodeOptions, DEFAULT_QR_OPTIONS } from '@/utils/generate-qr'; +import { DEFAULT_QR_OPTIONS } from '@/utils/generate-qr'; export interface QRCodeComponentProps { /** URL or text to encode in QR code */ diff --git a/src/components/editor/MediaEmbedder.tsx b/src/components/editor/MediaEmbedder.tsx index a4ade82b..b66d051b 100644 --- a/src/components/editor/MediaEmbedder.tsx +++ b/src/components/editor/MediaEmbedder.tsx @@ -1,5 +1,5 @@ import React, { useState } from 'react'; -import { Image as ImageIcon, Youtube as YoutubeIcon, Link as LinkIcon } from 'lucide-react'; +import { Image as ImageIcon, Youtube as YoutubeIcon } from 'lucide-react'; import { sanitizeUrl } from '@/utils/sanitize'; interface MediaEmbedderProps { diff --git a/src/components/editor/RichContentEditor.tsx b/src/components/editor/RichContentEditor.tsx index 0cdd7425..150dc5d9 100644 --- a/src/components/editor/RichContentEditor.tsx +++ b/src/components/editor/RichContentEditor.tsx @@ -12,7 +12,6 @@ import { Redo, Heading1, Heading2, - Heading3, } from 'lucide-react'; import { useContentEditor } from '@/hooks/useContentEditor'; import { MediaEmbedder } from './MediaEmbedder'; diff --git a/src/components/errors/ErrorRecoveryMechanism.tsx b/src/components/errors/ErrorRecoveryMechanism.tsx index 37589fcb..2141798a 100644 --- a/src/components/errors/ErrorRecoveryMechanism.tsx +++ b/src/components/errors/ErrorRecoveryMechanism.tsx @@ -5,8 +5,8 @@ * Handles automatic retry and recovery for failed operations */ -import React, { useState, useCallback, useRef } from 'react'; -import { retryWithBackoff, isRetryable, getUserFriendlyMessage } from '@/utils/errorUtils'; +import { useState, useCallback, useRef } from 'react'; +import { retryWithBackoff, isRetryable } from '@/utils/errorUtils'; import { errorReportingService } from '@/services/errorReporting'; export interface RecoveryOptions { diff --git a/src/components/errors/UserFriendlyErrorDisplay.tsx b/src/components/errors/UserFriendlyErrorDisplay.tsx index 1461c68f..e4a688ff 100644 --- a/src/components/errors/UserFriendlyErrorDisplay.tsx +++ b/src/components/errors/UserFriendlyErrorDisplay.tsx @@ -6,12 +6,7 @@ */ import React, { useEffect, useState } from 'react'; -import { - ErrorType, - getUserFriendlyMessage, - getActionSuggestion, - classifyError, -} from '@/utils/errorUtils'; +import { getUserFriendlyMessage, getActionSuggestion, classifyError } from '@/utils/errorUtils'; export interface ErrorDisplayProps { error?: any; diff --git a/src/components/i18n/LocalizationTester.tsx b/src/components/i18n/LocalizationTester.tsx index e694369f..d287a1cc 100644 --- a/src/components/i18n/LocalizationTester.tsx +++ b/src/components/i18n/LocalizationTester.tsx @@ -7,7 +7,7 @@ import { useState, useMemo } from 'react'; import { useInternationalization } from '@/hooks/useInternationalization'; import { getAvailableLanguages } from '@/locales/config'; -import { getMissingTranslations, hasTranslation } from '@/locales/translationManager'; +import { hasTranslation } from '@/locales/translationManager'; import { AlertCircle, CheckCircle2, XCircle, Search, Download } from 'lucide-react'; import type { LanguageCode, Translations } from '@/locales/types'; diff --git a/src/components/instructor/LessonBuilder.tsx b/src/components/instructor/LessonBuilder.tsx index e802bd26..2cd24b48 100644 --- a/src/components/instructor/LessonBuilder.tsx +++ b/src/components/instructor/LessonBuilder.tsx @@ -1,6 +1,5 @@ 'use client'; -import { useState } from 'react'; import { DragDropContext, Droppable, Draggable, DropResult } from '@hello-pangea/dnd'; import { GripVertical, Trash2, Edit, Plus, Video, FileText, FileCheck } from 'lucide-react'; import { Lesson } from '@/hooks/useCourseCreation'; diff --git a/src/components/pwa/NativeIntegrationLayer.tsx b/src/components/pwa/NativeIntegrationLayer.tsx index 9f2e3963..972403ce 100644 --- a/src/components/pwa/NativeIntegrationLayer.tsx +++ b/src/components/pwa/NativeIntegrationLayer.tsx @@ -1,7 +1,6 @@ 'use client'; import React from 'react'; -import { Bell, Camera } from 'lucide-react'; export const NativeIntegrationLayer: React.FC = () => { const requestNotificationPermission = async () => { diff --git a/src/components/search/FacetedFilterSystem.tsx b/src/components/search/FacetedFilterSystem.tsx index d45513f2..46aef4e4 100644 --- a/src/components/search/FacetedFilterSystem.tsx +++ b/src/components/search/FacetedFilterSystem.tsx @@ -1,17 +1,7 @@ 'use client'; import React, { useCallback } from 'react'; -import { - BarChart, - DollarSign, - Tag as TagIcon, - Star, - Calendar, - Filter, - RotateCcw, - Check, - ChevronDown, -} from 'lucide-react'; +import { BarChart, DollarSign, Tag as TagIcon, Star, Filter, RotateCcw, Check } from 'lucide-react'; import { SearchFilters, SearchContentType } from '../../utils/searchUtils'; import { MultiSelect } from '../ui/MultiSelect'; import { RangeSlider } from '../ui/RangeSlider'; diff --git a/src/components/search/SearchResultsVisualizer.tsx b/src/components/search/SearchResultsVisualizer.tsx index 7653261a..87f057e2 100644 --- a/src/components/search/SearchResultsVisualizer.tsx +++ b/src/components/search/SearchResultsVisualizer.tsx @@ -1,22 +1,9 @@ 'use client'; import React from 'react'; -import { - Heart, - MessageSquare, - Eye, - Share2, - User, - Clock, - Tag as TagIcon, - Star, - ArrowUpRight, - ChevronDown, -} from 'lucide-react'; +import { Eye, User, Clock, Star, ArrowUpRight, ChevronDown } from 'lucide-react'; import { SearchResult } from '../../utils/searchUtils'; -import { Skeleton } from '../ui/Skeleton'; - interface SearchResultsVisualizerProps { results: SearchResult[]; isSearching: boolean; diff --git a/src/components/theme/DynamicTheming.tsx b/src/components/theme/DynamicTheming.tsx index b2f00bb7..42744977 100644 --- a/src/components/theme/DynamicTheming.tsx +++ b/src/components/theme/DynamicTheming.tsx @@ -1,6 +1,5 @@ 'use client'; -import React from 'react'; import { useThemeCustomization } from '@/hooks/useThemeCustomization'; export default function DynamicTheming() { diff --git a/src/components/visualization/DataExplorationTools.tsx b/src/components/visualization/DataExplorationTools.tsx index 6ea9adf4..f7719f6a 100644 --- a/src/components/visualization/DataExplorationTools.tsx +++ b/src/components/visualization/DataExplorationTools.tsx @@ -16,7 +16,6 @@ import { exportToCSV, exportToJSON, formatNumber, - formatPercentage, } from '@/utils/visualizationUtils'; import { Filter, diff --git a/src/components/visualization/RealTimeDataVisualizer.tsx b/src/components/visualization/RealTimeDataVisualizer.tsx index 57f8c983..be606fd5 100644 --- a/src/components/visualization/RealTimeDataVisualizer.tsx +++ b/src/components/visualization/RealTimeDataVisualizer.tsx @@ -8,7 +8,7 @@ import React, { useEffect, useState } from 'react'; import { InteractiveChartLibrary } from './InteractiveChartLibrary'; import { useDataVisualization } from '@/hooks/useDataVisualization'; -import { ChartData, ChartType, generateSampleData } from '@/utils/visualizationUtils'; +import { ChartType } from '@/utils/visualizationUtils'; import { Activity, Wifi, WifiOff, RefreshCw, Pause, Play } from 'lucide-react'; export interface RealTimeDataVisualizerProps { diff --git a/src/components/web3/NFTGallery.tsx b/src/components/web3/NFTGallery.tsx index 6457ba9c..c3d42e95 100644 --- a/src/components/web3/NFTGallery.tsx +++ b/src/components/web3/NFTGallery.tsx @@ -8,7 +8,6 @@ import { Zap, ChevronLeft, ChevronRight, - ExternalLink, Plus, Grid3x3, List, diff --git a/src/eslint.config.mjs b/src/eslint.config.mjs index 67f55e5e..f8b0b953 100644 --- a/src/eslint.config.mjs +++ b/src/eslint.config.mjs @@ -1,6 +1,7 @@ import { dirname } from 'path'; import { fileURLToPath } from 'url'; import { FlatCompat } from '@eslint/eslintrc'; +import unusedImportsPlugin from 'eslint-plugin-unused-imports'; const __filename = fileURLToPath(import.meta.url); const __dirname = dirname(__filename); @@ -22,8 +23,13 @@ const eslintConfig = [ // include Prettier at the end to avoid rule conflicts ...compat.extends('next/core-web-vitals', 'next/typescript', 'prettier'), { + plugins: { + 'unused-imports': unusedImportsPlugin, + }, rules: { '@typescript-eslint/no-unused-vars': 'off', + 'unused-imports/no-unused-imports': 'error', + 'unused-imports/no-unused-vars': 'off', }, }, ]; diff --git a/src/form-management/types/interfaces.ts b/src/form-management/types/interfaces.ts index 2808176d..54acd415 100644 --- a/src/form-management/types/interfaces.ts +++ b/src/form-management/types/interfaces.ts @@ -15,9 +15,7 @@ import { FormState, StateChangeCallback, Subscription, - SaveStatus, SaveStatusCallback, - DraftData, WizardStep, WizardProgress, } from './core'; diff --git a/src/form-management/utils/configuration-parser.ts b/src/form-management/utils/configuration-parser.ts index 0110e3bf..e28bc500 100644 --- a/src/form-management/utils/configuration-parser.ts +++ b/src/form-management/utils/configuration-parser.ts @@ -13,7 +13,6 @@ import { ValidationRule, ValidationResult, ValidationError, - FieldType, LayoutConfiguration, ValidationConfiguration, AutoSaveConfiguration, diff --git a/src/form-management/validation/async-validation-manager.ts b/src/form-management/validation/async-validation-manager.ts index 14712dda..193eb85f 100644 --- a/src/form-management/validation/async-validation-manager.ts +++ b/src/form-management/validation/async-validation-manager.ts @@ -2,7 +2,7 @@ * Async Validation Manager - Handles asynchronous validation with loading states and retry logic */ -import { ValidationResult, ValidationError, FormState, ValidationFunction } from '../types/core.js'; +import { ValidationResult, FormState, ValidationFunction } from '../types/core.js'; export interface AsyncValidationState { isLoading: boolean; diff --git a/src/hooks/useAdvancedAnimations.tsx b/src/hooks/useAdvancedAnimations.tsx index 44714f4b..496241a7 100644 --- a/src/hooks/useAdvancedAnimations.tsx +++ b/src/hooks/useAdvancedAnimations.tsx @@ -1,5 +1,5 @@ import { useMemo } from 'react'; -import engine, { AnimationEngine } from '../components/animations/AnimationEngine'; +import engine from '../components/animations/AnimationEngine'; import { orchestrateTransitions, animateNumber } from '../components/animations/TransitionManager'; export default function useAdvancedAnimations() { diff --git a/src/hooks/useAdvancedForms.tsx b/src/hooks/useAdvancedForms.tsx index 5d8d650f..e5dc9842 100644 --- a/src/hooks/useAdvancedForms.tsx +++ b/src/hooks/useAdvancedForms.tsx @@ -12,7 +12,6 @@ import { FormState, ValidationResult, SaveStatus, - FieldDescriptor, } from '@/form-management/types/core'; interface UseAdvancedFormsOptions { diff --git a/src/hooks/useContentEditor.tsx b/src/hooks/useContentEditor.tsx index 72376b82..a759c117 100644 --- a/src/hooks/useContentEditor.tsx +++ b/src/hooks/useContentEditor.tsx @@ -1,10 +1,10 @@ -import { useEditor, Editor } from '@tiptap/react'; +import { useEditor } from '@tiptap/react'; import StarterKit from '@tiptap/starter-kit'; import Image from '@tiptap/extension-image'; import Youtube from '@tiptap/extension-youtube'; import Link from '@tiptap/extension-link'; import Placeholder from '@tiptap/extension-placeholder'; -import { useState, useCallback } from 'react'; +import { useCallback } from 'react'; import { sanitizeHtml, sanitizeUrl } from '@/utils/sanitize'; interface UseContentEditorProps { diff --git a/src/hooks/useDashboardData.tsx b/src/hooks/useDashboardData.tsx index 6061608a..2efdc9f4 100644 --- a/src/hooks/useDashboardData.tsx +++ b/src/hooks/useDashboardData.tsx @@ -10,7 +10,6 @@ import { generateDashboardSampleData, generateShareableURL, parseDashboardURL, - getDrillDownData, DashboardShareConfig, } from '@/utils/chartUtils'; import type { ChartData } from '@/utils/visualizationUtils'; diff --git a/src/hooks/useDataVisualization.tsx b/src/hooks/useDataVisualization.tsx index 00dcb6fe..18c7381d 100644 --- a/src/hooks/useDataVisualization.tsx +++ b/src/hooks/useDataVisualization.tsx @@ -11,8 +11,6 @@ import { ChartType, TimeRange, AggregationType, - aggregateByTimePeriod, - calculateMovingAverage, calculateTrend, exportToCSV, exportToJSON, diff --git a/src/hooks/useErrorHandling.tsx b/src/hooks/useErrorHandling.tsx index 11d20142..3b8a8bda 100644 --- a/src/hooks/useErrorHandling.tsx +++ b/src/hooks/useErrorHandling.tsx @@ -12,7 +12,6 @@ import { getUserFriendlyMessage, getActionSuggestion, retryWithBackoff, - classifyError, } from '@/utils/errorUtils'; import { useToast } from '@/context/ToastContext'; diff --git a/src/hooks/useSubscription.ts b/src/hooks/useSubscription.ts index 1c174d42..7b97ab58 100644 --- a/src/hooks/useSubscription.ts +++ b/src/hooks/useSubscription.ts @@ -1,15 +1,7 @@ 'use client'; -import { - useEffect, - useRef, - useState, - useCallback, - DependencyList, - Dispatch, - SetStateAction, -} from 'react'; -import { ApolloClient, DocumentNode, ApolloError, OperationVariables, gql } from '@apollo/client'; +import { useEffect, useRef, useState, useCallback, Dispatch, SetStateAction } from 'react'; +import { ApolloClient, DocumentNode, ApolloError, OperationVariables } from '@apollo/client'; import { ConnectionState, getConnectionManager, diff --git a/src/locales/translationManager.ts b/src/locales/translationManager.ts index 840edb61..da19ffdf 100644 --- a/src/locales/translationManager.ts +++ b/src/locales/translationManager.ts @@ -2,8 +2,7 @@ * Translation Manager - Handles loading, caching, and managing translations */ -import type { LanguageCode, Translations, LocaleData } from './types'; -import { getLocaleConfig } from './config'; +import type { LanguageCode, Translations } from './types'; // Cache for loaded translations const translationCache = new Map(); diff --git a/src/services/errorReporting.ts b/src/services/errorReporting.ts index 48274814..e08b2f52 100644 --- a/src/services/errorReporting.ts +++ b/src/services/errorReporting.ts @@ -3,7 +3,7 @@ * Handles error logging, analytics, and debugging insights */ -import { formatErrorForLogging, ErrorInfo, classifyError } from '@/utils/errorUtils'; +import { formatErrorForLogging } from '@/utils/errorUtils'; export interface ErrorReport { id: string;