From 2ad11e7bc97f3a54c4a819096b9a270adfc58eb7 Mon Sep 17 00:00:00 2001 From: Victor Lin <13424970+victorlin@users.noreply.github.com> Date: Thu, 23 May 2024 19:11:33 -0700 Subject: [PATCH] Add individual exceptions for unused vars The alternative of turning off noUnusedLocals is not desirable since we still want to catch unused imports which is done by the same rule. This is the same reason why no-unused-vars is enabled in ESLint with exceptions in the lines below each change. --- static-site/src/components/ListResources/Modal.tsx | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/static-site/src/components/ListResources/Modal.tsx b/static-site/src/components/ListResources/Modal.tsx index 712260d7e..b7f433de2 100644 --- a/static-site/src/components/ListResources/Modal.tsx +++ b/static-site/src/components/ListResources/Modal.tsx @@ -246,9 +246,11 @@ function _draw(ref, resource: Resource) { .attr("cy", (d) => heights.height - heights.marginBelowAxis - heights.marginAboveAxis - radius - padding - d.y) .attr("r", radius) .attr('fill', color) + // @ts-expect-error .on("mouseover", function(e, d) { /* lower opacity of non-hovered, increase radius of hovered circle */ beeswarm.join( + // @ts-expect-error (enter) => {}, /* eslint-disable-line */ (update) => selectSnapshot(update, d) ) @@ -268,6 +270,7 @@ function _draw(ref, resource: Resource) { }) .on("mouseleave", function() { beeswarm.join( + // @ts-expect-error (enter) => {}, /* eslint-disable-line */ (update) => resetBeeswarm(update) ) @@ -275,6 +278,7 @@ function _draw(ref, resource: Resource) { selectedVersionGroup.selectAll("*") .style("opacity", 0) }) + // @ts-expect-error .on("click", function(e, d) { window.open(`/${resource.name}@${d.data.version}`,'_blank'); // TEST! }) @@ -295,6 +299,7 @@ function _draw(ref, resource: Resource) { .on("mousemove", function(e) { const { datum, hoveredDateStr } = getVersion(e); beeswarm.join( + // @ts-expect-error (enter) => {}, /* eslint-disable-line */ (update) => selectSnapshot(update, datum) ) @@ -315,6 +320,7 @@ function _draw(ref, resource: Resource) { }) .on("mouseleave", function() { beeswarm.join( + // @ts-expect-error (enter) => {}, /* eslint-disable-line */ (update) => resetBeeswarm(update) )