diff --git a/packages/ui-components/biome.json b/packages/ui-components/biome.json index b2862a3b2..6db7a8687 100644 --- a/packages/ui-components/biome.json +++ b/packages/ui-components/biome.json @@ -13,5 +13,17 @@ "useKeyWithClickEvents": "off" } } - } + }, + "overrides": [ + { + "include": ["src/components/charts/*"], + "linter": { + "rules": { + "correctness": { + "useExhaustiveDependencies": "off" + } + } + } + } + ] } diff --git a/packages/ui-components/package.json b/packages/ui-components/package.json index 885b41904..8f8df1152 100644 --- a/packages/ui-components/package.json +++ b/packages/ui-components/package.json @@ -12,16 +12,13 @@ "./styles": "./src/styles/styles.css", "./dist/style.css": "./dist/style.css" }, - "files": [ - "dist", - "src/styles/styles.css" - ], + "files": ["dist", "src/styles/styles.css"], "scripts": { "prebuild": "tsx scripts/validate-env.ts", "build": "vite build && tsc --emitDeclarationOnly --declaration", "typecheck": "tsc --noEmit", "dev": "vite build --watch", - "lint": "biome check", + "lint": "biome check --write", "test": "vitest run", "test:watch": "vitest watch", "test:coverage": "vitest run --coverage" diff --git a/packages/ui-components/src/components/charts/BusterChartJS/core/plugins/chartjs-plugin-mounted.tsx b/packages/ui-components/src/components/charts/BusterChartJS/core/plugins/chartjs-plugin-mounted.tsx index 8d87e5106..5190a61fe 100644 --- a/packages/ui-components/src/components/charts/BusterChartJS/core/plugins/chartjs-plugin-mounted.tsx +++ b/packages/ui-components/src/components/charts/BusterChartJS/core/plugins/chartjs-plugin-mounted.tsx @@ -6,6 +6,7 @@ export interface ChartMountedPluginOptions { } declare module 'chart.js' { + // biome-ignore lint/correctness/noUnusedVariables: we need to define the plugin options interface PluginOptionsByType { chartMounted?: ChartMountedPluginOptions; } @@ -18,12 +19,12 @@ declare module 'chart.js' { export const ChartMountedPlugin: Plugin = { id: 'chartMounted', - afterInit: (chart, args, options) => { + afterInit: (chart, _args, options) => { if (!chart || !options) return; options?.onMounted?.(chart); chart.$mountedPlugin = true; }, - afterRender: (chart, args, options) => { + afterRender: (chart, _args, options) => { if (chart.$initialAnimationCompleted === undefined) { chart.$initialAnimationCompleted = true; } diff --git a/packages/ui-components/src/components/charts/BusterChartJS/core/plugins/chartjs-plugin-totalizer.ts b/packages/ui-components/src/components/charts/BusterChartJS/core/plugins/chartjs-plugin-totalizer.ts index c508386e5..129e815d5 100644 --- a/packages/ui-components/src/components/charts/BusterChartJS/core/plugins/chartjs-plugin-totalizer.ts +++ b/packages/ui-components/src/components/charts/BusterChartJS/core/plugins/chartjs-plugin-totalizer.ts @@ -5,6 +5,7 @@ export interface ChartTotalizerPluginOptions { } declare module 'chart.js' { + // biome-ignore lint/correctness/noUnusedVariables: we need to define the plugin options interface PluginOptionsByType { totalizer?: ChartTotalizerPluginOptions | false; } @@ -23,7 +24,7 @@ export const ChartTotalizerPlugin: Plugin { + beforeDatasetsUpdate: (chart, _args, options) => { if (options?.enabled === false) return; const stackTotals: Record = {}; @@ -35,8 +36,8 @@ export const ChartTotalizerPlugin: Plugin