diff --git a/.eslint-baseline.json b/.eslint-baseline.json index 2a416ba48..e1ab6b280 100644 --- a/.eslint-baseline.json +++ b/.eslint-baseline.json @@ -1,6 +1,6 @@ { - "generatedAt": "2026-05-23T00:33:24.495Z", - "totalErrors": 442, + "generatedAt": "2026-05-24T01:05:09.416Z", + "totalErrors": 177, "counts": { "src/components/access/DevAccessDeniedPage.tsx": { "react-hooks/exhaustive-deps": 1 @@ -8,18 +8,9 @@ "src/components/admin/OwnershipRepairDialog.tsx": { "@typescript-eslint/naming-convention": 1 }, - "src/components/admin/connections/ConnectionTestHistoryPanel.tsx": { - "@typescript-eslint/no-non-null-assertion": 1 - }, "src/components/admin/connections/ConnectionsOverviewFilters.tsx": { "@typescript-eslint/naming-convention": 1 }, - "src/components/admin/connections/CredentialsSourceIndicator.tsx": { - "@typescript-eslint/no-non-null-assertion": 2 - }, - "src/components/admin/connections/FailedDeliveriesPanel.tsx": { - "@typescript-eslint/no-non-null-assertion": 1 - }, "src/components/admin/connections/IncidentDetailsDrawer.tsx": { "@typescript-eslint/naming-convention": 1 }, @@ -29,29 +20,12 @@ "src/components/admin/connections/JustSavedFlash.tsx": { "@typescript-eslint/naming-convention": 3 }, - "src/components/admin/connections/SecretsManagerHealthPanel.tsx": { - "@typescript-eslint/no-non-null-assertion": 2 - }, - "src/components/admin/connections/SupabaseConnectionsTab.tsx": { - "@typescript-eslint/no-non-null-assertion": 17 - }, "src/components/admin/connections/ZoneSection.tsx": { "@typescript-eslint/naming-convention": 1 }, - "src/components/admin/connections/__tests__/ConnectionUI.test.tsx": { - "@typescript-eslint/no-explicit-any": 3, - "no-duplicate-imports": 1 - }, - "src/components/admin/connections/__tests__/ConnectionsOverviewTable.test.tsx": { - "@typescript-eslint/no-explicit-any": 7, - "no-duplicate-imports": 1 - }, "src/components/admin/connections/useFocusContext.ts": { "@typescript-eslint/naming-convention": 1 }, - "src/components/admin/connections/useSecretField.ts": { - "react-hooks/exhaustive-deps": 1 - }, "src/components/admin/personalization-manager/ProductPersonalizationManager.tsx": { "@typescript-eslint/no-non-null-assertion": 1 }, @@ -97,34 +71,18 @@ "src/components/admin/products/new-supplier/useNewSupplierForm.ts": { "@typescript-eslint/no-non-null-assertion": 1 }, - "src/components/admin/products/sections/ProductClassificationSection.tsx": { - "@typescript-eslint/naming-convention": 1, - "@typescript-eslint/no-non-null-assertion": 5 - }, "src/components/admin/products/useProductsManager.ts": { "react-hooks/exhaustive-deps": 5 }, "src/components/admin/security/HardeningHealthCard.tsx": { "react-hooks/exhaustive-deps": 1 }, - "src/components/admin/security/keys/UpdateMcpKeyDialog.tsx": { - "@typescript-eslint/no-non-null-assertion": 3 - }, "src/components/admin/security/role-migration/RoleMigrationPanel.tsx": { "@typescript-eslint/naming-convention": 1 }, "src/components/admin/suppliers-manager/useSuppliersManager.ts": { "@typescript-eslint/no-non-null-assertion": 3 }, - "src/components/admin/telemetry/AppHealthDashboard.tsx": { - "@typescript-eslint/no-non-null-assertion": 3 - }, - "src/components/admin/telemetry/BridgeCallDetailDrawer.tsx": { - "@typescript-eslint/no-non-null-assertion": 1 - }, - "src/components/admin/telemetry/RegressionGuardrailBanner.tsx": { - "@typescript-eslint/no-non-null-assertion": 5 - }, "src/components/admin/users/RoleAuditLogPanel.tsx": { "react-hooks/exhaustive-deps": 2 }, @@ -132,45 +90,23 @@ "@typescript-eslint/no-unused-vars": 2 }, "src/components/auth/ForgotPasswordForm.tsx": { - "@typescript-eslint/no-unused-vars": 3 + "@typescript-eslint/no-unused-vars": 2 }, "src/components/auth/KnownDevicesManager.tsx": { "react-hooks/exhaustive-deps": 1 }, - "src/components/auth/PasswordStrengthIndicator.tsx": { - "@typescript-eslint/no-unused-vars": 1 - }, "src/components/bi/BIAiCopilot.tsx": { "@typescript-eslint/no-unused-vars": 1 }, "src/components/bi/ClientAffinityProducts.tsx": { "@typescript-eslint/no-unused-vars": 1 }, - "src/components/bi/ClientComparator.tsx": { - "@typescript-eslint/no-unused-vars": 1 - }, "src/components/bi/ClientSeasonalityHeatmap.tsx": { "@typescript-eslint/no-non-null-assertion": 1 }, - "src/components/bi/ExecutiveSummaryButton.tsx": { - "@typescript-eslint/no-unused-vars": 1 - }, - "src/components/cart/BundleSuggestionCard.tsx": { - "@typescript-eslint/no-non-null-assertion": 1 - }, - "src/components/catalog/BulkVariantWizard.tsx": { - "@typescript-eslint/no-explicit-any": 1, - "@typescript-eslint/no-non-null-assertion": 1 - }, - "src/components/catalog/CatalogContent.tsx": { - "@typescript-eslint/no-unused-vars": 16 - }, "src/components/catalog/CatalogHeader.tsx": { "@typescript-eslint/no-unused-vars": 1 }, - "src/components/categories/CategorySidebarPanel.tsx": { - "@typescript-eslint/no-unused-vars": 2 - }, "src/components/collections/CollectionDetailHeader.tsx": { "@typescript-eslint/no-unused-vars": 2 }, @@ -187,10 +123,7 @@ "@typescript-eslint/no-unused-vars": 1 }, "src/components/compare/ComparisonHighlights.tsx": { - "@typescript-eslint/no-unused-vars": 2 - }, - "src/components/compare/ComparisonScoreCard.tsx": { - "@typescript-eslint/no-non-null-assertion": 1 + "@typescript-eslint/no-unused-vars": 1 }, "src/components/compare/ExportComparisonButton.tsx": { "@typescript-eslint/no-unused-vars": 1 @@ -198,25 +131,10 @@ "src/components/compare/FloatingCompareBar.tsx": { "@typescript-eslint/no-unused-vars": 1 }, - "src/components/compare/OtherSuppliersRow.tsx": { - "@typescript-eslint/no-explicit-any": 1 - }, "src/components/compare/SupplierComparisonModal.tsx": { "@typescript-eslint/no-unused-vars": 2 }, - "src/components/dashboard/MyClientsWidget.tsx": { - "@typescript-eslint/no-non-null-assertion": 2 - }, - "src/components/dashboard/MyDiscountRequestsWidget.tsx": { - "@typescript-eslint/no-non-null-assertion": 1 - }, - "src/components/dashboard/MyRecentQuotesWidget.tsx": { - "@typescript-eslint/no-non-null-assertion": 1 - }, "src/components/dashboard/QuickActionsPanel.tsx": { - "@typescript-eslint/no-unused-vars": 7 - }, - "src/components/dashboard/RecentKitsWidget.tsx": { "@typescript-eslint/no-unused-vars": 1 }, "src/components/dev/DiagnosticProfiler.tsx": { @@ -231,33 +149,21 @@ "src/components/engraving/PricingPanel.tsx": { "@typescript-eslint/no-unused-vars": 1 }, - "src/components/expert/ExpertChatDialog.tsx": { - "@typescript-eslint/no-unused-vars": 1 - }, "src/components/expert/FlowFilterPanel.tsx": { "@typescript-eslint/no-unused-expressions": 1 }, "src/components/expert/FlowFilterPrimitives.tsx": { "@typescript-eslint/naming-convention": 2 }, - "src/components/expert/ProductLinkRenderer.tsx": { - "@typescript-eslint/no-non-null-assertion": 3 - }, "src/components/expert/chat/useExpertChat.ts": { "@typescript-eslint/no-unused-expressions": 2, "react-hooks/exhaustive-deps": 3 }, - "src/components/filters/ColorGroupFilter.tsx": { - "@typescript-eslint/no-unused-vars": 2 - }, "src/components/filters/CommemorativeDateFilter.tsx": { - "@typescript-eslint/no-unused-vars": 2 - }, - "src/components/filters/ExternalCategoryFilter.tsx": { "@typescript-eslint/no-unused-vars": 1 }, "src/components/filters/FilterPanel.tsx": { - "@typescript-eslint/no-unused-vars": 6 + "@typescript-eslint/no-unused-vars": 5 }, "src/components/filters/InlineColorGroupFilter.tsx": { "@typescript-eslint/no-unused-expressions": 1 @@ -265,88 +171,35 @@ "src/components/filters/filter-panel/FilterSection.tsx": { "@typescript-eslint/naming-convention": 1 }, - "src/components/filters/filter-panel/sections/SizeFilter.tsx": { - "@typescript-eslint/no-unused-vars": 2 - }, "src/components/filters/filter-panel/useFilterPanelState.ts": { "react-hooks/exhaustive-deps": 3 }, "src/components/intelligence/CategoryRanking.tsx": { "react-hooks/exhaustive-deps": 1 }, - "src/components/intelligence/IntelligenceFilterBar.tsx": { - "@typescript-eslint/no-unused-vars": 1 - }, "src/components/intelligence/MarketIntelligenceChart.tsx": { "@typescript-eslint/no-unused-vars": 1 }, - "src/components/intelligence/ProductRankingSearch.tsx": { - "@typescript-eslint/no-non-null-assertion": 2 - }, - "src/components/intelligence/RankingFilterToolbar.tsx": { - "@typescript-eslint/no-unused-vars": 2 - }, "src/components/intelligence/RealtimeBadge.tsx": { "@typescript-eslint/no-unused-vars": 1 }, - "src/components/intelligence/SalesOverviewChart.tsx": { - "@typescript-eslint/no-non-null-assertion": 1, - "@typescript-eslint/no-unused-vars": 2 - }, - "src/components/intelligence/SegmentAnalysis.tsx": { - "@typescript-eslint/no-unused-vars": 1 - }, - "src/components/intelligence/SupplierSales.tsx": { - "@typescript-eslint/no-non-null-assertion": 3 - }, - "src/components/intelligence/TrendingProducts.tsx": { - "@typescript-eslint/no-non-null-assertion": 1 - }, "src/components/inventory/FutureStockDialog.tsx": { "@typescript-eslint/naming-convention": 1, "@typescript-eslint/no-non-null-assertion": 1 }, - "src/components/inventory/StockAlertDialogs.tsx": { - "@typescript-eslint/no-unused-vars": 2 - }, - "src/components/inventory/StockCategoryTreeSelect.tsx": { - "@typescript-eslint/no-unused-vars": 1 - }, - "src/components/inventory/StockDashboard.tsx": { - "@typescript-eslint/no-unused-vars": 1 - }, "src/components/inventory/StockFilterToolbar.tsx": { - "@typescript-eslint/no-unused-vars": 4, + "@typescript-eslint/no-unused-vars": 3, "react-hooks/exhaustive-deps": 2 }, - "src/components/inventory/risk/ProductRiskDetail.tsx": { - "@typescript-eslint/no-non-null-assertion": 1, - "@typescript-eslint/no-unused-vars": 1 - }, "src/components/inventory/risk/RiskKpi.tsx": { "@typescript-eslint/naming-convention": 1 }, - "src/components/kit-builder/BoxSelector.tsx": { - "@typescript-eslint/no-unused-vars": 1 - }, - "src/components/kit-builder/DiscontinuedItemsAlert.tsx": { - "@typescript-eslint/no-unused-vars": 2 - }, "src/components/kit-builder/KitBuilderHeader.tsx": { "@typescript-eslint/no-unused-vars": 1 }, - "src/components/kit-builder/KitIsometricPreview.tsx": { - "@typescript-eslint/no-unused-vars": 1 - }, - "src/components/kit-builder/KitSummary.tsx": { - "@typescript-eslint/no-unused-vars": 1 - }, "src/components/kit-builder/SelectedItemsBadges.tsx": { "@typescript-eslint/no-unused-vars": 1 }, - "src/components/kit-builder/SimilarKitsWidget.tsx": { - "@typescript-eslint/no-unused-vars": 1 - }, "src/components/kit-builder/VariantSelector.tsx": { "@typescript-eslint/no-non-null-assertion": 1, "@typescript-eslint/no-unused-vars": 1 @@ -354,14 +207,11 @@ "src/components/kit-builder/kit-summary/KitCompositionCard.tsx": { "@typescript-eslint/no-non-null-assertion": 2 }, - "src/components/layout/GlobalOverlay.tsx": { - "@typescript-eslint/no-unused-vars": 4 - }, "src/components/layout/MainLayout.tsx": { "react-hooks/exhaustive-deps": 1 }, "src/components/layout/SidebarReorganized.tsx": { - "@typescript-eslint/no-unused-vars": 5 + "@typescript-eslint/no-unused-vars": 4 }, "src/components/layout/sidebar/SidebarNavGroup.tsx": { "react-hooks/exhaustive-deps": 1 @@ -380,33 +230,15 @@ "@typescript-eslint/no-non-null-assertion": 1, "@typescript-eslint/no-unused-vars": 3 }, - "src/components/mobile/MobileProductActions.tsx": { - "@typescript-eslint/no-unused-vars": 2 - }, - "src/components/mobile/SmartMobileNav.tsx": { - "@typescript-eslint/no-unused-vars": 8 - }, "src/components/mockup/KeyboardShortcuts.tsx": { "react-hooks/exhaustive-deps": 1 }, "src/components/mockup/LogoColorAnalyzer.tsx": { - "@typescript-eslint/no-unused-vars": 2 - }, - "src/components/mockup/MockupConfigPanel.tsx": { - "@typescript-eslint/no-unused-vars": 2 + "@typescript-eslint/no-unused-vars": 1 }, "src/components/mockup/MockupHistoryPanel.tsx": { "react-hooks/exhaustive-deps": 1 }, - "src/components/mockup/MockupProductSelector.tsx": { - "@typescript-eslint/no-unused-vars": 3 - }, - "src/components/mockup/MockupResultCard.tsx": { - "@typescript-eslint/no-unused-vars": 1 - }, - "src/components/mockup/MockupWizard.tsx": { - "@typescript-eslint/no-unused-vars": 1 - }, "src/components/mockup/ProductSearchCombobox.tsx": { "@typescript-eslint/no-non-null-assertion": 2 }, @@ -420,20 +252,11 @@ "src/components/mockup/logo-editor/LogoPreviewCanvas.tsx": { "@typescript-eslint/no-non-null-assertion": 1 }, - "src/components/navigation/DynamicBreadcrumbs.tsx": { - "@typescript-eslint/no-unused-vars": 1 - }, - "src/components/notifications/NotificationDrawer.tsx": { - "@typescript-eslint/no-unused-vars": 1 - }, "src/components/notifications/NotificationsBadgeStatsPanel.tsx": { "react-hooks/exhaustive-deps": 1 }, "src/components/notifications/badge-stats/EfficiencyGrid.tsx": { - "@typescript-eslint/no-unused-vars": 4 - }, - "src/components/notifications/badge-stats/useNotificationsMetricsPanel.ts": { - "@typescript-eslint/no-unused-vars": 2 + "@typescript-eslint/no-unused-vars": 3 }, "src/components/novelties/NoveltyProductGrid.tsx": { "@typescript-eslint/no-non-null-assertion": 1, @@ -442,15 +265,8 @@ "src/components/novelties/NoveltyStatsCards.tsx": { "@typescript-eslint/no-unused-vars": 1 }, - "src/components/onboarding/OnboardingTour.tsx": { - "@typescript-eslint/no-unused-vars": 5 - }, - "src/components/pdf/PropostaComercialTailwind.tsx": { - "@typescript-eslint/no-unused-vars": 1 - }, "src/components/pdf/proposal/LogoWithTransparentBg.tsx": { - "@typescript-eslint/no-non-null-assertion": 3, - "@typescript-eslint/no-unused-vars": 1 + "@typescript-eslint/no-non-null-assertion": 3 }, "src/components/pdf/proposal/ProposalFooter.tsx": { "@typescript-eslint/no-unused-vars": 2 @@ -461,47 +277,31 @@ "src/components/presentation/PresentationMode.tsx": { "react-hooks/exhaustive-deps": 1 }, - "src/components/pricing/ProductPriceSimulator.tsx": { - "@typescript-eslint/no-unused-vars": 1 - }, "src/components/pricing/QuantityPriceCalculator.tsx": { "@typescript-eslint/no-unused-vars": 3 }, "src/components/pricing/simulator/CustomizationOptions.tsx": { "@typescript-eslint/no-unused-vars": 1 }, - "src/components/pricing/simulator/EngravingList.tsx": { - "@typescript-eslint/no-unused-vars": 1 - }, "src/components/pricing/simulator/MultiEngravingResult.tsx": { "@typescript-eslint/no-non-null-assertion": 2, - "@typescript-eslint/no-unused-vars": 2 - }, - "src/components/pricing/simulator/PriceResultV51.tsx": { - "@typescript-eslint/no-unused-vars": 2 + "@typescript-eslint/no-unused-vars": 1 }, "src/components/pricing/simulator/ProductVariantSelector.tsx": { "@typescript-eslint/no-non-null-assertion": 1 }, "src/components/pricing/simulator/QuantityAndResult.tsx": { - "@typescript-eslint/no-unused-vars": 5 + "@typescript-eslint/no-unused-vars": 2 }, "src/components/pricing/simulator/TechniqueSelector.tsx": { "@typescript-eslint/no-non-null-assertion": 3, "react-hooks/exhaustive-deps": 1 }, "src/components/products/BulkActionBar.tsx": { - "@typescript-eslint/naming-convention": 1, - "@typescript-eslint/no-unused-vars": 1 - }, - "src/components/products/FutureStockModal.tsx": { - "@typescript-eslint/no-unused-vars": 1 - }, - "src/components/products/PackagingModal.tsx": { - "@typescript-eslint/no-unused-vars": 1 + "@typescript-eslint/naming-convention": 1 }, "src/components/products/ProductCard.tsx": { - "@typescript-eslint/no-unused-vars": 4 + "@typescript-eslint/no-unused-vars": 2 }, "src/components/products/ProductCardActions.tsx": { "@typescript-eslint/naming-convention": 1 @@ -519,16 +319,14 @@ "react-hooks/exhaustive-deps": 1 }, "src/components/products/ProductGallery.tsx": { - "@typescript-eslint/no-unused-expressions": 1, - "@typescript-eslint/no-unused-vars": 1 + "@typescript-eslint/no-unused-expressions": 1 }, "src/components/products/ProductGrid.test.tsx": { - "@typescript-eslint/no-explicit-any": 7, - "@typescript-eslint/no-unused-vars": 1 + "@typescript-eslint/no-explicit-any": 7 }, "src/components/products/ProductGrid.tsx": { "@typescript-eslint/no-explicit-any": 2, - "@typescript-eslint/no-unused-vars": 2 + "@typescript-eslint/no-unused-vars": 1 }, "src/components/products/ProductInfoBar.tsx": { "@typescript-eslint/no-unused-vars": 1 @@ -541,9 +339,6 @@ "@typescript-eslint/no-explicit-any": 2, "@typescript-eslint/no-non-null-assertion": 1 }, - "src/components/products/ProductListItem.tsx": { - "@typescript-eslint/no-unused-vars": 11 - }, "src/components/products/ProductPersonalizationRules.tsx": { "@typescript-eslint/no-unused-vars": 1 }, @@ -551,47 +346,17 @@ "@typescript-eslint/naming-convention": 1, "@typescript-eslint/no-unused-vars": 1 }, - "src/components/products/ProductQuickView.tsx": { - "@typescript-eslint/no-unused-vars": 16 - }, "src/components/products/ProductSparkline.tsx": { - "@typescript-eslint/no-unused-vars": 2, "react-hooks/exhaustive-deps": 1 }, - "src/components/products/ProductStickyHeader.tsx": { - "@typescript-eslint/no-unused-vars": 1 - }, "src/components/products/ProductTableView.tsx": { "@typescript-eslint/no-explicit-any": 1, - "@typescript-eslint/no-unused-vars": 4, + "@typescript-eslint/no-unused-vars": 1, "react-hooks/exhaustive-deps": 1 }, - "src/components/products/QuickAddToQuote.tsx": { - "@typescript-eslint/no-unused-vars": 1 - }, - "src/components/products/RecentlyViewedBar.tsx": { - "@typescript-eslint/no-unused-vars": 1 - }, - "src/components/products/RelatedProducts.tsx": { - "@typescript-eslint/no-unused-vars": 1 - }, - "src/components/products/SalesHistoryChart.tsx": { - "@typescript-eslint/no-non-null-assertion": 2, - "@typescript-eslint/no-unused-vars": 1 - }, "src/components/products/SimilarProducts.tsx": { "@typescript-eslint/no-unused-vars": 1 }, - "src/components/products/SingleVariantPicker.tsx": { - "@typescript-eslint/no-non-null-assertion": 1, - "@typescript-eslint/no-unused-vars": 1 - }, - "src/components/products/StockHistoryChart.tsx": { - "@typescript-eslint/no-non-null-assertion": 1 - }, - "src/components/products/SupplierComparisonCards.tsx": { - "@typescript-eslint/no-unused-vars": 2 - }, "src/components/products/VariantGridMatrix.tsx": { "@typescript-eslint/no-non-null-assertion": 1 }, @@ -599,19 +364,11 @@ "react-hooks/exhaustive-deps": 1 }, "src/components/products/customization/ConfigurationPanel.tsx": { - "@typescript-eslint/no-non-null-assertion": 1, - "@typescript-eslint/no-unused-vars": 1 - }, - "src/components/products/customization/LocationCard.tsx": { - "@typescript-eslint/no-non-null-assertion": 1, - "@typescript-eslint/no-unused-vars": 1 + "@typescript-eslint/no-non-null-assertion": 1 }, "src/components/products/customization/LocationPanel.tsx": { "react-hooks/exhaustive-deps": 1 }, - "src/components/products/customization/__tests__/LocationPanelAdvanced.test.tsx": { - "@typescript-eslint/no-unused-vars": 1 - }, "src/components/products/customization/__tests__/LocationPanelPrice.test.tsx": { "@typescript-eslint/no-explicit-any": 1, "react-hooks/exhaustive-deps": 1 @@ -623,105 +380,59 @@ "@typescript-eslint/naming-convention": 1 }, "src/components/products/share/ShareAllColorsDialog.tsx": { - "@typescript-eslint/no-non-null-assertion": 1, - "@typescript-eslint/no-unused-vars": 1 - }, - "src/components/products/share/SharePreviewDialog.tsx": { "@typescript-eslint/no-non-null-assertion": 1 }, "src/components/products/share/usePhotoDownload.ts": { "@typescript-eslint/no-unused-vars": 1 }, - "src/components/products/useStockChartData.ts": { - "@typescript-eslint/no-non-null-assertion": 2, - "@typescript-eslint/no-unused-vars": 1, - "react-hooks/exhaustive-deps": 1 - }, "src/components/products/zoomable-gallery/useGalleryZoom.ts": { "react-hooks/exhaustive-deps": 1 }, "src/components/providers/AppBootstrap.tsx": { - "@typescript-eslint/no-unused-vars": 3 - }, - "src/components/quotes/AdminTemplatesManager.tsx": { "@typescript-eslint/no-unused-vars": 1 }, - "src/components/quotes/MarginInsightBadge.tsx": { - "@typescript-eslint/no-non-null-assertion": 4 - }, "src/components/quotes/PdfGenerationDialog.tsx": { - "@typescript-eslint/no-unused-vars": 11 + "@typescript-eslint/no-unused-vars": 4 }, "src/components/quotes/QuickQuoteFAB.tsx": { "@typescript-eslint/no-unused-vars": 2 }, "src/components/quotes/QuoteAutoSave.tsx": { - "@typescript-eslint/no-unused-vars": 3, + "@typescript-eslint/no-unused-vars": 1, "react-hooks/exhaustive-deps": 2 }, "src/components/quotes/QuoteBuilderNavigation.tsx": { "@typescript-eslint/consistent-type-imports": 1 }, "src/components/quotes/QuoteBuilderProductSearch.tsx": { - "@typescript-eslint/no-non-null-assertion": 1, - "@typescript-eslint/no-unused-vars": 1 + "@typescript-eslint/no-non-null-assertion": 1 }, "src/components/quotes/QuoteBuilderSummaryColumn.tsx": { - "@typescript-eslint/no-unused-vars": 6 + "@typescript-eslint/no-unused-vars": 1 }, "src/components/quotes/QuoteHistoryPanel.tsx": { "@typescript-eslint/no-unused-vars": 2, "react-hooks/exhaustive-deps": 1 }, - "src/components/quotes/QuoteKanbanBoard.tsx": { - "@typescript-eslint/no-non-null-assertion": 3, - "@typescript-eslint/no-unused-vars": 3 - }, - "src/components/quotes/QuoteProductColorSelector.tsx": { - "@typescript-eslint/no-non-null-assertion": 1, - "@typescript-eslint/no-unused-vars": 1 - }, "src/components/quotes/QuoteProductCustomization.tsx": { "@typescript-eslint/no-explicit-any": 1 }, "src/components/quotes/QuoteSignaturePad.tsx": { "@typescript-eslint/no-non-null-assertion": 2 }, - "src/components/quotes/QuoteStatusTimeline.tsx": { - "@typescript-eslint/no-unused-vars": 2 - }, "src/components/quotes/QuoteTemplatesList.tsx": { "@typescript-eslint/no-unused-vars": 1 }, - "src/components/quotes/QuoteValidityBanner.tsx": { - "@typescript-eslint/no-unused-vars": 1 - }, "src/components/quotes/QuoteVersionCompare.tsx": { - "@typescript-eslint/no-unused-vars": 2, + "@typescript-eslint/no-unused-vars": 1, "react-hooks/exhaustive-deps": 1 }, "src/components/quotes/QuoteVersionHistory.tsx": { - "@typescript-eslint/no-unused-vars": 2, "react-hooks/exhaustive-deps": 1 }, - "src/components/quotes/QuotesConfigurableList.tsx": { - "@typescript-eslint/no-non-null-assertion": 9, - "@typescript-eslint/no-unused-vars": 1 - }, - "src/components/quotes/SaveAsTemplateButton.tsx": { - "@typescript-eslint/no-unused-vars": 1 - }, "src/components/quotes/__tests__/QuoteBuilderDiscount.test.tsx": { "@typescript-eslint/no-explicit-any": 1 }, - "src/components/quotes/__tests__/QuoteBuilderDiscountAdvanced.test.tsx": { - "@typescript-eslint/no-explicit-any": 1, - "@typescript-eslint/no-unused-vars": 1 - }, - "src/components/quotes/__tests__/QuoteBuilderStepper.test.tsx": { - "@typescript-eslint/consistent-type-imports": 1, - "@typescript-eslint/no-unused-vars": 1 - }, "src/components/quotes/company-contact/CompanySearchDropdown.tsx": { "@typescript-eslint/no-explicit-any": 3 }, @@ -732,7 +443,7 @@ "@typescript-eslint/no-explicit-any": 4 }, "src/components/ramo-atividade/RamoAtividadeGroupAccordion.tsx": { - "@typescript-eslint/no-unused-vars": 2 + "@typescript-eslint/no-unused-vars": 1 }, "src/components/ramo-atividade/SegmentoCheckbox.tsx": { "@typescript-eslint/no-unused-vars": 1 @@ -743,9 +454,6 @@ "src/components/replenishments/ReplenishmentProductGrid.tsx": { "react-hooks/exhaustive-deps": 2 }, - "src/components/reports/ScheduledReportsManager.tsx": { - "@typescript-eslint/no-unused-vars": 3 - }, "src/components/search/AdvancedSearch.tsx": { "@typescript-eslint/no-unused-vars": 1, "react-hooks/exhaustive-deps": 1 @@ -754,15 +462,11 @@ "@typescript-eslint/no-unused-vars": 2, "react-hooks/exhaustive-deps": 1 }, - "src/components/search/GlobalSearchHelpers.tsx": { - "@typescript-eslint/no-unused-vars": 1 - }, "src/components/search/GlobalSearchIdleState.tsx": { - "@typescript-eslint/no-unused-vars": 2 + "@typescript-eslint/no-unused-vars": 1 }, "src/components/search/GlobalSearchPalette.tsx": { "@typescript-eslint/no-explicit-any": 1, - "@typescript-eslint/no-unused-vars": 3, "react-hooks/exhaustive-deps": 4 }, "src/components/search/SmartSuggestions.tsx": { @@ -772,85 +476,50 @@ "react-hooks/exhaustive-deps": 1 }, "src/components/search/VoiceSearchOverlay.tsx": { - "@typescript-eslint/no-unused-vars": 1, "react-hooks/exhaustive-deps": 1 }, "src/components/search/VoiceSearchOverlayConnected.tsx": { "react-hooks/exhaustive-deps": 1 }, - "src/components/search/useGlobalSearch.ts": { - "@typescript-eslint/no-non-null-assertion": 2, - "@typescript-eslint/no-unused-vars": 5, - "react-hooks/exhaustive-deps": 5 - }, "src/components/search/voice/VoiceOverlaySections.tsx": { "@typescript-eslint/no-unused-vars": 3 }, - "src/components/security/PushNotificationSettings.tsx": { - "@typescript-eslint/no-unused-vars": 3 - }, "src/components/security/SecurityDashboard.tsx": { "@typescript-eslint/no-non-null-assertion": 2 }, "src/components/security/useSecurityData.ts": { "@typescript-eslint/no-non-null-assertion": 1 }, - "src/components/simulator/MockupPreview.tsx": { - "@typescript-eslint/no-unused-vars": 2 - }, - "src/components/simulator/NicheRecommendationBadge.tsx": { - "@typescript-eslint/no-non-null-assertion": 2, - "@typescript-eslint/no-unused-vars": 1 - }, "src/components/simulator/ScenarioComparison.tsx": { "@typescript-eslint/no-unused-vars": 2 }, "src/components/simulator/TechniqueCard.tsx": { - "@typescript-eslint/no-unused-vars": 2 + "@typescript-eslint/no-unused-vars": 1 }, "src/components/simulator/wizard/ComparisonCard.tsx": { "@typescript-eslint/no-unused-vars": 2 }, - "src/components/simulator/wizard/ConfirmedSummary.tsx": { - "@typescript-eslint/no-unused-vars": 1 - }, "src/components/simulator/wizard/MobilePersonalizationSummary.tsx": { "@typescript-eslint/no-unused-vars": 1 }, "src/components/simulator/wizard/PersonalizationSummary.tsx": { "@typescript-eslint/no-unused-vars": 1 }, - "src/components/simulator/wizard/PersonalizationTabs.tsx": { - "@typescript-eslint/no-unused-vars": 2 - }, "src/components/simulator/wizard/StepComparison.tsx": { "@typescript-eslint/no-unused-vars": 3 }, "src/components/simulator/wizard/StepLocation.tsx": { "@typescript-eslint/no-unused-vars": 2 }, - "src/components/simulator/wizard/StepProduct.tsx": { - "@typescript-eslint/no-unused-vars": 1 - }, "src/components/simulator/wizard/StepSpecs.tsx": { - "@typescript-eslint/no-unused-vars": 1, "react-hooks/exhaustive-deps": 2 }, - "src/components/simulator/wizard/WizardContextBar.tsx": { - "@typescript-eslint/no-unused-vars": 1 - }, "src/components/ui/ConfirmDialog.tsx": { "@typescript-eslint/naming-convention": 1 }, "src/components/ui/DataCard.tsx": { "@typescript-eslint/naming-convention": 1 }, - "src/components/ui/LoadingButton.tsx": { - "@typescript-eslint/no-unused-vars": 1 - }, - "src/components/ui/LoadingState.tsx": { - "@typescript-eslint/no-unused-vars": 1 - }, "src/components/ui/ShortcutsHelpDialog.tsx": { "@typescript-eslint/naming-convention": 1 }, @@ -865,7 +534,7 @@ }, "src/contexts/AuthContext.tsx": { "@typescript-eslint/no-explicit-any": 2, - "@typescript-eslint/no-unused-vars": 7 + "@typescript-eslint/no-unused-vars": 3 }, "src/contexts/CollectionsContext.tsx": { "react-hooks/exhaustive-deps": 1 @@ -873,18 +542,12 @@ "src/contexts/ThemeContext.tsx": { "@typescript-eslint/no-explicit-any": 1 }, - "src/data/mock-match-products.ts": { - "@typescript-eslint/no-unused-vars": 1 - }, "src/hooks/__tests__/useIPValidation.test.ts": { "@typescript-eslint/no-explicit-any": 1 }, "src/hooks/__tests__/useLoginAttempts.unit.test.tsx": { "@typescript-eslint/no-explicit-any": 1 }, - "src/hooks/__tests__/useQuoteItems.autoexpand.test.ts": { - "@typescript-eslint/no-explicit-any": 2 - }, "src/hooks/admin/useAdminKitTemplates.ts": { "@typescript-eslint/naming-convention": 1 }, @@ -894,18 +557,6 @@ "src/hooks/auth/useAccessSecurity.ts": { "@typescript-eslint/naming-convention": 5 }, - "src/hooks/auth/useProfileRoles.ts": { - "@typescript-eslint/no-unused-vars": 1 - }, - "src/hooks/bi/useClientOrdersHistory.ts": { - "@typescript-eslint/no-non-null-assertion": 1 - }, - "src/hooks/bi/useClientSeasonality.ts": { - "@typescript-eslint/no-non-null-assertion": 1 - }, - "src/hooks/bi/useClientVsIndustry.ts": { - "@typescript-eslint/no-non-null-assertion": 1 - }, "src/hooks/common/useOrgData.ts": { "@typescript-eslint/no-explicit-any": 11 }, @@ -930,27 +581,15 @@ "src/hooks/intelligence/useMagicUpState.ts": { "react-hooks/exhaustive-deps": 2 }, - "src/hooks/kit-builder/useKitBuilder.ts": { - "@typescript-eslint/no-non-null-assertion": 1 - }, "src/hooks/kit-builder/useKitBuilderPageState.ts": { "react-hooks/exhaustive-deps": 2 }, - "src/hooks/kit-builder/useKitBuilderQueries.ts": { - "@typescript-eslint/no-non-null-assertion": 3 - }, "src/hooks/kit-builder/useKitCollaboration.ts": { "react-hooks/exhaustive-deps": 1 }, - "src/hooks/kit-builder/useKitUndoRedo.ts": { - "@typescript-eslint/no-non-null-assertion": 1 - }, "src/hooks/mockup/useMockupGenerator.ts": { "no-duplicate-imports": 1 }, - "src/hooks/mockup/useMockupTechniques.ts": { - "@typescript-eslint/no-non-null-assertion": 2 - }, "src/hooks/products/useAdvancedFilters.ts": { "react-hooks/exhaustive-deps": 1 }, @@ -970,19 +609,9 @@ "src/hooks/products/useProductBounds.ts": { "react-hooks/exhaustive-deps": 1 }, - "src/hooks/products/useProductFreshnessOverride.ts": { - "@typescript-eslint/no-non-null-assertion": 1 - }, - "src/hooks/products/useProductImages.ts": { - "@typescript-eslint/no-non-null-assertion": 1 - }, "src/hooks/products/useProductMatch.ts": { "react-hooks/exhaustive-deps": 1 }, - "src/hooks/products/useProducts.ts": { - "@typescript-eslint/no-non-null-assertion": 1, - "@typescript-eslint/no-unused-vars": 1 - }, "src/hooks/products/useProductsByCategory.ts": { "react-hooks/exhaustive-deps": 1 }, @@ -992,53 +621,19 @@ "src/hooks/products/useSellerCarts.ts": { "@typescript-eslint/naming-convention": 1 }, - "src/hooks/products/useStockAlerts.integration.test.tsx": { - "@typescript-eslint/no-explicit-any": 3 - }, - "src/hooks/products/useSupplierComparison.ts": { - "@typescript-eslint/no-non-null-assertion": 1 - }, "src/hooks/products/useSupplierFiscalData.ts": { "react-hooks/exhaustive-deps": 2 }, "src/hooks/products/useSuppliers.ts": { "react-hooks/exhaustive-deps": 1 }, - "src/hooks/products/useVariantStock.ts": { - "@typescript-eslint/no-non-null-assertion": 1, - "react-hooks/exhaustive-deps": 11 - }, - "src/hooks/quotes/useProdutoPersonalizacao.ts": { - "@typescript-eslint/no-non-null-assertion": 1 - }, "src/hooks/quotes/useQuoteBuilderState.ts": { "no-duplicate-imports": 1, "react-hooks/exhaustive-deps": 7 }, - "src/hooks/quotes/useQuoteComments.ts": { - "@typescript-eslint/no-non-null-assertion": 2 - }, - "src/hooks/quotes/useQuoteFunnel.ts": { - "@typescript-eslint/no-non-null-assertion": 3 - }, - "src/hooks/quotes/useQuotes.ts": { - "@typescript-eslint/no-explicit-any": 8, - "@typescript-eslint/no-non-null-assertion": 2, - "@typescript-eslint/no-unused-vars": 1 - }, - "src/hooks/simulation/useExternalSimulator.ts": { - "@typescript-eslint/no-non-null-assertion": 2 - }, "src/hooks/simulation/useSimulation.ts": { "react-hooks/exhaustive-deps": 2 }, - "src/hooks/simulation/useTechniquePricingOptions.ts": { - "@typescript-eslint/no-non-null-assertion": 8, - "react-hooks/exhaustive-deps": 2 - }, - "src/hooks/simulator/useSimulatorWizard.ts": { - "react-hooks/exhaustive-deps": 15 - }, "src/hooks/simulator/useWizardPersistence.ts": { "react-hooks/exhaustive-deps": 1 }, @@ -1051,38 +646,19 @@ "src/lib/auth/auth-flow-tracer.ts": { "eqeqeq": 1 }, - "src/lib/bi/executive-summary.ts": { - "@typescript-eslint/no-non-null-assertion": 2 - }, "src/lib/error-reporter.ts": { "@typescript-eslint/naming-convention": 1, "@typescript-eslint/no-non-null-assertion": 1 }, - "src/lib/external-db/price-tables.ts": { - "@typescript-eslint/no-non-null-assertion": 6 - }, - "src/lib/external-db/products.ts": { - "@typescript-eslint/no-non-null-assertion": 7 - }, "src/lib/feature-flags.ts": { "@typescript-eslint/no-non-null-assertion": 1 }, - "src/lib/lazyWithRetry.ts": { - "@typescript-eslint/no-explicit-any": 1, - "@typescript-eslint/no-unused-vars": 1 - }, "src/lib/logger.ts": { "no-console": 3 }, "src/lib/personalization/adapters/raw-row.adapter.ts": { "@typescript-eslint/naming-convention": 1 }, - "src/lib/personalization/repositories/priceTable.repository.ts": { - "@typescript-eslint/no-non-null-assertion": 2 - }, - "src/lib/personalization/selectors.ts": { - "@typescript-eslint/no-non-null-assertion": 8 - }, "src/lib/print-area-grouping.ts": { "@typescript-eslint/no-non-null-assertion": 2 }, @@ -1105,35 +681,20 @@ "react-hooks/exhaustive-deps": 1 }, "src/pages/Simulation.tsx": { - "@typescript-eslint/no-explicit-any": 1, - "@typescript-eslint/no-unused-vars": 2 + "@typescript-eslint/no-explicit-any": 1 }, "src/pages/__tests__/QuoteBuilderDeliveryTooltip.test.tsx": { "@typescript-eslint/no-explicit-any": 1 }, - "src/pages/__tests__/SSOCallbackPage.test.tsx": { - "@typescript-eslint/consistent-type-imports": 1 - }, "src/pages/admin/AdminCadastrosPage.tsx": { "@typescript-eslint/no-non-null-assertion": 1 }, - "src/pages/admin/AdminClientPerformancePage.tsx": { - "@typescript-eslint/naming-convention": 1, - "@typescript-eslint/no-explicit-any": 1, - "@typescript-eslint/no-unused-vars": 1 - }, "src/pages/admin/AdminExternalDbPage.tsx": { "react-hooks/exhaustive-deps": 1 }, - "src/pages/admin/AdminTelemetriaPage.tsx": { - "@typescript-eslint/naming-convention": 1 - }, "src/pages/admin/PermissionsPage.tsx": { "react-hooks/exhaustive-deps": 1 }, - "src/pages/admin/RlsDenialsAdminPage.tsx": { - "@typescript-eslint/no-non-null-assertion": 1 - }, "src/pages/admin/RolePermissionsPage.tsx": { "@typescript-eslint/no-non-null-assertion": 1, "react-hooks/exhaustive-deps": 1 @@ -1141,9 +702,6 @@ "src/pages/admin/RolesPage.tsx": { "react-hooks/exhaustive-deps": 1 }, - "src/pages/admin/SellerDiscountLimitsAdminPage.tsx": { - "@typescript-eslint/no-non-null-assertion": 1 - }, "src/pages/admin/StorageTestPage.tsx": { "@typescript-eslint/no-explicit-any": 6, "react-hooks/exhaustive-deps": 1 @@ -1151,83 +709,32 @@ "src/pages/admin/telemetry/useOptimizationQueue.ts": { "react-hooks/exhaustive-deps": 5 }, - "src/pages/auth/Auth.tsx": { - "@typescript-eslint/no-unused-vars": 5, - "no-console": 4 - }, - "src/pages/auth/AuthBranding.tsx": { - "@typescript-eslint/no-unused-vars": 3 - }, - "src/pages/auth/AuthBranding.visual.test.tsx": { - "@typescript-eslint/no-explicit-any": 1 - }, - "src/pages/auth/ResetPassword.tsx": { - "@typescript-eslint/no-unused-vars": 4 - }, "src/pages/auth/SSOCallbackPage.tsx": { - "@typescript-eslint/consistent-type-imports": 1, - "@typescript-eslint/no-unused-vars": 1 + "@typescript-eslint/consistent-type-imports": 1 }, "src/pages/collections/CollectionDetailPage.tsx": { "@typescript-eslint/no-non-null-assertion": 1 }, - "src/pages/filters/useFiltersPageState.ts": { - "@typescript-eslint/no-non-null-assertion": 2 - }, "src/pages/kit-builder/KitLibraryPage.tsx": { "react-hooks/exhaustive-deps": 4 }, - "src/pages/kit-builder/useKitBuilderQuote.ts": { - "@typescript-eslint/no-non-null-assertion": 1 - }, "src/pages/mockups/MockupGenerator.tsx": { "@typescript-eslint/no-non-null-assertion": 1, "react-hooks/exhaustive-deps": 2 }, - "src/pages/mockups/MockupHistoryPage.tsx": { - "@typescript-eslint/no-non-null-assertion": 2 - }, "src/pages/products/FavoritesPage.tsx": { "no-duplicate-imports": 1, "react-hooks/exhaustive-deps": 1 }, - "src/pages/products/FiltersPage.tsx": { - "@typescript-eslint/no-non-null-assertion": 2 - }, "src/pages/products/ProductDetail.tsx": { "react-hooks/exhaustive-deps": 1 }, "src/pages/products/seller-carts/useSellerCartsPage.ts": { "react-hooks/exhaustive-deps": 3 }, - "src/pages/quotes/QuoteBuilderPage.tsx": { - "@typescript-eslint/no-non-null-assertion": 1, - "@typescript-eslint/no-unused-vars": 5 - }, - "src/pages/quotes/QuoteViewPage.tsx": { - "@typescript-eslint/no-non-null-assertion": 2 - }, - "src/pages/quotes/QuotesDashboardPage.tsx": { - "@typescript-eslint/no-non-null-assertion": 2 - }, - "src/pages/quotes/QuotesListPage.tsx": { - "@typescript-eslint/no-non-null-assertion": 1 - }, - "src/pages/quotes/quote-view/useQuoteViewData.ts": { - "react-hooks/exhaustive-deps": 1 - }, - "src/pages/quotes/quotes-dashboard/useQuotesDashboard.ts": { - "@typescript-eslint/no-non-null-assertion": 3 - }, - "src/pages/quotes/useQuotesListPage.ts": { - "@typescript-eslint/no-unused-vars": 2 - }, "src/pages/system/RateLimitDashboardPage.tsx": { "react-hooks/exhaustive-deps": 1 }, - "src/pages/system/SystemStatusPage.tsx": { - "react-hooks/exhaustive-deps": 1 - }, "src/pages/tools/AdvancedPriceSearchPage.tsx": { "@typescript-eslint/naming-convention": 2 }, @@ -1240,21 +747,9 @@ "src/pages/trends/TrendsKpiCards.tsx": { "@typescript-eslint/naming-convention": 1 }, - "src/routes/RoutePrefetcher.tsx": { - "@typescript-eslint/no-explicit-any": 1 - }, - "src/services/__tests__/productService.test.ts": { - "@typescript-eslint/no-explicit-any": 2 - }, "src/services/__tests__/quoteService.test.ts": { "@typescript-eslint/no-explicit-any": 3 }, - "src/services/authService.ts": { - "@typescript-eslint/no-unused-vars": 4 - }, - "src/services/productService.ts": { - "@typescript-eslint/no-non-null-assertion": 3 - }, "src/services/quoteService.ts": { "@typescript-eslint/no-explicit-any": 2 }, @@ -1263,28 +758,14 @@ "@typescript-eslint/no-explicit-any": 5, "no-console": 1 }, - "src/tests/AdminMobileInteraction.test.tsx": { - "@typescript-eslint/no-unused-vars": 1 - }, - "src/tests/AdminStructuralComparison.test.tsx": { - "@typescript-eslint/no-unused-vars": 1 - }, "src/tests/CatalogFilteringLogic.test.tsx": { - "@typescript-eslint/no-explicit-any": 5, - "@typescript-eslint/no-unused-vars": 2 - }, - "src/tests/ScenarioSimulation.test.ts": { - "@typescript-eslint/no-unused-vars": 1 + "@typescript-eslint/no-explicit-any": 5 }, "src/tests/SidebarReorganized.test.tsx": { "@typescript-eslint/no-explicit-any": 1 }, - "src/tests/quotePersistence.test.ts": { - "@typescript-eslint/no-unused-vars": 3 - }, "src/types/jspdf-autotable.d.ts": { - "@typescript-eslint/naming-convention": 1, - "@typescript-eslint/no-unused-vars": 1 + "@typescript-eslint/naming-convention": 1 }, "src/types/stock.ts": { "@typescript-eslint/no-non-null-assertion": 1 @@ -1292,9 +773,6 @@ "src/utils/color-image-resolver.ts": { "@typescript-eslint/no-non-null-assertion": 4 }, - "src/utils/excelExport.ts": { - "@typescript-eslint/no-unused-vars": 1 - }, "src/utils/performance.ts": { "@typescript-eslint/no-unused-vars": 2, "no-console": 1 diff --git a/src/components/auth/ForgotPasswordForm.tsx b/src/components/auth/ForgotPasswordForm.tsx index acce034e5..10200e241 100644 --- a/src/components/auth/ForgotPasswordForm.tsx +++ b/src/components/auth/ForgotPasswordForm.tsx @@ -4,7 +4,7 @@ import { useNavigate } from 'react-router-dom'; import { z } from 'zod'; import { useForm } from 'react-hook-form'; import { zodResolver } from '@hookform/resolvers/zod'; -import { Mail, Loader2, ArrowLeft, Clock, ShieldCheck } from 'lucide-react'; +import { Mail, Loader2, ArrowLeft, Clock } from 'lucide-react'; import { Button } from '@/components/ui/button'; import { Input } from '@/components/ui/input'; import { Label } from '@/components/ui/label'; @@ -56,7 +56,7 @@ export function ForgotPasswordForm({ onBack }: ForgotPasswordFormProps) { // Navega para a página de confirmação com instruções detalhadas navigate('/forgot-password-confirmation'); - } catch (error) { + } catch (_error) { toast({ variant: 'destructive', title: 'Erro inesperado', diff --git a/src/components/auth/PasswordStrengthIndicator.tsx b/src/components/auth/PasswordStrengthIndicator.tsx index 54e6c1b1f..a601dac9e 100644 --- a/src/components/auth/PasswordStrengthIndicator.tsx +++ b/src/components/auth/PasswordStrengthIndicator.tsx @@ -1,4 +1,4 @@ -import { useMemo, useEffect, useState, useCallback } from 'react'; +import { useMemo, useEffect, useState } from 'react'; import { cn } from '@/lib/utils'; import { Check, X, AlertTriangle, Loader2, Shield } from 'lucide-react'; import { usePasswordBreachCheck } from '@/hooks/auth'; diff --git a/src/components/bi/BIAiCopilot.tsx b/src/components/bi/BIAiCopilot.tsx index b20676026..c5cee9e8d 100644 --- a/src/components/bi/BIAiCopilot.tsx +++ b/src/components/bi/BIAiCopilot.tsx @@ -118,7 +118,7 @@ export function BIAiCopilot({ open, onOpenChange, clientId, clientName, ramoAtiv if (error) throw error; const answer = (data as { answer?: string })?.answer ?? "Não consegui processar agora."; setMessages((prev) => [...prev, { role: "assistant", content: answer }]); - } catch (e) { + } catch (_e) { toast.error("Erro ao consultar o copiloto. Tente novamente."); setMessages((prev) => [ ...prev, diff --git a/src/components/bi/ClientComparator.tsx b/src/components/bi/ClientComparator.tsx index 696fbc794..72943009e 100644 --- a/src/components/bi/ClientComparator.tsx +++ b/src/components/bi/ClientComparator.tsx @@ -4,7 +4,6 @@ */ import { Card, CardContent } from "@/components/ui/card"; import { Badge } from "@/components/ui/badge"; -import { Button } from "@/components/ui/button"; import { Skeleton } from "@/components/ui/skeleton"; import { CheckCircle2, AlertTriangle, X, Trophy, Minus } from "lucide-react"; import { cn } from "@/lib/utils"; diff --git a/src/components/bi/ExecutiveSummaryButton.tsx b/src/components/bi/ExecutiveSummaryButton.tsx index 1f18a05e5..ceac92cb4 100644 --- a/src/components/bi/ExecutiveSummaryButton.tsx +++ b/src/components/bi/ExecutiveSummaryButton.tsx @@ -12,7 +12,7 @@ import { DropdownMenuSeparator, DropdownMenuTrigger, } from "@/components/ui/dropdown-menu"; -import { Copy, Loader2, FileText, Sparkles, Presentation } from "lucide-react"; +import { Copy, Loader2, Sparkles, Presentation } from "lucide-react"; import { toast } from "sonner"; import { useClientHealthScore } from "@/hooks/bi/useClientHealthScore"; import { useClientBI } from "@/hooks/bi/useClientBI"; diff --git a/src/components/catalog/CatalogContent.tsx b/src/components/catalog/CatalogContent.tsx index f050ecbcb..1d6813ac8 100644 --- a/src/components/catalog/CatalogContent.tsx +++ b/src/components/catalog/CatalogContent.tsx @@ -1,9 +1,5 @@ -import { useRef, useCallback, useEffect, useState, useMemo, memo, type RefObject } from 'react'; +import { memo, type RefObject } from 'react'; import type { ActiveColorFilter } from '@/utils/color-image-resolver'; -import { useVirtualizer } from '@tanstack/react-virtual'; -import { Loader2, ArrowUp, AlertCircle } from 'lucide-react'; -import { useProductsContextSafe } from '@/contexts/ProductsContext'; -import { Button } from '@/components/ui/button'; import { Skeleton } from '@/components/ui/skeleton'; @@ -14,7 +10,6 @@ import { ProductCardSkeleton } from '@/components/products/ProductCardSkeleton'; import { ProductListItemSkeleton } from '@/components/products/ProductListItemSkeleton'; import { ProductTableSkeleton } from '@/components/products/ProductTableSkeleton'; import { EmptyState } from '@/components/common/EmptyState'; -import { SelectionCheckbox } from '@/components/common/SelectionCheckbox'; import { CatalogBulkModals } from './CatalogBulkModals'; import { useCatalogSelection } from './useCatalogSelection'; import { cn } from '@/lib/utils'; @@ -66,7 +61,7 @@ export const CatalogContent = memo(function CatalogContent({ isLoadingMore, totalEstimate, loadMoreRef, - itemsPerPage, + itemsPerPage: _itemsPerPage, navigate, handleViewProduct, handleShareProduct, @@ -76,13 +71,13 @@ export const CatalogContent = memo(function CatalogContent({ isInCompare, onToggleCompare, canAddToCompare, - onLoadMore, + onLoadMore: _onLoadMore, onResetFilters, selectionMode, onSelectedCountChange, activeColorFilter, - activeProductId, - setActiveProductId, + activeProductId: _activeProductId, + setActiveProductId: _setActiveProductId, }: CatalogContentProps) { const selection = useCatalogSelection( paginatedProducts, diff --git a/src/components/categories/CategorySidebarPanel.tsx b/src/components/categories/CategorySidebarPanel.tsx index 99cd04e83..106dce7b6 100644 --- a/src/components/categories/CategorySidebarPanel.tsx +++ b/src/components/categories/CategorySidebarPanel.tsx @@ -1,5 +1,5 @@ import { useState, useCallback, type MouseEvent } from 'react'; -import { ChevronRight, ChevronDown, Folder, FolderOpen, X, ChevronLeft, Layers } from 'lucide-react'; +import { ChevronRight, Folder, X, ChevronLeft, Layers } from 'lucide-react'; import { useCategoriesTree, type CategoryNode, type CategoryTreeItem } from '@/hooks/products'; import { Input } from '@/components/ui/input'; import { Button } from '@/components/ui/button'; diff --git a/src/components/compare/ComparisonHighlights.tsx b/src/components/compare/ComparisonHighlights.tsx index b785d7a36..259763a4d 100644 --- a/src/components/compare/ComparisonHighlights.tsx +++ b/src/components/compare/ComparisonHighlights.tsx @@ -4,7 +4,7 @@ */ import { useMemo } from "react"; import { cn } from "@/lib/utils"; -import { TrendingUp, TrendingDown, Minus, Crown, AlertTriangle } from "lucide-react"; +import { TrendingUp, Minus, Crown, AlertTriangle } from "lucide-react"; import { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger } from "@/components/ui/tooltip"; type HighlightType = "best" | "worst" | "neutral"; diff --git a/src/components/dashboard/QuickActionsPanel.tsx b/src/components/dashboard/QuickActionsPanel.tsx index 4026d4b88..1f0ca94c6 100644 --- a/src/components/dashboard/QuickActionsPanel.tsx +++ b/src/components/dashboard/QuickActionsPanel.tsx @@ -1,22 +1,17 @@ -import { useEffect, useState, useMemo } from "react"; +import { useMemo } from "react"; import { Skeleton } from "@/components/ui/skeleton"; import { useNavigate } from "react-router-dom"; import { FilePlus, - Clock, - CheckCircle2, - XCircle, - TrendingUp, - FileText, - ArrowRight, - DollarSign, + Clock, TrendingUp, + FileText, DollarSign, Target, - BarChart3, + BarChart3 } from "lucide-react"; import { Card, CardContent } from "@/components/ui/card"; import { Button } from "@/components/ui/button"; import { Badge } from "@/components/ui/badge"; -import { useQuotes, Quote } from "@/hooks/quotes"; +import { useQuotes } from "@/hooks/quotes"; import { useAuth } from "@/contexts/AuthContext"; import { startOfMonth, endOfMonth, parseISO, isWithinInterval } from "date-fns"; diff --git a/src/components/dashboard/RecentKitsWidget.tsx b/src/components/dashboard/RecentKitsWidget.tsx index af0b3d49b..ea1c2c6ba 100644 --- a/src/components/dashboard/RecentKitsWidget.tsx +++ b/src/components/dashboard/RecentKitsWidget.tsx @@ -5,7 +5,7 @@ import { useQuery } from '@tanstack/react-query'; import { useNavigate } from 'react-router-dom'; -import { Package, Pencil, Clock, ArrowRight } from 'lucide-react'; +import { Package, Clock, ArrowRight } from 'lucide-react'; import { supabase } from '@/integrations/supabase/client'; import { useAuth } from '@/contexts/AuthContext'; import { Card, CardContent, CardHeader, CardTitle } from '@/components/ui/card'; diff --git a/src/components/expert/ExpertChatDialog.tsx b/src/components/expert/ExpertChatDialog.tsx index d6d4d5af8..e80d501a9 100644 --- a/src/components/expert/ExpertChatDialog.tsx +++ b/src/components/expert/ExpertChatDialog.tsx @@ -3,7 +3,7 @@ * Original: 1418 lines → Now: ~80 lines (orchestrator only) */ import { Dialog, DialogContent } from "@/components/ui/dialog"; -import { FlowFilterPanel, defaultFlowFilters } from "./FlowFilterPanel"; +import { FlowFilterPanel } from "./FlowFilterPanel"; import { useExpertChat } from "./chat/useExpertChat"; import { ChatHeader } from "./chat/ChatHeader"; import { ChatHistoryPanel } from "./chat/ChatHistoryPanel"; diff --git a/src/components/filters/ColorGroupFilter.tsx b/src/components/filters/ColorGroupFilter.tsx index ec35c31c2..181ce76c8 100644 --- a/src/components/filters/ColorGroupFilter.tsx +++ b/src/components/filters/ColorGroupFilter.tsx @@ -15,7 +15,7 @@ import { CollapsibleTrigger, } from '@/components/ui/collapsible'; import { cn } from '@/lib/utils'; -import { useColorSystem, ColorGroup, ColorNuance, isLightColor } from '@/hooks/products'; +import { useColorSystem, isLightColor } from '@/hooks/products'; // ===================================================== // TIPOS diff --git a/src/components/filters/CommemorativeDateFilter.tsx b/src/components/filters/CommemorativeDateFilter.tsx index a5aeb4936..ce8eec754 100644 --- a/src/components/filters/CommemorativeDateFilter.tsx +++ b/src/components/filters/CommemorativeDateFilter.tsx @@ -1,7 +1,6 @@ import { useActiveCommemorativeDates, type CommemorativeDate } from "@/hooks/intelligence"; import { cn } from "@/lib/utils"; import { Skeleton } from "@/components/ui/skeleton"; -import { ScrollArea } from "@/components/ui/scroll-area"; interface CommemorativeDateFilterProps { selectedDates: string[]; diff --git a/src/components/filters/ExternalCategoryFilter.tsx b/src/components/filters/ExternalCategoryFilter.tsx index 2943600c3..c3489999e 100644 --- a/src/components/filters/ExternalCategoryFilter.tsx +++ b/src/components/filters/ExternalCategoryFilter.tsx @@ -3,7 +3,6 @@ import { ChevronDown, ChevronRight, Search, X, Layers, RefreshCw } from "lucide- import { Checkbox } from "@/components/ui/checkbox"; import { Label } from "@/components/ui/label"; import { Input } from "@/components/ui/input"; -import { ScrollArea } from "@/components/ui/scroll-area"; import { Skeleton } from "@/components/ui/skeleton"; import { Badge } from "@/components/ui/badge"; import { cn } from "@/lib/utils"; diff --git a/src/components/filters/FilterPanel.tsx b/src/components/filters/FilterPanel.tsx index 885d8b93d..e098574a6 100644 --- a/src/components/filters/FilterPanel.tsx +++ b/src/components/filters/FilterPanel.tsx @@ -26,7 +26,6 @@ import { QuickOptionsFilter, } from "./filter-panel/sections/SimpleFilters"; import { SizeFilter } from "./filter-panel/sections/SizeFilter"; -import { GenderBadge } from "@/components/products/GenderBadge"; export function FilterPanel({ filters, onFilterChange, onReset, activeFiltersCount, diff --git a/src/components/filters/filter-panel/sections/SizeFilter.tsx b/src/components/filters/filter-panel/sections/SizeFilter.tsx index b7a8c8d7e..47853e23d 100644 --- a/src/components/filters/filter-panel/sections/SizeFilter.tsx +++ b/src/components/filters/filter-panel/sections/SizeFilter.tsx @@ -3,10 +3,9 @@ * Extrai size_codes únicos das variações dos produtos carregados. */ import { useMemo, useState } from "react"; -import { Ruler, Search, X } from "lucide-react"; +import { Search, X } from "lucide-react"; import { cn } from "@/lib/utils"; import { Input } from "@/components/ui/input"; -import { Badge } from "@/components/ui/badge"; const SIZE_ORDER = [ "PP", "P", "M", "G", "GG", "XG", "XXG", "EG", "EGG", diff --git a/src/components/intelligence/IntelligenceFilterBar.tsx b/src/components/intelligence/IntelligenceFilterBar.tsx index 1e410e846..6b43f71d3 100644 --- a/src/components/intelligence/IntelligenceFilterBar.tsx +++ b/src/components/intelligence/IntelligenceFilterBar.tsx @@ -1,4 +1,4 @@ -import { useState, useMemo, useCallback } from "react"; +import { useState, useMemo } from "react"; import { Filter, X, ChevronDown, Package, Search } from "lucide-react"; import { Button } from "@/components/ui/button"; import { Badge } from "@/components/ui/badge"; diff --git a/src/components/intelligence/RankingFilterToolbar.tsx b/src/components/intelligence/RankingFilterToolbar.tsx index 87468cc6f..c7c88f133 100644 --- a/src/components/intelligence/RankingFilterToolbar.tsx +++ b/src/components/intelligence/RankingFilterToolbar.tsx @@ -1,5 +1,5 @@ -import { useState, useMemo, useCallback } from "react"; -import { Search, Filter, ChevronDown, X, Tag, Hash, History, Clock } from "lucide-react"; +import { useState, useMemo } from "react"; +import { Search, Filter, ChevronDown, X, Tag, History, Clock } from "lucide-react"; import { Button } from "@/components/ui/button"; import { Input } from "@/components/ui/input"; import { Popover, PopoverContent, PopoverTrigger } from "@/components/ui/popover"; diff --git a/src/components/intelligence/SegmentAnalysis.tsx b/src/components/intelligence/SegmentAnalysis.tsx index 51f7d27ce..361ddb8ce 100644 --- a/src/components/intelligence/SegmentAnalysis.tsx +++ b/src/components/intelligence/SegmentAnalysis.tsx @@ -2,7 +2,6 @@ import { PieChart, Building2 } from "lucide-react"; import { Card, CardContent, CardHeader, CardTitle } from "@/components/ui/card"; import { Skeleton } from "@/components/ui/skeleton"; import { useSegmentAnalysis } from "@/hooks/intelligence"; -import { cn } from "@/lib/utils"; export function SegmentAnalysis({ days = 30, categoryId, supplierId }: { days?: number; categoryId?: string | null; supplierId?: string | null }) { const { data: segments, isLoading } = useSegmentAnalysis(days, categoryId, supplierId); diff --git a/src/components/inventory/StockAlertDialogs.tsx b/src/components/inventory/StockAlertDialogs.tsx index 7cdc72a3d..0797919ff 100644 --- a/src/components/inventory/StockAlertDialogs.tsx +++ b/src/components/inventory/StockAlertDialogs.tsx @@ -1,5 +1,5 @@ import { useMemo } from "react"; -import { AlertTriangle, TrendingDown, X, CheckCircle2, Package, XCircle, Truck } from "lucide-react"; +import { AlertTriangle, TrendingDown, X, CheckCircle2, XCircle } from "lucide-react"; import { Dialog, DialogContent, diff --git a/src/components/inventory/StockCategoryTreeSelect.tsx b/src/components/inventory/StockCategoryTreeSelect.tsx index c7fc94248..00f424952 100644 --- a/src/components/inventory/StockCategoryTreeSelect.tsx +++ b/src/components/inventory/StockCategoryTreeSelect.tsx @@ -5,7 +5,6 @@ import { useState, useMemo } from "react"; import { ChevronRight, FolderTree, Search, X } from "lucide-react"; import { Input } from "@/components/ui/input"; -import { ScrollArea } from "@/components/ui/scroll-area"; import { cn } from "@/lib/utils"; import { useCategoriesTree, type CategoryNode } from "@/hooks/products"; import { motion } from "framer-motion"; diff --git a/src/components/inventory/StockDashboard.tsx b/src/components/inventory/StockDashboard.tsx index 7848add36..a4e16813f 100644 --- a/src/components/inventory/StockDashboard.tsx +++ b/src/components/inventory/StockDashboard.tsx @@ -100,7 +100,7 @@ export function StockDashboard() { return Math.round((healthy / summary.totalProducts) * 100); }, [summary]); - const healthColor = healthScore >= 80 ? 'text-success' : healthScore >= 50 ? 'text-warning' : 'text-destructive'; + const _healthColor = healthScore >= 80 ? 'text-success' : healthScore >= 50 ? 'text-warning' : 'text-destructive'; // Future stock total const futureStockTotal = useMemo( diff --git a/src/components/inventory/StockFilterToolbar.tsx b/src/components/inventory/StockFilterToolbar.tsx index 10de5dbf2..00aa22e31 100644 --- a/src/components/inventory/StockFilterToolbar.tsx +++ b/src/components/inventory/StockFilterToolbar.tsx @@ -58,7 +58,7 @@ interface StockFilterToolbarProps { filteredCount: number; } -const STATUS_OPTIONS: { value: StockStatus | 'all'; label: string; icon: React.ReactNode; color: string }[] = [ +const _STATUS_OPTIONS: { value: StockStatus | 'all'; label: string; icon: React.ReactNode; color: string }[] = [ { value: 'all', label: 'Todos', icon: , color: 'text-foreground' }, { value: 'in_stock', label: 'Em Estoque', icon: , color: 'text-success' }, { value: 'low_stock', label: 'Baixo', icon: , color: 'text-warning' }, diff --git a/src/components/kit-builder/BoxSelector.tsx b/src/components/kit-builder/BoxSelector.tsx index 85ca7168a..b0cbefaef 100644 --- a/src/components/kit-builder/BoxSelector.tsx +++ b/src/components/kit-builder/BoxSelector.tsx @@ -14,7 +14,7 @@ import { ScrollArea } from '@/components/ui/scroll-area'; import { Slider } from '@/components/ui/slider'; import { Label } from '@/components/ui/label'; import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from '@/components/ui/select'; -import { Collapsible, CollapsibleContent, CollapsibleTrigger } from '@/components/ui/collapsible'; +import { Collapsible, CollapsibleContent } from '@/components/ui/collapsible'; import { cn } from '@/lib/utils'; import { formatVolume, diff --git a/src/components/kit-builder/DiscontinuedItemsAlert.tsx b/src/components/kit-builder/DiscontinuedItemsAlert.tsx index 7265c6424..04fbc1808 100644 --- a/src/components/kit-builder/DiscontinuedItemsAlert.tsx +++ b/src/components/kit-builder/DiscontinuedItemsAlert.tsx @@ -3,10 +3,9 @@ * Checks if any items in a kit are marked inactive and alerts the user */ -import { AlertTriangle, ExternalLink } from 'lucide-react'; +import { AlertTriangle } from 'lucide-react'; import { Card, CardContent } from '@/components/ui/card'; import { Badge } from '@/components/ui/badge'; -import { Button } from '@/components/ui/button'; import type { KitItem } from '@/lib/kit-builder'; import { useQuery } from '@tanstack/react-query'; import { supabase } from '@/integrations/supabase/client'; diff --git a/src/components/kit-builder/KitIsometricPreview.tsx b/src/components/kit-builder/KitIsometricPreview.tsx index 6f7b5618b..3296385ac 100644 --- a/src/components/kit-builder/KitIsometricPreview.tsx +++ b/src/components/kit-builder/KitIsometricPreview.tsx @@ -211,7 +211,7 @@ export function KitIsometricPreview({ kitState, className }: KitIsometricPreview {/* Itens empilhados */} {sorted.map((p) => { - const c000 = iso(p.x, p.y, 0); + const _c000 = iso(p.x, p.y, 0); const c100 = iso(p.x + p.w, p.y, 0); const c101 = iso(p.x + p.w, p.y, p.d); const c001 = iso(p.x, p.y, p.d); diff --git a/src/components/kit-builder/KitSummary.tsx b/src/components/kit-builder/KitSummary.tsx index 40d09441c..c9bf9a18d 100644 --- a/src/components/kit-builder/KitSummary.tsx +++ b/src/components/kit-builder/KitSummary.tsx @@ -3,7 +3,6 @@ * Sub-components extracted to ./kit-summary/ */ import { Card, CardContent } from '@/components/ui/card'; -import { Badge } from '@/components/ui/badge'; import { AlertTriangle } from 'lucide-react'; import { KitMarginSimulator } from './KitMarginSimulator'; import { KitVisualPreview } from './KitVisualPreview'; diff --git a/src/components/kit-builder/SimilarKitsWidget.tsx b/src/components/kit-builder/SimilarKitsWidget.tsx index 2d3dd0ed9..93e267d18 100644 --- a/src/components/kit-builder/SimilarKitsWidget.tsx +++ b/src/components/kit-builder/SimilarKitsWidget.tsx @@ -6,7 +6,6 @@ import { useNavigate } from 'react-router-dom'; import * as Lucide from 'lucide-react'; import { Card, CardContent, CardHeader, CardTitle } from '@/components/ui/card'; import { Badge } from '@/components/ui/badge'; -import { Button } from '@/components/ui/button'; import { Skeleton } from '@/components/ui/skeleton'; import { useSimilarKits } from '@/hooks/kit-builder'; import { formatCurrency } from '@/lib/kit-builder'; diff --git a/src/components/layout/GlobalOverlay.tsx b/src/components/layout/GlobalOverlay.tsx index 0fda77a54..82a0af46f 100644 --- a/src/components/layout/GlobalOverlay.tsx +++ b/src/components/layout/GlobalOverlay.tsx @@ -1,11 +1,9 @@ -import { Suspense, lazy } from "react"; +import { Suspense } from "react"; import { lazyWithRetry } from "@/lib/lazyWithRetry"; -import { Toaster } from "@/components/ui/toaster"; -import { Toaster as Sonner } from "@/components/ui/sonner"; // Lazy-loaded global components const OnboardingTour = lazyWithRetry(() => import("@/components/onboarding/OnboardingTour").then(m => ({ default: m.OnboardingTour }))); -const ExpertChatButton = lazyWithRetry(() => import("@/components/expert/ExpertChatButton").then(m => ({ default: m.ExpertChatButton }))); +const _ExpertChatButton = lazyWithRetry(() => import("@/components/expert/ExpertChatButton").then(m => ({ default: m.ExpertChatButton }))); const EnhancedSpotlight = lazyWithRetry(() => import("@/components/common/EnhancedSpotlight").then(m => ({ default: m.EnhancedSpotlight }))); const SmartMobileNav = lazyWithRetry(() => import("@/components/mobile/SmartMobileNav").then(m => ({ default: m.SmartMobileNav }))); const QuickQuoteFAB = lazyWithRetry(() => import("@/components/quotes/QuickQuoteFAB").then(m => ({ default: m.QuickQuoteFAB }))); diff --git a/src/components/layout/SidebarReorganized.tsx b/src/components/layout/SidebarReorganized.tsx index cf855ab62..84cf529a6 100644 --- a/src/components/layout/SidebarReorganized.tsx +++ b/src/components/layout/SidebarReorganized.tsx @@ -155,7 +155,7 @@ export const SidebarReorganized = React.memo( isCollapsed ? "4rem" : "16rem", ); }, [isCollapsed]); - const isItemActive = (href: string, exact?: boolean) => + const _isItemActive = (href: string, exact?: boolean) => isNavItemActive(location.pathname, href, exact); // Compute which groups should be auto-opened for the current route. diff --git a/src/components/mobile/MobileProductActions.tsx b/src/components/mobile/MobileProductActions.tsx index 60b1b9b51..d34b8b0c4 100644 --- a/src/components/mobile/MobileProductActions.tsx +++ b/src/components/mobile/MobileProductActions.tsx @@ -1,5 +1,5 @@ import React, { useState } from "react"; -import { Heart, Share2, Calculator, FileText, ShoppingCart } from "lucide-react"; +import { Heart, Share2, FileText } from "lucide-react"; import { Button } from "@/components/ui/button"; import { cn } from "@/lib/utils"; import { useNavigate } from "react-router-dom"; diff --git a/src/components/mobile/SmartMobileNav.tsx b/src/components/mobile/SmartMobileNav.tsx index 3d52c8ddf..3aecd75f5 100644 --- a/src/components/mobile/SmartMobileNav.tsx +++ b/src/components/mobile/SmartMobileNav.tsx @@ -1,28 +1,19 @@ -import React, { useState, useEffect, forwardRef } from "react"; +import { useState, useEffect, forwardRef } from "react"; import { NavLink, useLocation, useNavigate } from "react-router-dom"; import { getPrefetchHandlers } from "@/lib/routePrefetch"; -import { - Home, - Package, - FileText, - +import { + Home, + Package, + FileText, + Plus, Heart, - Wand2, - BarChart3, - ShoppingCart, - Settings, - Sparkles, - Calculator, + Wand2, ShoppingCart, Calculator, FolderOpen, - X, - Sun, - Moon, + X } from "lucide-react"; -import { useTheme } from "@/contexts/ThemeContext"; import { cn } from "@/lib/utils"; import { motion, AnimatePresence } from "framer-motion"; -import { VisuallyHidden } from "@/components/a11y/VisuallyHidden"; interface NavItem { icon: typeof Home; @@ -172,7 +163,7 @@ export const SmartMobileNav = forwardRef(function SmartMobileNav style={{ paddingBottom: 'env(safe-area-inset-bottom, 0.5rem)' }} >
- {mainNavItems.map((item, index) => { + {mainNavItems.map((item, _index) => { const Icon = item.icon; const active = isActive(item.href); const isFab = item.href === "#fab"; diff --git a/src/components/mockup/LogoColorAnalyzer.tsx b/src/components/mockup/LogoColorAnalyzer.tsx index 195651688..1aeb1557f 100644 --- a/src/components/mockup/LogoColorAnalyzer.tsx +++ b/src/components/mockup/LogoColorAnalyzer.tsx @@ -12,7 +12,7 @@ import { Popover, PopoverContent, PopoverTrigger } from '@/components/ui/popover import { Input } from '@/components/ui/input'; import { ScrollArea } from '@/components/ui/scroll-area'; import { cn } from '@/lib/utils'; -import { searchPantone, type PantoneColor } from '@/data/pantone-coated'; +import { searchPantone } from '@/data/pantone-coated'; import type { DetectedColor } from '@/hooks/simulation'; interface LogoColorAnalyzerProps { diff --git a/src/components/mockup/MockupConfigPanel.tsx b/src/components/mockup/MockupConfigPanel.tsx index 283da2814..a4187cebf 100644 --- a/src/components/mockup/MockupConfigPanel.tsx +++ b/src/components/mockup/MockupConfigPanel.tsx @@ -10,9 +10,7 @@ import { Paintbrush, RefreshCw, Info, - ChevronDown, - FileText, - Wand2, + ChevronDown, Wand2 } from "lucide-react"; import { Card, CardContent, CardDescription, CardHeader, CardTitle } from "@/components/ui/card"; import { Button } from "@/components/ui/button"; @@ -20,7 +18,6 @@ import { Label } from "@/components/ui/label"; import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from "@/components/ui/select"; import { Tooltip, TooltipContent, TooltipTrigger } from "@/components/ui/tooltip"; import { Collapsible, CollapsibleContent, CollapsibleTrigger } from "@/components/ui/collapsible"; -import { cn } from "@/lib/utils"; import { TechniqueTooltip } from "./TechniqueTooltip"; import { MockupClientSelector } from "./MockupClientSelector"; import { MockupProductSelector, type MockupProductSelection } from "./MockupProductSelector"; diff --git a/src/components/mockup/MockupProductSelector.tsx b/src/components/mockup/MockupProductSelector.tsx index 61dd5272f..3d0e82f5d 100644 --- a/src/components/mockup/MockupProductSelector.tsx +++ b/src/components/mockup/MockupProductSelector.tsx @@ -6,16 +6,15 @@ * Flow: Search products -> Select product -> Load full data -> Choose color/variant -> Confirmed. */ -import { useState, useMemo, useRef, useCallback, useEffect } from "react"; +import { useState, useMemo, useRef, useCallback } from "react"; import { useDebounce } from "@/hooks/common"; import { useVirtualizer } from "@tanstack/react-virtual"; -import { Search, Package, X, SearchX, Filter, Loader2 } from "lucide-react"; +import { Search, Package, X, SearchX, Filter } from "lucide-react"; import { Input } from "@/components/ui/input"; import { Button } from "@/components/ui/button"; import { Badge } from "@/components/ui/badge"; import { Skeleton } from "@/components/ui/skeleton"; import { Dialog, DialogContent, DialogHeader, DialogTitle, DialogTrigger } from "@/components/ui/dialog"; -import { cn } from "@/lib/utils"; import { useProductsCatalog, type ExternalVariantStock, type Product, type ProductLightweight } from "@/hooks/products"; import { ProductLoaderAndColorSelector } from "./MockupColorSelector"; diff --git a/src/components/mockup/MockupResultCard.tsx b/src/components/mockup/MockupResultCard.tsx index e1c06e65e..344ea1b95 100644 --- a/src/components/mockup/MockupResultCard.tsx +++ b/src/components/mockup/MockupResultCard.tsx @@ -15,7 +15,6 @@ import { X, ArrowLeftRight, } from "lucide-react"; -import { toast } from "sonner"; import confetti from "canvas-confetti"; import { Dialog, diff --git a/src/components/mockup/MockupWizard.tsx b/src/components/mockup/MockupWizard.tsx index b5f4a9a46..b07a542de 100644 --- a/src/components/mockup/MockupWizard.tsx +++ b/src/components/mockup/MockupWizard.tsx @@ -113,7 +113,7 @@ export const MockupWizard = forwardRef(functi style={{ width: `${progressPercent * 0.9}%` }} /> - {steps.map((step, index) => { + {steps.map((step, _index) => { // Allow clicking completed steps or the current active step's next const isClickable = onStepClick && (step.isCompleted || step.id <= currentStep); return ( diff --git a/src/components/navigation/DynamicBreadcrumbs.tsx b/src/components/navigation/DynamicBreadcrumbs.tsx index 980f99ba2..9a78ca497 100644 --- a/src/components/navigation/DynamicBreadcrumbs.tsx +++ b/src/components/navigation/DynamicBreadcrumbs.tsx @@ -65,7 +65,7 @@ const routeLabels: Record = { export function DynamicBreadcrumbs({ customItems, className }: DynamicBreadcrumbsProps) { const location = useLocation(); - const params = useParams(); + const _params = useParams(); const { isDev, isAdmin } = useAuth(); const breadcrumbs = useMemo(() => { diff --git a/src/components/notifications/NotificationDrawer.tsx b/src/components/notifications/NotificationDrawer.tsx index f2aecf226..643b9ca96 100644 --- a/src/components/notifications/NotificationDrawer.tsx +++ b/src/components/notifications/NotificationDrawer.tsx @@ -1,5 +1,5 @@ import React, { useCallback, useEffect, useRef, useState } from "react"; -import { Bell, Check, CheckCheck, Trash2, Info, AlertTriangle, CheckCircle2, XCircle, ExternalLink, Loader2 } from "lucide-react"; +import { Bell, CheckCheck, Trash2, Info, AlertTriangle, CheckCircle2, XCircle, ExternalLink, Loader2 } from "lucide-react"; import { motion, AnimatePresence } from "framer-motion"; import { Button } from "@/components/ui/button"; import { Badge } from "@/components/ui/badge"; diff --git a/src/components/notifications/badge-stats/EfficiencyGrid.tsx b/src/components/notifications/badge-stats/EfficiencyGrid.tsx index 3f7c41100..4455f7f0a 100644 --- a/src/components/notifications/badge-stats/EfficiencyGrid.tsx +++ b/src/components/notifications/badge-stats/EfficiencyGrid.tsx @@ -22,7 +22,7 @@ export function EfficiencyGrid({ coalescingByTrigger }: EfficiencyGridProps) { const ttlWithinPct = fetches === 0 ? 0 : Math.round((fetchesByTtlWindow.withinTtl / fetches) * 100); - const ttlAfterPct = fetches === 0 ? 0 : Math.round((fetchesByTtlWindow.afterTtl / fetches) * 100); + const _ttlAfterPct = fetches === 0 ? 0 : Math.round((fetchesByTtlWindow.afterTtl / fetches) * 100); return (
diff --git a/src/components/notifications/badge-stats/useNotificationsMetricsPanel.ts b/src/components/notifications/badge-stats/useNotificationsMetricsPanel.ts index d2938f31b..e048cedef 100644 --- a/src/components/notifications/badge-stats/useNotificationsMetricsPanel.ts +++ b/src/components/notifications/badge-stats/useNotificationsMetricsPanel.ts @@ -1,5 +1,5 @@ import { useEffect, useMemo, useRef, useState } from "react"; -import { notificationsMetrics, type BadgeRenderStat, type TriggerSource } from "@/lib/notifications-metrics"; +import { notificationsMetrics } from "@/lib/notifications-metrics"; /** Sliding-window length for the sparkline (60 samples × 1s = 60s). */ const SPARK_WINDOW_SECONDS = 60; diff --git a/src/components/onboarding/OnboardingTour.tsx b/src/components/onboarding/OnboardingTour.tsx index f8cf38ffe..98399f0eb 100644 --- a/src/components/onboarding/OnboardingTour.tsx +++ b/src/components/onboarding/OnboardingTour.tsx @@ -1,12 +1,9 @@ import { useEffect, useState, useCallback } from "react"; import { motion, AnimatePresence } from "framer-motion"; -import { X, ChevronLeft, ChevronRight, SkipForward, Sparkles, Play, Pause } from "lucide-react"; +import { X, ChevronLeft, ChevronRight, SkipForward, Sparkles } from "lucide-react"; import { Button } from "@/components/ui/button"; -import { Progress } from "@/components/ui/progress"; -import { ONBOARDING_STEPS } from "@/hooks/ui"; import { useOnboardingContext } from "@/contexts/OnboardingContext"; import { useNavigate, useLocation } from "react-router-dom"; -import { cn } from "@/lib/utils"; interface TooltipPosition { top?: number; left?: number; diff --git a/src/components/pdf/PropostaComercialTailwind.tsx b/src/components/pdf/PropostaComercialTailwind.tsx index 86eabde8e..86b59fcfa 100644 --- a/src/components/pdf/PropostaComercialTailwind.tsx +++ b/src/components/pdf/PropostaComercialTailwind.tsx @@ -35,7 +35,7 @@ const PAGE_H = 1123; const FIRST_HEADER_H = 128; const CONT_HEADER_H = 60; const CONT_CLIENT_H = 60; // compact client bar on continuation pages -const FULL_FOOTER_H = 220; // last page: totals + signature + notes + green bar +const _FULL_FOOTER_H = 220; // last page: totals + signature + notes + green bar const SIMPLE_FOOTER_H = 30; // page number + green bar only const NOTES_FOOTER_H = 230; // notes block (conditions + terms) on every page const CONTENT_PAD = 36; diff --git a/src/components/pdf/proposal/LogoWithTransparentBg.tsx b/src/components/pdf/proposal/LogoWithTransparentBg.tsx index 4b8be035d..781e0d609 100644 --- a/src/components/pdf/proposal/LogoWithTransparentBg.tsx +++ b/src/components/pdf/proposal/LogoWithTransparentBg.tsx @@ -17,7 +17,7 @@ export function processLogoTransparent(src: string): Promise { .then((res) => res.blob()) .then( (blob) => - new Promise((resolve, reject) => { + new Promise((resolve, _reject) => { const objectUrl = URL.createObjectURL(blob); const img = new Image(); img.onload = () => { diff --git a/src/components/pricing/ProductPriceSimulator.tsx b/src/components/pricing/ProductPriceSimulator.tsx index 097842386..8dff517a4 100644 --- a/src/components/pricing/ProductPriceSimulator.tsx +++ b/src/components/pricing/ProductPriceSimulator.tsx @@ -1,4 +1,4 @@ -import { useState, useCallback, useMemo, useEffect } from 'react'; +import { useState, useCallback, useMemo } from 'react'; import { useQuery } from '@tanstack/react-query'; import { useNavigate } from 'react-router-dom'; import { Button } from '@/components/ui/button'; diff --git a/src/components/pricing/simulator/EngravingList.tsx b/src/components/pricing/simulator/EngravingList.tsx index 49c3ae726..55a4f3f4e 100644 --- a/src/components/pricing/simulator/EngravingList.tsx +++ b/src/components/pricing/simulator/EngravingList.tsx @@ -4,7 +4,6 @@ import { Badge } from '@/components/ui/badge'; import { Plus, Trash2, Paintbrush, Palette, Ruler, GripVertical } from 'lucide-react'; import { cn } from '@/lib/utils'; import type { ConfiguredEngraving } from "./types"; -import { formatCurrency } from './utils'; interface EngravingListProps { engravings: ConfiguredEngraving[]; diff --git a/src/components/pricing/simulator/MultiEngravingResult.tsx b/src/components/pricing/simulator/MultiEngravingResult.tsx index 5b0d0f6bb..b28f2c287 100644 --- a/src/components/pricing/simulator/MultiEngravingResult.tsx +++ b/src/components/pricing/simulator/MultiEngravingResult.tsx @@ -7,18 +7,18 @@ * - Código de orçamento automático */ -import { useMemo, useState, useEffect } from 'react'; +import { useState, useEffect } from 'react'; import { Input } from '@/components/ui/input'; import { Button } from '@/components/ui/button'; import { Slider } from '@/components/ui/slider'; import { Card, CardContent, CardHeader, CardTitle } from '@/components/ui/card'; import { Badge } from '@/components/ui/badge'; import { Separator } from '@/components/ui/separator'; -import { - Calculator, - Clock, - AlertCircle, - Package, +import { + Calculator, + Clock, + AlertCircle, + Package, Paintbrush, Copy, CheckCircle2, diff --git a/src/components/pricing/simulator/PriceResultV51.tsx b/src/components/pricing/simulator/PriceResultV51.tsx index 8f5b6949c..b13968b45 100644 --- a/src/components/pricing/simulator/PriceResultV51.tsx +++ b/src/components/pricing/simulator/PriceResultV51.tsx @@ -8,16 +8,14 @@ * - Código de orçamento: {TECNICA_CURTO}01-{FAIXA}-{AREA}-{CORES} */ -import { useMemo, useState } from 'react'; +import { useState } from 'react'; import { Card, CardContent, CardHeader, CardTitle } from '@/components/ui/card'; import { Badge } from '@/components/ui/badge'; import { Separator } from '@/components/ui/separator'; -import { - Calculator, - Clock, - TrendingDown, - AlertCircle, - Package, +import { + Calculator, + Clock, + TrendingDown, Package, Paintbrush, Copy, CheckCircle2, diff --git a/src/components/pricing/simulator/QuantityAndResult.tsx b/src/components/pricing/simulator/QuantityAndResult.tsx index e94669897..7867e2ad5 100644 --- a/src/components/pricing/simulator/QuantityAndResult.tsx +++ b/src/components/pricing/simulator/QuantityAndResult.tsx @@ -7,28 +7,25 @@ * - Código de orçamento automático */ -import { useMemo, useState, useEffect } from 'react'; +import { useState, useEffect } from 'react'; import { Input } from '@/components/ui/input'; import { Button } from '@/components/ui/button'; import { Slider } from '@/components/ui/slider'; import { Card, CardContent, CardHeader, CardTitle } from '@/components/ui/card'; -import { Badge } from '@/components/ui/badge'; -import { - Calculator, - Clock, - TrendingDown, - AlertCircle, - Copy, +import { + Calculator, + Clock, + TrendingDown, + AlertCircle, + Copy, CheckCircle2, Info, Loader2 } from 'lucide-react'; import { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger } from '@/components/ui/tooltip'; import { cn } from '@/lib/utils'; -import { - useCustomizationPriceLegacy, - useFaixasPrecoOficial, - type CustomizationPriceV2 +import { + useCustomizationPriceLegacy, type CustomizationPriceV2 } from '@/hooks/simulation'; import { formatCurrency, formatNumber } from './utils'; import type { Product, ProductTechnique } from "./types"; diff --git a/src/components/products/BulkActionBar.tsx b/src/components/products/BulkActionBar.tsx index b8b1afc4a..7bbd2dae4 100644 --- a/src/components/products/BulkActionBar.tsx +++ b/src/components/products/BulkActionBar.tsx @@ -10,7 +10,7 @@ * - Responsivo: labels escondidos em mobile, apenas ícones */ import { memo } from "react"; -import { Heart, GitCompare, FolderPlus, X, CheckSquare, ShoppingBag, FileText, Sparkles, FileDown } from "lucide-react"; +import { Heart, GitCompare, FolderPlus, X, CheckSquare, ShoppingBag, FileText, FileDown } from "lucide-react"; import { Button } from "@/components/ui/button"; import { Badge } from "@/components/ui/badge"; import { Tooltip, TooltipContent, TooltipTrigger } from "@/components/ui/tooltip"; diff --git a/src/components/products/FutureStockModal.tsx b/src/components/products/FutureStockModal.tsx index cfc01ec08..68e00e13b 100644 --- a/src/components/products/FutureStockModal.tsx +++ b/src/components/products/FutureStockModal.tsx @@ -1,13 +1,13 @@ import { useState, useMemo } from "react"; import { format, parseISO, addDays, isAfter, isBefore } from "date-fns"; import { ptBR } from "date-fns/locale"; -import { CalendarClock, Package, Truck, AlertTriangle, Calendar, Loader2, TrendingUp, ArrowUpDown, Filter, Clock } from "lucide-react"; +import { CalendarClock, Package, Truck, AlertTriangle, Calendar, TrendingUp, ArrowUpDown, Filter, Clock } from "lucide-react"; import { Dialog, DialogContent, DialogHeader, DialogTitle } from "@/components/ui/dialog"; import { Badge } from "@/components/ui/badge"; import { ScrollArea } from "@/components/ui/scroll-area"; import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from "@/components/ui/select"; import { cn } from "@/lib/utils"; -import { +import { useProductVariantsWithStock, processStockEntries, calculateColorSummary, diff --git a/src/components/products/PackagingModal.tsx b/src/components/products/PackagingModal.tsx index b13df1d1a..d2adfc443 100644 --- a/src/components/products/PackagingModal.tsx +++ b/src/components/products/PackagingModal.tsx @@ -2,7 +2,7 @@ * PackagingModal - Modal com detalhes da embalagem especial do produto */ import { useState } from "react"; -import { Gift, Package, Ruler, Scale, Boxes, Info, X } from "lucide-react"; +import { Gift, Package, Ruler, Scale, Boxes, Info } from "lucide-react"; import { Dialog, DialogContent, diff --git a/src/components/products/ProductCard.tsx b/src/components/products/ProductCard.tsx index 886674684..9ef99932e 100644 --- a/src/components/products/ProductCard.tsx +++ b/src/components/products/ProductCard.tsx @@ -8,7 +8,6 @@ import { Building2, Package } from "lucide-react"; import { useNavigate } from "react-router-dom"; import { useQueryClient } from "@tanstack/react-query"; import { getCdnUrl, getSrcSet } from "@/utils/image-utils"; -import { Badge } from "@/components/ui/badge"; import { cn } from "@/lib/utils"; import { useProductBounds, type ExternalVariantStock, type Product, usePrefetchProduct } from "@/hooks/products"; import { toast } from "sonner"; @@ -59,7 +58,7 @@ export const ProductCard = memo(forwardRef(functi priority = false, }, ref) { const navigate = useNavigate(); - const queryClient = useQueryClient(); + const _queryClient = useQueryClient(); const { prefetchProduct } = usePrefetchProduct(); const [isHovered, setIsHovered] = useState(false); const [collectionModalOpen, setCollectionModalOpen] = useState(false); diff --git a/src/components/products/ProductGallery.tsx b/src/components/products/ProductGallery.tsx index 5df2a10ff..eaf7a89f4 100644 --- a/src/components/products/ProductGallery.tsx +++ b/src/components/products/ProductGallery.tsx @@ -1,4 +1,4 @@ -import { useState, useRef, useCallback, useEffect, useMemo } from "react"; +import { useState, useRef, useCallback, useEffect } from "react"; import { ChevronLeft, ChevronRight, Play, Maximize2 } from "lucide-react"; import { Button } from "@/components/ui/button"; import { cn } from "@/lib/utils"; diff --git a/src/components/products/ProductGrid.test.tsx b/src/components/products/ProductGrid.test.tsx index 33b1b643c..055b5cc34 100644 --- a/src/components/products/ProductGrid.test.tsx +++ b/src/components/products/ProductGrid.test.tsx @@ -45,7 +45,7 @@ vi.mock('@/components/products/share/SharePreviewDialog', () => ({ // Mock CDN and image utility vi.mock('@/utils/cdn-utils', () => ({ getCdnUrl: (url: string) => url, - getSrcSet: (url: string) => undefined, + getSrcSet: (_url: string) => undefined, })); const queryClient = new QueryClient({ diff --git a/src/components/products/ProductGrid.tsx b/src/components/products/ProductGrid.tsx index 255ccf073..eeaf6edf8 100644 --- a/src/components/products/ProductGrid.tsx +++ b/src/components/products/ProductGrid.tsx @@ -6,7 +6,6 @@ import { useReducedMotion } from "@/hooks/ui"; import { SelectionCheckbox } from "@/components/common/SelectionCheckbox"; import { cn } from "@/lib/utils"; import { ProductCardSkeleton } from "./ProductCardSkeleton"; -import type { ColumnCount } from "./ColumnSelector"; export interface ProductGridProps { products: Product[]; diff --git a/src/components/products/ProductListItem.tsx b/src/components/products/ProductListItem.tsx index 1ff4227fc..178d28e5b 100644 --- a/src/components/products/ProductListItem.tsx +++ b/src/components/products/ProductListItem.tsx @@ -13,14 +13,12 @@ * Favoritar, Comparar, Coleção, Share, Orçamento, Carrinho, QuickView */ import { memo, useState, useCallback, useRef, useEffect } from "react"; -import { Heart, GitCompare, Share2, Package, Building2, FolderPlus, Eye, FileText } from "lucide-react"; +import { Package, Building2 } from "lucide-react"; import { NoveltyBadge } from "./NoveltyBadge"; import { ListItemActions } from "./list-item/ListItemActions"; import { useNavigate } from "react-router-dom"; import { getCdnUrl } from "@/utils/image-utils"; import { Badge } from "@/components/ui/badge"; -import { Button } from "@/components/ui/button"; -import { Tooltip, TooltipContent, TooltipTrigger } from "@/components/ui/tooltip"; import { cn } from "@/lib/utils"; import { isLightColor, type ExternalVariantStock, type Product } from "@/hooks/products"; import { toast } from "sonner"; @@ -31,7 +29,6 @@ import { resolveHighlightHex } from "@/utils/color-group-hex"; import { PriceFreshnessBadge } from "./PriceFreshnessBadge"; import { resolveAllMatchingColors } from "@/utils/color-variant-carousel"; import { showUndoToast, showErrorToast } from "@/utils/undoToast"; -import { QuickAddToQuote } from "./QuickAddToQuote"; import { AddToCollectionModal } from "@/components/collections/AddToCollectionModal"; import { ProductQuickView } from "./ProductQuickView"; import { SharePreviewDialog } from "./share/SharePreviewDialog"; diff --git a/src/components/products/ProductQuickView.tsx b/src/components/products/ProductQuickView.tsx index 3417bd0f2..3ef1742f0 100644 --- a/src/components/products/ProductQuickView.tsx +++ b/src/components/products/ProductQuickView.tsx @@ -1,4 +1,4 @@ -import { useState, useMemo, useCallback, useEffect, forwardRef } from "react"; +import { useState, useMemo, useEffect, forwardRef } from "react"; // framer-motion removido — transição via CSS animate-fade-in import { Heart, @@ -6,27 +6,17 @@ import { Share2, ShoppingCart, Package, - Truck, - ChevronLeft, - ChevronRight, - ExternalLink, - Sparkles, - Layers, - Plus, - Minus, - Ruler, - Weight, - ImageOff, + Truck, ExternalLink, Plus, + Minus } from "lucide-react"; import { useNavigate } from "react-router-dom"; import { Dialog, DialogContent, DialogTitle } from "@/components/ui/dialog"; import { Button } from "@/components/ui/button"; -import { Badge } from "@/components/ui/badge"; import { Separator } from "@/components/ui/separator"; import { Tooltip, TooltipContent, TooltipTrigger } from "@/components/ui/tooltip"; import { VisuallyHidden } from "@/components/a11y/VisuallyHidden"; import { cn } from "@/lib/utils"; -import { useProductImages, type Product, type ProductImage } from "@/hooks/products"; +import { useProductImages, type Product } from "@/hooks/products"; import { ProductCategoryBadges } from "./ProductCategoryBadges"; import { QuickViewGallery } from "./quick-view/QuickViewGallery"; import { ProductColorSelector, type ProductColor } from "./ProductColorSelector"; @@ -61,7 +51,7 @@ export const ProductQuickView = forwardRef(null); // imageLoaded removido — transição instantânea sem skeleton intermediário - const [imageError, setImageError] = useState(false); + const [_imageError, setImageError] = useState(false); // Hook: buscar imagens do produto via BD externo (Briefing v3) const { data: productImages = [] } = useProductImages(open && product ? product.id : null); @@ -168,22 +158,22 @@ export const ProductQuickView = forwardRef { + const _handlePrevImage = () => { setImageError(false); setCurrentImageIndex((prev) => prev === 0 ? displayImages.length - 1 : prev - 1 ); }; - const handleNextImage = () => { + const _handleNextImage = () => { setImageError(false); setCurrentImageIndex((prev) => prev === displayImages.length - 1 ? 0 : prev + 1 diff --git a/src/components/products/ProductSparkline.tsx b/src/components/products/ProductSparkline.tsx index 810a410c8..d8b2f0cd2 100644 --- a/src/components/products/ProductSparkline.tsx +++ b/src/components/products/ProductSparkline.tsx @@ -1,7 +1,7 @@ import { useMemo, useRef, useState, useCallback } from "react"; import { cn } from "@/lib/utils"; import { useSparklineData } from "@/hooks/intelligence"; -import { TrendingUp, TrendingDown, Minus, BarChart3, Zap, Activity } from "lucide-react"; +import { TrendingUp, TrendingDown, Minus, Zap, Activity } from "lucide-react"; interface ProductSparklineProps { productId: string; @@ -89,7 +89,7 @@ export function ProductSparkline({ productId, className }: ProductSparklineProps setTooltipPos({ x: e.clientX - rect.left, y: e.clientY - rect.top }); }, [points.length]); - const handleMouseEnter = useCallback((e: React.MouseEvent) => { + const handleMouseEnter = useCallback((_e: React.MouseEvent) => { if (hoverIndex === null) { const container = containerRef.current; if (!container) return; diff --git a/src/components/products/ProductStickyHeader.tsx b/src/components/products/ProductStickyHeader.tsx index 7d69b21a0..35a5ff23c 100644 --- a/src/components/products/ProductStickyHeader.tsx +++ b/src/components/products/ProductStickyHeader.tsx @@ -1,7 +1,7 @@ import { useState, useEffect } from "react"; import { useNavigate } from "react-router-dom"; import { motion, AnimatePresence } from "framer-motion"; -import { ShoppingCart, Heart, FileText } from "lucide-react"; +import { Heart, FileText } from "lucide-react"; import { Button } from "@/components/ui/button"; import { QuickAddToQuote } from "./QuickAddToQuote"; import { BulkVariantWizard } from "@/components/catalog/BulkVariantWizard"; diff --git a/src/components/products/ProductTableView.tsx b/src/components/products/ProductTableView.tsx index 19ca3d306..5fd7988ee 100644 --- a/src/components/products/ProductTableView.tsx +++ b/src/components/products/ProductTableView.tsx @@ -8,13 +8,12 @@ * ✅ PERFORMANCE 10/10: Virtualização implementada para suportar 15.000+ itens. */ import { memo, useState, useCallback, useMemo, useRef, useEffect } from "react"; -import { ArrowUpDown, ArrowUp, ArrowDown, Package, Loader2, Check } from "lucide-react"; +import { ArrowUpDown, ArrowUp, ArrowDown, Package, Loader2 } from "lucide-react"; import { useVirtualizer } from "@tanstack/react-virtual"; import { TableRowActions } from "./table-view/TableRowActions"; import { resolveColorImage, resolveColorStock, getActiveColorName, type ActiveColorFilter } from "@/utils/color-image-resolver"; import { resolveHighlightHex } from "@/utils/color-group-hex"; import { useNavigate } from "react-router-dom"; -import { Button } from "@/components/ui/button"; import { Badge } from "@/components/ui/badge"; import { Tooltip, TooltipContent, TooltipTrigger } from "@/components/ui/tooltip"; import { cn } from "@/lib/utils"; @@ -262,7 +261,7 @@ export const ProductTableView = memo(function ProductTableView({ const displayStatus = colorStock?.stockStatus ?? product.stockStatus; const activeColorName = getActiveColorName(product, activeColorFilter); const isSelected = selectionMode && selectedIds?.has(product.id); - const matchedColor = resolveHighlightHex(product.colors, activeColorFilter, highlightColors); + const _matchedColor = resolveHighlightHex(product.colors, activeColorFilter, highlightColors); return (
1; - const sharePercent = bestVelocity > 0 + const _sharePercent = bestVelocity > 0 ? Math.round((v.avg_daily_depletion_7d / bestVelocity) * 100) : 0; diff --git a/src/components/products/customization/ConfigurationPanel.tsx b/src/components/products/customization/ConfigurationPanel.tsx index 760f9de10..8d443da5c 100644 --- a/src/components/products/customization/ConfigurationPanel.tsx +++ b/src/components/products/customization/ConfigurationPanel.tsx @@ -9,7 +9,6 @@ import { useState, useEffect, useCallback, useMemo, useRef } from "react"; import { Loader2, Palette, Clock, Ruler, AlertCircle, Check } from "lucide-react"; -import { Badge } from "@/components/ui/badge"; import { Input } from "@/components/ui/input"; import { Label } from "@/components/ui/label"; import { cn } from "@/lib/utils"; diff --git a/src/components/products/customization/__tests__/LocationPanelAdvanced.test.tsx b/src/components/products/customization/__tests__/LocationPanelAdvanced.test.tsx index 48d3674a9..3cdc5a07d 100644 --- a/src/components/products/customization/__tests__/LocationPanelAdvanced.test.tsx +++ b/src/components/products/customization/__tests__/LocationPanelAdvanced.test.tsx @@ -4,7 +4,6 @@ import { describe, it, expect, vi, beforeEach } from "vitest"; import { render, screen, within, fireEvent } from "@testing-library/react"; -import { toast } from "sonner"; import { LocationPanel } from "../LocationPanel"; import type { GravacaoLocation, TechniqueOption, CustomizationPriceResponseV6 } from "@/types/customization"; diff --git a/src/components/products/share/ShareAllColorsDialog.tsx b/src/components/products/share/ShareAllColorsDialog.tsx index 627ef1db8..3d5a80951 100644 --- a/src/components/products/share/ShareAllColorsDialog.tsx +++ b/src/components/products/share/ShareAllColorsDialog.tsx @@ -1,5 +1,5 @@ import { useState, useCallback, useMemo } from "react"; -import { Palette, Send, Check, X, Eye, Pencil } from "lucide-react"; +import { Palette, Send, Check, Eye, Pencil } from "lucide-react"; import { Button } from "@/components/ui/button"; import { Dialog, diff --git a/src/components/products/share/usePhotoDownload.ts b/src/components/products/share/usePhotoDownload.ts index 79840b40b..bd4599edd 100644 --- a/src/components/products/share/usePhotoDownload.ts +++ b/src/components/products/share/usePhotoDownload.ts @@ -54,7 +54,7 @@ export function usePhotoDownload() { title: "Download concluído", description: `${images.length} foto(s) baixada(s)`, }); - } catch (err) { + } catch (_err) { toast({ title: "Erro no download", description: "Não foi possível baixar as fotos", diff --git a/src/components/providers/AppBootstrap.tsx b/src/components/providers/AppBootstrap.tsx index 6c5587a58..8f199c09f 100644 --- a/src/components/providers/AppBootstrap.tsx +++ b/src/components/providers/AppBootstrap.tsx @@ -1,7 +1,6 @@ -import { type ReactNode, useEffect, useState, useCallback } from "react"; +import { type ReactNode, useEffect, useState } from "react"; import { useAuth } from "@/contexts/AuthContext"; import { supabase } from "@/integrations/supabase/client"; -import { useOnboardingContext } from "@/contexts/OnboardingContext"; import { AlertTriangle, RefreshCw } from "lucide-react"; import { Button } from "@/components/ui/button"; diff --git a/src/components/quotes/AdminTemplatesManager.tsx b/src/components/quotes/AdminTemplatesManager.tsx index 0bed4e8bf..e0e0c6fbb 100644 --- a/src/components/quotes/AdminTemplatesManager.tsx +++ b/src/components/quotes/AdminTemplatesManager.tsx @@ -6,7 +6,6 @@ import { useState, useMemo } from "react"; import { formatCurrency } from "@/lib/format"; import { Card, CardContent } from "@/components/ui/card"; import { Button } from "@/components/ui/button"; -import { Badge } from "@/components/ui/badge"; import { Input } from "@/components/ui/input"; import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from "@/components/ui/select"; import { Separator } from "@/components/ui/separator"; diff --git a/src/components/quotes/PdfGenerationDialog.tsx b/src/components/quotes/PdfGenerationDialog.tsx index 0aacdbb8f..ec293519c 100644 --- a/src/components/quotes/PdfGenerationDialog.tsx +++ b/src/components/quotes/PdfGenerationDialog.tsx @@ -5,7 +5,7 @@ */ import { useState, useCallback, useRef } from "react"; -import { Download, FileText, Eye, Loader2, Check, Send, Copy, Link2, MessageCircle, Mail, Printer } from "lucide-react"; +import { Download, FileText, Loader2, Check, Printer } from "lucide-react"; import { Dialog, DialogContent, DialogHeader, DialogTitle, DialogTrigger } from "@/components/ui/dialog"; import { Button } from "@/components/ui/button"; import { Badge } from "@/components/ui/badge"; @@ -104,7 +104,7 @@ export function PdfGenerationDialog({ setPdfVersion((v) => v + 1); }; - const handleEmail = () => { + const _handleEmail = () => { const subject = encodeURIComponent(`Proposta Comercial ${quoteNumber || ""}`); const body = encodeURIComponent( `Olá,\n\nSegue a proposta comercial ${quoteNumber || ""}.\n\nQualquer dúvida, estou à disposição!\n\nAtt.` diff --git a/src/components/quotes/QuoteAutoSave.tsx b/src/components/quotes/QuoteAutoSave.tsx index d35606267..f9969f968 100644 --- a/src/components/quotes/QuoteAutoSave.tsx +++ b/src/components/quotes/QuoteAutoSave.tsx @@ -7,7 +7,6 @@ import { useState, useEffect, useCallback, useRef } from "react"; import { Cloud, CloudOff, Check, Loader2, AlertCircle } from "lucide-react"; import { motion, AnimatePresence } from "framer-motion"; import { Badge } from "@/components/ui/badge"; -import { Button } from "@/components/ui/button"; import { Tooltip, TooltipContent, @@ -164,7 +163,7 @@ export function QuoteAutoSave({ } }, [storageKey, quoteId]); - const handleDiscard = () => { + const _handleDiscard = () => { localStorage.removeItem(storageKey); const keysToRemove: string[] = []; diff --git a/src/components/quotes/QuoteBuilderProductSearch.tsx b/src/components/quotes/QuoteBuilderProductSearch.tsx index 263bd0b6e..3f0347e9a 100644 --- a/src/components/quotes/QuoteBuilderProductSearch.tsx +++ b/src/components/quotes/QuoteBuilderProductSearch.tsx @@ -4,7 +4,6 @@ import { Button } from "@/components/ui/button"; import { Input } from "@/components/ui/input"; -import { Badge } from "@/components/ui/badge"; import { Dialog, DialogContent, DialogHeader, DialogTitle } from "@/components/ui/dialog"; import { AlertTriangle, Package, PackageCheck, Search, X } from "lucide-react"; import { cn } from "@/lib/utils"; diff --git a/src/components/quotes/QuoteBuilderSummaryColumn.tsx b/src/components/quotes/QuoteBuilderSummaryColumn.tsx index 11204e1f2..3150732a8 100644 --- a/src/components/quotes/QuoteBuilderSummaryColumn.tsx +++ b/src/components/quotes/QuoteBuilderSummaryColumn.tsx @@ -5,16 +5,14 @@ import { useState, useMemo } from "react"; import { Badge } from "@/components/ui/badge"; import { Button } from "@/components/ui/button"; -import { Input } from "@/components/ui/input"; import { CurrencyInput } from "@/components/ui/currency-input"; import { Textarea } from "@/components/ui/textarea"; import { Label } from "@/components/ui/label"; import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from "@/components/ui/select"; -import { Tooltip, TooltipContent, TooltipTrigger } from "@/components/ui/tooltip"; import { Dialog, DialogContent, DialogHeader, DialogTitle, DialogDescription, DialogFooter, } from "@/components/ui/dialog"; -import { AlertTriangle, Edit, Loader2, Package, Percent, Save, Send, Shield, ShoppingCart, Trash2, CheckCircle2, X } from "lucide-react"; +import { AlertTriangle, Edit, Loader2, Package, Save, Send, Shield, ShoppingCart, Trash2, CheckCircle2, X } from "lucide-react"; import { cn } from "@/lib/utils"; import type { QuoteItem } from "@/hooks/quotes"; import { NegotiationMarkupCard } from "@/components/quotes/NegotiationMarkupCard"; diff --git a/src/components/quotes/QuoteStatusTimeline.tsx b/src/components/quotes/QuoteStatusTimeline.tsx index 7e1940831..ac2e9c77c 100644 --- a/src/components/quotes/QuoteStatusTimeline.tsx +++ b/src/components/quotes/QuoteStatusTimeline.tsx @@ -1,4 +1,4 @@ -import { Check, Clock, Eye, FileText, RefreshCw, Send, Shield, ThumbsDown, ThumbsUp, AlertTriangle } from "lucide-react"; +import { Check, Clock, FileText, RefreshCw, Send, Shield, ThumbsDown, AlertTriangle } from "lucide-react"; import { cn } from "@/lib/utils"; import { format } from "date-fns"; import { ptBR } from "date-fns/locale"; diff --git a/src/components/quotes/QuoteValidityBanner.tsx b/src/components/quotes/QuoteValidityBanner.tsx index ac38a1fe7..f7d74d921 100644 --- a/src/components/quotes/QuoteValidityBanner.tsx +++ b/src/components/quotes/QuoteValidityBanner.tsx @@ -1,6 +1,5 @@ import { differenceInDays, parseISO, isValid } from "date-fns"; import { AlertTriangle, Clock, CheckCircle2 } from "lucide-react"; -import { cn } from "@/lib/utils"; interface QuoteValidityBannerProps { validUntil?: string; diff --git a/src/components/quotes/QuoteVersionCompare.tsx b/src/components/quotes/QuoteVersionCompare.tsx index 776f2c0be..a650fbc3a 100644 --- a/src/components/quotes/QuoteVersionCompare.tsx +++ b/src/components/quotes/QuoteVersionCompare.tsx @@ -207,7 +207,7 @@ export function QuoteVersionCompare({ open, onOpenChange, versions, currentQuote {[leftDetail, rightDetail].map((detail) => (

v{detail.version}

- {detail.items.map((item, i) => { + {detail.items.map((item, _i) => { const otherDetail = detail === leftDetail ? rightDetail : leftDetail; const otherItem = otherDetail.items.find(oi => oi.product_sku === item.product_sku); const isNew = !otherItem; diff --git a/src/components/quotes/QuoteVersionHistory.tsx b/src/components/quotes/QuoteVersionHistory.tsx index a483ed086..eeb363f40 100644 --- a/src/components/quotes/QuoteVersionHistory.tsx +++ b/src/components/quotes/QuoteVersionHistory.tsx @@ -2,7 +2,7 @@ import { useEffect, useState } from "react"; import { useNavigate } from "react-router-dom"; import { format } from "date-fns"; import { ptBR } from "date-fns/locale"; -import { GitBranch, GitCompare, Plus, Eye, Check, Clock, FileText } from "lucide-react"; +import { GitBranch, GitCompare, Plus, Eye, Clock, FileText } from "lucide-react"; import { QuoteVersionCompare } from "./QuoteVersionCompare"; import { Button } from "@/components/ui/button"; import { Badge } from "@/components/ui/badge"; @@ -10,7 +10,7 @@ import { Card, CardContent, CardHeader, CardTitle } from "@/components/ui/card"; import { Separator } from "@/components/ui/separator"; import { Tooltip, TooltipContent, TooltipTrigger } from "@/components/ui/tooltip"; import { ScrollArea } from "@/components/ui/scroll-area"; -import { useQuoteVersions, type QuoteVersion } from "@/hooks/quotes"; +import { useQuoteVersions } from "@/hooks/quotes"; import { QUOTE_STATUS_CONFIG } from "@/lib/quote-status-config"; import { formatCurrency } from "@/lib/format"; diff --git a/src/components/quotes/SaveAsTemplateButton.tsx b/src/components/quotes/SaveAsTemplateButton.tsx index ac1faaa48..55ab330b4 100644 --- a/src/components/quotes/SaveAsTemplateButton.tsx +++ b/src/components/quotes/SaveAsTemplateButton.tsx @@ -38,7 +38,7 @@ export function SaveAsTemplateButton({ onSaved?.(); }; - const initialTemplate = { + const _initialTemplate = { name: "", description: "", is_default: false, diff --git a/src/components/ramo-atividade/RamoAtividadeGroupAccordion.tsx b/src/components/ramo-atividade/RamoAtividadeGroupAccordion.tsx index a98944b2e..b559ce1c6 100644 --- a/src/components/ramo-atividade/RamoAtividadeGroupAccordion.tsx +++ b/src/components/ramo-atividade/RamoAtividadeGroupAccordion.tsx @@ -1,5 +1,5 @@ -import React, { useState } from "react"; -import { ChevronDown, Building2, Check } from "lucide-react"; +import { useState } from "react"; +import { ChevronDown, Check } from "lucide-react"; import { Checkbox } from "@/components/ui/checkbox"; import { cn } from "@/lib/utils"; import type { RamoAtividadeGroup, SegmentoComplete } from "@/types/ramo-atividade"; diff --git a/src/components/reports/ScheduledReportsManager.tsx b/src/components/reports/ScheduledReportsManager.tsx index 2ebf2186c..a0c23a493 100644 --- a/src/components/reports/ScheduledReportsManager.tsx +++ b/src/components/reports/ScheduledReportsManager.tsx @@ -1,7 +1,7 @@ import { useState } from 'react'; import { format } from 'date-fns'; import { ptBR } from 'date-fns/locale'; -import { CalendarClock, Plus, Trash2, Pause, Play, Mail, Clock, FileBarChart } from 'lucide-react'; +import { CalendarClock, Plus, Trash2, Mail, Clock, FileBarChart } from 'lucide-react'; import { Card, CardContent, CardHeader, CardTitle } from '@/components/ui/card'; import { Button } from '@/components/ui/button'; import { Badge } from '@/components/ui/badge'; @@ -10,7 +10,6 @@ import { Input } from '@/components/ui/input'; import { Label } from '@/components/ui/label'; import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from '@/components/ui/select'; import { Dialog, DialogContent, DialogHeader, DialogTitle, DialogTrigger } from '@/components/ui/dialog'; -import { Separator } from '@/components/ui/separator'; import { AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogTitle, AlertDialogTrigger } from '@/components/ui/alert-dialog'; import { useScheduledReports, diff --git a/src/components/search/GlobalSearchHelpers.tsx b/src/components/search/GlobalSearchHelpers.tsx index 6fba2754d..32f381d47 100644 --- a/src/components/search/GlobalSearchHelpers.tsx +++ b/src/components/search/GlobalSearchHelpers.tsx @@ -6,7 +6,7 @@ import { Badge } from "@/components/ui/badge"; import { CommandItem, } from "@/components/ui/command"; -import { Trophy, Medal, ArrowUpRight, ChevronRight } from "lucide-react"; +import { Trophy, Medal, ArrowUpRight } from "lucide-react"; import { cn } from "@/lib/utils"; export const paletteItemStateClass = diff --git a/src/components/search/GlobalSearchIdleState.tsx b/src/components/search/GlobalSearchIdleState.tsx index 8a1caa91e..437dbd1e3 100644 --- a/src/components/search/GlobalSearchIdleState.tsx +++ b/src/components/search/GlobalSearchIdleState.tsx @@ -67,7 +67,7 @@ function RankBadge({ index }: { index: number }) { } /* ── Quick Actions ── */ -const quickActions = [ +const _quickActions = [ { id: "new-quote", title: "Novo Orçamento", description: "Criar um novo orçamento", icon: , href: "/orcamentos/novo", shortcut: "N", highlight: true }, { id: "products", title: "Catálogo de Produtos", description: "Ver todos os produtos", icon: , href: "/" }, ]; diff --git a/src/components/search/GlobalSearchPalette.tsx b/src/components/search/GlobalSearchPalette.tsx index 210c30155..d8e67b3b2 100644 --- a/src/components/search/GlobalSearchPalette.tsx +++ b/src/components/search/GlobalSearchPalette.tsx @@ -2,10 +2,10 @@ * GlobalSearchPalette — High-contrast black redesign * Helper components extracted to GlobalSearchHelpers.tsx */ -import React, { lazy, Suspense, useEffect, useCallback } from "react"; +import { lazy, Suspense, useEffect, useCallback } from "react"; import { - CommandDialog, CommandEmpty, CommandGroup, CommandInput, - CommandItem, CommandList, CommandSeparator, + CommandDialog, CommandGroup, CommandInput, + CommandItem, CommandList } from "@/components/ui/command"; import { Badge } from "@/components/ui/badge"; import { Button } from "@/components/ui/button"; @@ -20,7 +20,7 @@ import { cn } from "@/lib/utils"; import { useGlobalSearch } from "./useGlobalSearch"; import { typeConfig } from "./search-types"; import { GlobalSearchIdleState } from "./GlobalSearchIdleState"; -import { paletteItemStateClass, NavCard, staggerStyle, type QuickAction } from "./GlobalSearchHelpers"; +import { paletteItemStateClass, staggerStyle, type QuickAction } from "./GlobalSearchHelpers"; import { HighlightMatch } from "./HighlightMatch"; import { EmptySearchState } from "./EmptySearchState"; diff --git a/src/components/search/VoiceSearchOverlay.tsx b/src/components/search/VoiceSearchOverlay.tsx index e761e3151..3b8c74316 100644 --- a/src/components/search/VoiceSearchOverlay.tsx +++ b/src/components/search/VoiceSearchOverlay.tsx @@ -46,7 +46,7 @@ export const VoiceSearchOverlay = React.forwardRef `/placeholder.svg`; +const img = (_name: string) => `/placeholder.svg`; export const MOCK_MATCH_PRODUCTS: Product[] = [ // ── CHURRASCO cluster ── diff --git a/src/hooks/auth/useProfileRoles.ts b/src/hooks/auth/useProfileRoles.ts index 34d641565..99f3cd88f 100644 --- a/src/hooks/auth/useProfileRoles.ts +++ b/src/hooks/auth/useProfileRoles.ts @@ -3,7 +3,6 @@ import { supabase } from '@/integrations/supabase/client'; import { authService } from '@/services/authService'; import { authDebug, authDebugError } from '@/lib/auth/auth-debug'; import { type AppRole, type Profile } from '@/contexts/AuthContext'; -import { logger } from '@/lib/logger'; export function useProfileRoles() { const [profile, setProfile] = useState(null); diff --git a/src/hooks/simulator/useSimulatorWizard.ts b/src/hooks/simulator/useSimulatorWizard.ts index a18c963d9..7366fa983 100644 --- a/src/hooks/simulator/useSimulatorWizard.ts +++ b/src/hooks/simulator/useSimulatorWizard.ts @@ -52,7 +52,7 @@ export function useSimulatorWizard() { staleTime: 10 * 60 * 1000, }); - useEffect(() => { if (locationsData) dispatch({ type: 'SET_AVAILABLE_LOCATIONS', payload: locationsData }); }, [locationsData]); + useEffect(() => { if (locationsData) dispatch({ type: 'SET_AVAILABLE_LOCATIONS', payload: locationsData }); }, [locationsData, dispatch]); const { fetchComparisonPrices, confirmTechnique } = useWizardPricing({ state, dispatch }); useWizardPersistence(state); @@ -61,39 +61,39 @@ export function useSimulatorWizard() { const setStep = useCallback((step: WizardStep) => { if (canNavigateToStep(step, state)) dispatch({ type: 'SET_STEP', payload: step }); else toast.warning('Complete os passos anteriores primeiro'); - }, [state]); + }, [state, dispatch]); const nextStep = useCallback(() => { const next = getNextStep(state.currentStep); if (next && isStepComplete(state.currentStep, state)) dispatch({ type: 'SET_STEP', payload: next }); - }, [state]); + }, [state, dispatch]); const previousStep = useCallback(() => { const prev = getPreviousStep(state.currentStep); if (prev) dispatch({ type: 'SET_STEP', payload: prev }); - }, [state.currentStep]); + }, [state.currentStep, dispatch]); const selectProduct = useCallback((product: SelectedProduct | null) => { dispatch({ type: 'SELECT_PRODUCT', payload: product }); if (product) dispatch({ type: 'SET_STEP', payload: 'location' }); - }, []); + }, [dispatch]); const setQuantity = useCallback((quantity: number) => { const newQty = Math.max(1, quantity); dispatch({ type: 'SET_QUANTITY', payload: newQty }); if (state.personalizations.length > 0 && newQty !== state.quantity) toast.info('Recalculando preços para nova tiragem...', { duration: 2000 }); - }, [state.personalizations.length, state.quantity]); + }, [state.personalizations.length, state.quantity, dispatch]); const selectLocation = useCallback((location: EngravingLocation | null) => { dispatch({ type: 'SELECT_LOCATION', payload: location }); if (location) dispatch({ type: 'SET_STEP', payload: 'specs' }); - }, []); + }, [dispatch]); - const updateSpecs = useCallback((specs: Partial) => { dispatch({ type: 'UPDATE_SPECS', payload: specs }); }, []); - const removePersonalization = useCallback((id: string) => { dispatch({ type: 'REMOVE_PERSONALIZATION', payload: id }); toast.info('Gravação removida'); }, []); - const removeAllPersonalizations = useCallback(() => { dispatch({ type: 'REMOVE_ALL_PERSONALIZATIONS' }); toast.info('Todas as gravações removidas'); }, []); - const editPersonalization = useCallback((index: number) => { dispatch({ type: 'EDIT_PERSONALIZATION', payload: index }); }, []); + const updateSpecs = useCallback((specs: Partial) => { dispatch({ type: 'UPDATE_SPECS', payload: specs }); }, [dispatch]); + const removePersonalization = useCallback((id: string) => { dispatch({ type: 'REMOVE_PERSONALIZATION', payload: id }); toast.info('Gravação removida'); }, [dispatch]); + const removeAllPersonalizations = useCallback(() => { dispatch({ type: 'REMOVE_ALL_PERSONALIZATIONS' }); toast.info('Todas as gravações removidas'); }, [dispatch]); + const editPersonalization = useCallback((index: number) => { dispatch({ type: 'EDIT_PERSONALIZATION', payload: index }); }, [dispatch]); const startNewPersonalization = useCallback(() => { const usedIds = new Set(state.personalizations.map(p => p.location.id)); @@ -101,9 +101,9 @@ export function useSimulatorWizard() { toast.warning('Todos os locais já foram personalizados'); return; } dispatch({ type: 'START_NEW_PERSONALIZATION' }); - }, [state.personalizations, state.availableLocations]); + }, [state.personalizations, state.availableLocations, dispatch]); - const cancelPersonalization = useCallback(() => { dispatch({ type: 'CANCEL_PERSONALIZATION' }); }, []); + const cancelPersonalization = useCallback(() => { dispatch({ type: 'CANCEL_PERSONALIZATION' }); }, [dispatch]); const duplicatePersonalization = useCallback((sourceId: string, targetLocationId: string) => { const targetLocation = state.availableLocations.find(loc => loc.id === targetLocationId); @@ -113,9 +113,9 @@ export function useSimulatorWizard() { } dispatch({ type: 'DUPLICATE_PERSONALIZATION', payload: { sourceId, targetLocation } }); toast.success(`Personalização duplicada para ${targetLocation.locationName}`); - }, [state.availableLocations, state.personalizations]); + }, [state.availableLocations, state.personalizations, dispatch]); - const resetWizard = useCallback(() => { dispatch({ type: 'RESET_WIZARD' }); clearSession(); }, []); + const resetWizard = useCallback(() => { dispatch({ type: 'RESET_WIZARD' }); clearSession(); }, [dispatch]); // Computed const effectivePrice = useMemo(() => state.selectedProduct?.price || 0, [state.selectedProduct]); diff --git a/src/hooks/ui/useGlobalShortcuts.ts b/src/hooks/ui/useGlobalShortcuts.ts index 5cf07652f..dcb9bdcc2 100644 --- a/src/hooks/ui/useGlobalShortcuts.ts +++ b/src/hooks/ui/useGlobalShortcuts.ts @@ -33,7 +33,7 @@ export function useGlobalShortcuts(handlers?: ShortcutHandlers) { let onboarding: any = null; try { onboarding = useOnboardingContext(); - } catch (e) { + } catch (_e) { // Context may not be available outside MainLayout } diff --git a/src/pages/Simulation.tsx b/src/pages/Simulation.tsx index 23bb979a9..bbbad63b8 100644 --- a/src/pages/Simulation.tsx +++ b/src/pages/Simulation.tsx @@ -1,5 +1,5 @@ import { useState } from "react"; -import { Play, CheckCircle2, XCircle, Loader2, Database, Globe, Zap, ShieldAlert, BarChart3, AlertTriangle } from "lucide-react"; +import { Play, CheckCircle2, Loader2, Database, Zap, ShieldAlert, BarChart3, AlertTriangle } from "lucide-react"; import { Button } from "@/components/ui/button"; import { Card, CardContent, CardDescription, CardHeader, CardTitle } from "@/components/ui/card"; import { Badge } from "@/components/ui/badge"; diff --git a/src/pages/auth/AuthBranding.tsx b/src/pages/auth/AuthBranding.tsx index 9706de120..230af424f 100644 --- a/src/pages/auth/AuthBranding.tsx +++ b/src/pages/auth/AuthBranding.tsx @@ -2,8 +2,8 @@ * Left-side branding panel for Auth page — extracted for modularity */ import React, { useState, useEffect, useRef, useCallback } from "react"; -import { motion, AnimatePresence } from "framer-motion"; -import { Gift, Package, Factory, SlidersHorizontal, Brain, Rocket } from "lucide-react"; +import { motion } from "framer-motion"; +import { Package, Factory, SlidersHorizontal, Brain, Rocket } from "lucide-react"; import { AppLogo } from "@/components/layout/AppLogo"; import astronautSvg from "@/assets/astronaut.svg"; @@ -250,7 +250,7 @@ export const SpaceScene = React.memo(({ isFull = true }: { isFull?: boolean }) = ))} {/* Floating Astronauts — Sincronizados, Menores e com Parallax Mouse + Scroll */} - {!config.reducedMotion && astronauts.map((a, idx) => { + {!config.reducedMotion && astronauts.map((a, _idx) => { // Tamanhos reduzidos e escala baseada na profundidade, perfil global e ajuste individual const baseSize = 35; const size = baseSize * a.depth * config.depthProfile * (a.individualScale ?? 1.0); diff --git a/src/pages/auth/ResetPassword.tsx b/src/pages/auth/ResetPassword.tsx index 60c6374db..7723b3ebd 100644 --- a/src/pages/auth/ResetPassword.tsx +++ b/src/pages/auth/ResetPassword.tsx @@ -3,7 +3,7 @@ import { useNavigate } from 'react-router-dom'; import { z } from 'zod'; import { useForm } from 'react-hook-form'; import { zodResolver } from '@hookform/resolvers/zod'; -import { Lock, Loader2, Eye, EyeOff, CheckCircle, Sparkles, Rocket } from 'lucide-react'; +import { Lock, Loader2, Eye, EyeOff, CheckCircle } from 'lucide-react'; import { AppLogo } from '@/components/layout/AppLogo'; import { PasswordStrengthIndicator } from '@/components/auth/PasswordStrengthIndicator'; import { Button } from '@/components/ui/button'; @@ -15,7 +15,6 @@ import { supabase } from '@/integrations/supabase/client'; import { PageSEO } from '@/components/seo/PageSEO'; import { LegalFooter } from '@/components/auth/LegalFooter'; import { SpaceScene } from "@/pages/auth/AuthBranding"; -import { motion, AnimatePresence } from 'framer-motion'; const resetPasswordSchema = z .object({ diff --git a/src/pages/auth/SSOCallbackPage.tsx b/src/pages/auth/SSOCallbackPage.tsx index 4e0867bdf..5654f8548 100644 --- a/src/pages/auth/SSOCallbackPage.tsx +++ b/src/pages/auth/SSOCallbackPage.tsx @@ -11,7 +11,6 @@ import { consumePostLoginRedirect } from '@/lib/auth/post-login-redirect'; import { clearOAuthPending } from '@/lib/auth/oauth-pending'; import { explainOAuthError, type OAuthErrorExplanation } from '@/lib/auth/oauth-error-explainer'; import { SpaceScene } from "@/pages/auth/AuthBranding"; -import { motion } from 'framer-motion'; /** * Callback do login social via Supabase Auth. diff --git a/src/pages/quotes/useQuotesListPage.ts b/src/pages/quotes/useQuotesListPage.ts index a6291179b..67f0655a5 100644 --- a/src/pages/quotes/useQuotesListPage.ts +++ b/src/pages/quotes/useQuotesListPage.ts @@ -1,10 +1,8 @@ import { useState, useMemo } from 'react'; import { useNavigate } from 'react-router-dom'; -import { toast } from 'sonner'; import confetti from 'canvas-confetti'; import Fuse from 'fuse.js'; import { useQuoteFunnel, useQuotes } from "@/hooks/quotes"; -import { Quote } from '@/hooks/quotes/quoteTypes'; export type SortOption = 'newest' | 'oldest' | 'highest' | 'lowest' | 'expiring'; diff --git a/src/services/authService.ts b/src/services/authService.ts index 565efce20..6f9f1ea2a 100644 --- a/src/services/authService.ts +++ b/src/services/authService.ts @@ -1,6 +1,4 @@ import { supabase } from "@/integrations/supabase/client"; -import { AppRole, Profile } from "@/contexts/AuthContext"; -import { authDebug, authDebugError } from "@/lib/auth/auth-debug"; import { logger } from "@/lib/logger"; export const authService = { diff --git a/src/tests/AdminMobileInteraction.test.tsx b/src/tests/AdminMobileInteraction.test.tsx index 02428ddc2..a6960ac88 100644 --- a/src/tests/AdminMobileInteraction.test.tsx +++ b/src/tests/AdminMobileInteraction.test.tsx @@ -1,4 +1,4 @@ -import { describe, it, expect, vi } from 'vitest'; +import { describe, it, expect } from 'vitest'; import { render, screen, fireEvent } from '@testing-library/react'; import { MemoryRouter } from 'react-router-dom'; import { QueryClient, QueryClientProvider } from '@tanstack/react-query'; diff --git a/src/tests/AdminStructuralComparison.test.tsx b/src/tests/AdminStructuralComparison.test.tsx index 46d8177e6..a574cff13 100644 --- a/src/tests/AdminStructuralComparison.test.tsx +++ b/src/tests/AdminStructuralComparison.test.tsx @@ -1,5 +1,5 @@ import { describe, it, expect } from 'vitest'; -import { render, screen } from '@testing-library/react'; +import { render } from '@testing-library/react'; import { MemoryRouter } from 'react-router-dom'; import { QueryClient, QueryClientProvider } from '@tanstack/react-query'; import { ThemeProvider } from '@/contexts/ThemeContext'; diff --git a/src/tests/CatalogFilteringLogic.test.tsx b/src/tests/CatalogFilteringLogic.test.tsx index bd0bc96b0..b9df047c5 100644 --- a/src/tests/CatalogFilteringLogic.test.tsx +++ b/src/tests/CatalogFilteringLogic.test.tsx @@ -1,4 +1,4 @@ -import { describe, it, expect, vi, beforeEach } from 'vitest'; +import { describe, it, expect } from 'vitest'; import { renderHook } from '@testing-library/react'; import { useCatalogFiltering } from '../hooks/products/useCatalogFiltering'; import { defaultFilters } from '../components/filters/FilterPanel'; diff --git a/src/tests/ScenarioSimulation.test.ts b/src/tests/ScenarioSimulation.test.ts index 0a391631e..a6a124e6a 100644 --- a/src/tests/ScenarioSimulation.test.ts +++ b/src/tests/ScenarioSimulation.test.ts @@ -1,5 +1,5 @@ import { describe, it, expect } from 'vitest'; -import { loginSchema, signupSchema } from '../lib/validations/authSchema'; +import { loginSchema } from '../lib/validations/authSchema'; import { quoteFormSchema } from '../lib/validations/quoteSchema'; describe('Real-World Scenario: Security & Validation Layer', () => { diff --git a/src/tests/quotePersistence.test.ts b/src/tests/quotePersistence.test.ts index 117eb0224..2e3de19ad 100644 --- a/src/tests/quotePersistence.test.ts +++ b/src/tests/quotePersistence.test.ts @@ -1,6 +1,5 @@ -import { describe, it, expect, vi } from 'vitest'; -import { calculateQuoteTotals, round2 } from '../hooks/quotes/quoteHelpers'; -import { quoteService } from '../services/quoteService'; +import { describe, it, expect } from 'vitest'; +import { calculateQuoteTotals } from '../hooks/quotes/quoteHelpers'; import { type QuoteItem } from '../hooks/quotes/quoteTypes'; // Mock Supabase to avoid real network calls if needed, diff --git a/src/types/jspdf-autotable.d.ts b/src/types/jspdf-autotable.d.ts index 039ed961c..46dede1ac 100644 --- a/src/types/jspdf-autotable.d.ts +++ b/src/types/jspdf-autotable.d.ts @@ -2,7 +2,7 @@ * Type declarations for jspdf-autotable plugin. * Eliminates doc.lastAutoTable pattern. */ -import { jsPDF } from "jspdf"; +import "jspdf"; declare module "jspdf" { interface jsPDF { diff --git a/src/utils/excelExport.ts b/src/utils/excelExport.ts index 7b8456e57..34e68eb39 100644 --- a/src/utils/excelExport.ts +++ b/src/utils/excelExport.ts @@ -169,7 +169,6 @@ function formatValue(value: unknown): string | number { /** * Formata moeda brasileira */ -import { formatCurrency } from "@/lib/format"; /** diff --git a/src/utils/performance.ts b/src/utils/performance.ts index ab795f216..918aba3ab 100644 --- a/src/utils/performance.ts +++ b/src/utils/performance.ts @@ -39,7 +39,7 @@ class PerformanceTracker { private saveHistory() { try { localStorage.setItem(STORAGE_KEY, JSON.stringify(this.history.slice(-MAX_HISTORY))); - } catch (e) { + } catch (_e) { // Ignore quota errors } } @@ -76,7 +76,7 @@ class PerformanceTracker { } return measure; - } catch (e) { + } catch (_e) { // Mark might not exist yet } }