diff --git a/openaev-front/package.json b/openaev-front/package.json index 89e5b4ed2ea..ac7d7f1c793 100644 --- a/openaev-front/package.json +++ b/openaev-front/package.json @@ -79,7 +79,7 @@ "@eslint/js": "9.38.0", "@faker-js/faker": "10.1.0", "@playwright/test": "1.56.1", - "@stylistic/eslint-plugin": "4.4.1", + "@stylistic/eslint-plugin": "5.6.1", "@testing-library/dom": "10.4.1", "@testing-library/react": "16.3.0", "@types/d3-hierarchy": "3.1.7", diff --git a/openaev-front/src/admin/components/workspaces/custom_dashboards/widgets/WidgetTitle.tsx b/openaev-front/src/admin/components/workspaces/custom_dashboards/widgets/WidgetTitle.tsx index f7d708bbf37..eef14fc7d64 100644 --- a/openaev-front/src/admin/components/workspaces/custom_dashboards/widgets/WidgetTitle.tsx +++ b/openaev-front/src/admin/components/workspaces/custom_dashboards/widgets/WidgetTitle.tsx @@ -59,7 +59,7 @@ const WidgetTitle = ({ widget, setFullscreen, readOnly, handleWidgetUpdate, hand widgetTimeRange = widget.widget_config.time_range; } const formattedDiff - = !difference_count || difference_count > 0 ? `+${difference_count}` : `${difference_count}`; + = !difference_count || difference_count > 0 ? `+${difference_count}` : `${difference_count}`; // Pick icon & color based on difference_count let Icon = ArrowForwardOutlined; let color = 'grey.400'; diff --git a/openaev-front/src/admin/components/workspaces/custom_dashboards/widgets/WidgetUtils.tsx b/openaev-front/src/admin/components/workspaces/custom_dashboards/widgets/WidgetUtils.tsx index 2f183f93737..26bda001bc7 100644 --- a/openaev-front/src/admin/components/workspaces/custom_dashboards/widgets/WidgetUtils.tsx +++ b/openaev-front/src/admin/components/workspaces/custom_dashboards/widgets/WidgetUtils.tsx @@ -258,8 +258,8 @@ export enum WidgetVizDataType { } // Define the discriminated union -export type WidgetVizData = - | { +export type WidgetVizData + = | { type: WidgetVizDataType.SERIES; data: EsSeries[]; } diff --git a/openaev-front/src/admin/components/workspaces/custom_dashboards/widgets/viz/DonutChart.tsx b/openaev-front/src/admin/components/workspaces/custom_dashboards/widgets/viz/DonutChart.tsx index fe82f969bcb..7749e7cacb9 100644 --- a/openaev-front/src/admin/components/workspaces/custom_dashboards/widgets/viz/DonutChart.tsx +++ b/openaev-front/src/admin/components/workspaces/custom_dashboards/widgets/viz/DonutChart.tsx @@ -44,7 +44,7 @@ const DonutChart: FunctionComponent = ({ widgetId, widgetConfig, datas }: const labels = datas.map(s => s?.x ?? t('-')); // Apply custom color mapping only when the widget field represents a status breakdown const isStatusBreakdown - = 'field' in widgetConfig && (widgetConfig.field.toLowerCase().includes('status') || widgetConfig.field.toLowerCase().includes('vulnerable_endpoint_action')); + = 'field' in widgetConfig && (widgetConfig.field.toLowerCase().includes('status') || widgetConfig.field.toLowerCase().includes('vulnerable_endpoint_action')); const chartColors = isStatusBreakdown ? labels.map(label => getStatusColor(theme, label)) : []; diff --git a/openaev-front/src/utils/api-types-custom.d.ts b/openaev-front/src/utils/api-types-custom.d.ts index c12438cfb64..1b9e277a6ce 100644 --- a/openaev-front/src/utils/api-types-custom.d.ts +++ b/openaev-front/src/utils/api-types-custom.d.ts @@ -15,8 +15,8 @@ type PayloadCreateInputMore = { } )[]; }; -export type PayloadCreateInput = Omit & PayloadCreateInputMore & - ( +export type PayloadCreateInput = Omit & PayloadCreateInputMore + & ( | Omit & PayloadCreateInputMore & { payload_type: 'Command' } | Omit & PayloadCreateInputMore & { payload_type: 'Executable' } | Omit & PayloadCreateInputMore & { payload_type: 'FileDrop' } diff --git a/openaev-front/src/utils/flows/algorithms/index.ts b/openaev-front/src/utils/flows/algorithms/index.ts index 1ebc0242401..c20654e4c6c 100644 --- a/openaev-front/src/utils/flows/algorithms/index.ts +++ b/openaev-front/src/utils/flows/algorithms/index.ts @@ -14,7 +14,7 @@ export type LayoutAlgorithmOptions = { export type LayoutAlgorithm = ( nodes: Node[], edges: Edge[], - options: LayoutAlgorithmOptions + options: LayoutAlgorithmOptions, ) => Promise<{ nodes: Node[]; edges: Edge[]; diff --git a/openaev-front/src/utils/hooks/useEntityToggle.ts b/openaev-front/src/utils/hooks/useEntityToggle.ts index bc787afcdc4..e39ea807a85 100644 --- a/openaev-front/src/utils/hooks/useEntityToggle.ts +++ b/openaev-front/src/utils/hooks/useEntityToggle.ts @@ -9,7 +9,7 @@ export interface UseEntityToggle { onToggleEntity: ( entity: T, _?: SyntheticEvent, - forceRemove?: T[] + forceRemove?: T[], ) => void; handleClearSelectedElements: () => void; handleToggleSelectAll: () => void; diff --git a/openaev-front/yarn.lock b/openaev-front/yarn.lock index 93149d55a01..3b71b68cce8 100644 --- a/openaev-front/yarn.lock +++ b/openaev-front/yarn.lock @@ -1817,7 +1817,7 @@ __metadata: languageName: node linkType: hard -"@eslint-community/eslint-utils@npm:^4.7.0, @eslint-community/eslint-utils@npm:^4.8.0": +"@eslint-community/eslint-utils@npm:^4.7.0, @eslint-community/eslint-utils@npm:^4.8.0, @eslint-community/eslint-utils@npm:^4.9.0": version: 4.9.0 resolution: "@eslint-community/eslint-utils@npm:4.9.0" dependencies: @@ -3038,18 +3038,19 @@ __metadata: languageName: node linkType: hard -"@stylistic/eslint-plugin@npm:4.4.1": - version: 4.4.1 - resolution: "@stylistic/eslint-plugin@npm:4.4.1" +"@stylistic/eslint-plugin@npm:5.6.1": + version: 5.6.1 + resolution: "@stylistic/eslint-plugin@npm:5.6.1" dependencies: - "@typescript-eslint/utils": "npm:^8.32.1" - eslint-visitor-keys: "npm:^4.2.0" - espree: "npm:^10.3.0" + "@eslint-community/eslint-utils": "npm:^4.9.0" + "@typescript-eslint/types": "npm:^8.47.0" + eslint-visitor-keys: "npm:^4.2.1" + espree: "npm:^10.4.0" estraverse: "npm:^5.3.0" - picomatch: "npm:^4.0.2" + picomatch: "npm:^4.0.3" peerDependencies: eslint: ">=9.0.0" - checksum: 10c0/94160bfc172a3934dd35be87887f43f7e3ffe9d1645096860a4e4c61877bb0fb62eb20a90e50ad74767ee794ed10f334f7165952cf9bcbd8bae6b80dc10c0d62 + checksum: 10c0/dfd33107209dac554a6b88d40813bfadd938e901ee7b853dfff9b66c9ffe0601790591865ad67e05f1f1061fc3c958087ad25efc1117375fe2487bfa69c44352 languageName: node linkType: hard @@ -3703,6 +3704,13 @@ __metadata: languageName: node linkType: hard +"@typescript-eslint/types@npm:^8.47.0": + version: 8.48.0 + resolution: "@typescript-eslint/types@npm:8.48.0" + checksum: 10c0/865a8f4ae4a50aa8976f3d7e0f874f1a1c80227ec53ded68644d41011c729a489bb59f70683b29237ab945716ea0258e1d47387163379eab3edaaf5e5cc3b757 + languageName: node + linkType: hard + "@typescript-eslint/typescript-estree@npm:8.38.0": version: 8.38.0 resolution: "@typescript-eslint/typescript-estree@npm:8.38.0" @@ -3758,7 +3766,7 @@ __metadata: languageName: node linkType: hard -"@typescript-eslint/utils@npm:^8.32.1, @typescript-eslint/utils@npm:^8.46.1": +"@typescript-eslint/utils@npm:^8.46.1": version: 8.46.2 resolution: "@typescript-eslint/utils@npm:8.46.2" dependencies: @@ -6234,7 +6242,7 @@ __metadata: languageName: node linkType: hard -"eslint-visitor-keys@npm:^4.2.0, eslint-visitor-keys@npm:^4.2.1": +"eslint-visitor-keys@npm:^4.2.1": version: 4.2.1 resolution: "eslint-visitor-keys@npm:4.2.1" checksum: 10c0/fcd43999199d6740db26c58dbe0c2594623e31ca307e616ac05153c9272f12f1364f5a0b1917a8e962268fdecc6f3622c1c2908b4fcc2e047a106fe6de69dc43 @@ -6290,7 +6298,7 @@ __metadata: languageName: node linkType: hard -"espree@npm:^10.0.1, espree@npm:^10.3.0, espree@npm:^10.4.0": +"espree@npm:^10.0.1, espree@npm:^10.4.0": version: 10.4.0 resolution: "espree@npm:10.4.0" dependencies: @@ -9855,7 +9863,7 @@ __metadata: "@mui/x-date-pickers": "npm:8.16.0" "@playwright/test": "npm:1.56.1" "@redux-devtools/extension": "npm:3.3.0" - "@stylistic/eslint-plugin": "npm:4.4.1" + "@stylistic/eslint-plugin": "npm:5.6.1" "@testing-library/dom": "npm:10.4.1" "@testing-library/react": "npm:16.3.0" "@types/d3-hierarchy": "npm:3.1.7"