From f98b7afd66084973d74733920619b3bb351566c8 Mon Sep 17 00:00:00 2001 From: Alex | Kronox Date: Sun, 1 Dec 2024 07:38:51 +0100 Subject: [PATCH] update files to new rules --- report-viewer/eslint.config.mjs | 9 +-------- report-viewer/src/components/ClusterGraph.vue | 6 ++++++ report-viewer/src/components/ComparisonsTable.vue | 7 +++++-- .../distributionDiagram/DistributionDiagram.vue | 4 +++- report-viewer/src/components/fileDisplaying/CodeLine.vue | 1 + 5 files changed, 16 insertions(+), 11 deletions(-) diff --git a/report-viewer/eslint.config.mjs b/report-viewer/eslint.config.mjs index 064cdb42e..43a49c34c 100644 --- a/report-viewer/eslint.config.mjs +++ b/report-viewer/eslint.config.mjs @@ -42,12 +42,5 @@ export default [ rules: { '@typescript-eslint/no-unused-expressions': 'off' } - }, - { - files: ['**/*.html'], - rules: { - 'vue/comment-directive': 'off', - }, - }, - + } ] diff --git a/report-viewer/src/components/ClusterGraph.vue b/report-viewer/src/components/ClusterGraph.vue index f2a6dfea3..3faea102a 100644 --- a/report-viewer/src/components/ClusterGraph.vue +++ b/report-viewer/src/components/ClusterGraph.vue @@ -238,8 +238,11 @@ const graphData = computed(() => { y: calculateYPosition(index) })), edges: edges.value, + /* eslint-disable-next-line @typescript-eslint/no-explicit-any */ // needs to be any since it is defined like that in the library edgeLineBorderColor: (ctx: any) => getEdgeColor(ctx.raw.source, ctx.raw.target), + /* eslint-disable-next-line @typescript-eslint/no-explicit-any */ // needs to be any since it is defined like that in the library edgeLineBorderWidth: (ctx: any) => getEdgeWidth(ctx.raw.source, ctx.raw.target), + /* eslint-disable-next-line @typescript-eslint/no-explicit-any */ // needs to be any since it is defined like that in the library edgeLineBorderDash: (ctx: any) => getEdgeDashStyle(ctx.raw.source, ctx.raw.target) } ] @@ -268,6 +271,7 @@ const graphOptions = computed(() => { right: xPadding.value } }, + /* eslint-disable-next-line @typescript-eslint/no-explicit-any */ // needs to be any since it is defined like that in the library onHover: (event: any, elements: any) => { if (!event) { hoveredEdge.value = null @@ -315,9 +319,11 @@ const graphOptions = computed(() => { weight: 'bold' as const, size: 12 }, + /* eslint-disable-next-line @typescript-eslint/no-explicit-any */ // needs to be any since it is defined like that in the library formatter: (value: any, ctx: any) => { return labels.value[ctx.dataIndex] }, + /* eslint-disable-next-line @typescript-eslint/no-explicit-any */ // needs to be any since it is defined like that in the library align: (ctx: any) => degreeAroundCircle(ctx.dataIndex), offset: 8, color: graphColors.ticksAndFont.value diff --git a/report-viewer/src/components/ComparisonsTable.vue b/report-viewer/src/components/ComparisonsTable.vue index 19424a25e..6b21bfd00 100644 --- a/report-viewer/src/components/ComparisonsTable.vue +++ b/report-viewer/src/components/ComparisonsTable.vue @@ -188,7 +188,8 @@ const props = defineProps({ }, clusters: { type: Array, - required: false + required: false, + default: undefined }, header: { type: String, @@ -196,7 +197,8 @@ const props = defineProps({ }, highlightedRowIds: { type: Object as PropType<{ firstId: string; secondId: string }>, - required: false + required: false, + default: undefined } }) @@ -369,6 +371,7 @@ function isHighlightedRow(item: ComparisonListElement) { ) } +// eslint-disable-next-line @typescript-eslint/no-explicit-any const dynamicScroller: Ref = ref(null) watch( diff --git a/report-viewer/src/components/distributionDiagram/DistributionDiagram.vue b/report-viewer/src/components/distributionDiagram/DistributionDiagram.vue index 7b6b19469..5879264c0 100644 --- a/report-viewer/src/components/distributionDiagram/DistributionDiagram.vue +++ b/report-viewer/src/components/distributionDiagram/DistributionDiagram.vue @@ -95,7 +95,8 @@ const options = computed(() => { autoSkipPadding: 10, color: graphColors.ticksAndFont.value, // ensures that in log mode ticks are placed evenly apart - callback: function (value: unknown) { + /* eslint-disable @typescript-eslint/no-explicit-any */ // needs to be any since it is defined like that in chart.js + callback: function (value: any) { if (graphOptions.value.xScale === 'logarithmic' && (value + '').match(/1(0)*[^1-9.]/)) { return value } @@ -111,6 +112,7 @@ const options = computed(() => { y: { ticks: { color: graphColors.ticksAndFont.value, + /* eslint-disable @typescript-eslint/no-explicit-any */ // needs to be any since it is defined like that in chart.js callback: function (reversedValue: any) { const value = distributionData.value.length - reversedValue - 1 if (graphOptions.value.bucketCount <= 10) { diff --git a/report-viewer/src/components/fileDisplaying/CodeLine.vue b/report-viewer/src/components/fileDisplaying/CodeLine.vue index 864f0a283..2cedfa88a 100644 --- a/report-viewer/src/components/fileDisplaying/CodeLine.vue +++ b/report-viewer/src/components/fileDisplaying/CodeLine.vue @@ -1,3 +1,4 @@ +