Skip to content

Commit

Permalink
Add individual exceptions for unused vars
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
victorlin committed Jun 4, 2024
1 parent c9788e7 commit aae874c
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions static-site/src/components/ListResources/Modal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -247,9 +247,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)
)
Expand All @@ -269,13 +271,15 @@ function _draw(ref, resource: Resource) {
})
.on("mouseleave", function() {
beeswarm.join(
// @ts-expect-error
(enter) => {}, /* eslint-disable-line */
(update) => resetBeeswarm(update)
)
/* hide the vertical line + text which appeared on mouseover */
selectedVersionGroup.selectAll("*")
.style("opacity", 0)
})
// @ts-expect-error
.on("click", function(e, d) {
window.open(`/${resource.name}@${d.data.version}`,'_blank'); // TEST!
})
Expand All @@ -296,6 +300,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)
)
Expand All @@ -316,6 +321,7 @@ function _draw(ref, resource: Resource) {
})
.on("mouseleave", function() {
beeswarm.join(
// @ts-expect-error
(enter) => {}, /* eslint-disable-line */
(update) => resetBeeswarm(update)
)
Expand Down

0 comments on commit aae874c

Please sign in to comment.