Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Sep 5, 2023
1 parent 1ccd1f2 commit b9d74a4
Show file tree
Hide file tree
Showing 7 changed files with 17 additions and 16 deletions.
2 changes: 1 addition & 1 deletion components/desktop.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ function Desktop() {
const data = getSelectedData(
map,
['biomass', 'fire', 'drought', 'insects'],
region
region,
)
setSelectedData(data)
}, [map, options, region, bounds])
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ export default function CircleRenderer({
const r = distance(
map.unproject(e.point).toArray(),
[center.lng, center.lat],
{ units: 'miles' }
{ units: 'miles' },
)
setRadius(r)
onDrag(circle)
Expand Down Expand Up @@ -193,7 +193,7 @@ export default function CircleRenderer({
const lineEnd = rhumbDestination(
[center.lng, center.lat],
radius * 2,
guidelineAngle
guidelineAngle,
)

const line = lineString([
Expand Down Expand Up @@ -222,7 +222,7 @@ export default function CircleRenderer({
.text(radius.toFixed(0) + 'mi')
.attr(
'transform',
`rotate(${-1 * guidelineAngle + 90}) ` + `translate(0, ${translateY})`
`rotate(${-1 * guidelineAngle + 90}) ` + `translate(0, ${translateY})`,
)

const translateX = (() => {
Expand All @@ -234,7 +234,7 @@ export default function CircleRenderer({
svgRadiusTextContainer.attr(
'transform',
`rotate(${guidelineAngle - 90}, ${handleXY.x}, ${handleXY.y}) ` +
`translate(${handleXY.x + translateX}, ${handleXY.y})`
`translate(${handleXY.x + translateX}, ${handleXY.y})`,
)
}

Expand Down
5 changes: 3 additions & 2 deletions components/map/enhancers/filters/helpers.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ function dedupedPoints(points) {
const duplicatePoint = deduped.find(
(d) =>
d.properties.lat === point.properties.lat &&
d.properties.lon === point.properties.lon
d.properties.lon === point.properties.lon,
)

if (duplicatePoint) console.log('duplicate point!')
Expand Down Expand Up @@ -52,7 +52,8 @@ function turfPointsInCircle(points, circle) {
const { lng, lat } = circle.properties.center
return points.filter(
(p) =>
distance(p.geometry.coordinates, [lng, lat], { units: 'miles' }) <= radius
distance(p.geometry.coordinates, [lng, lat], { units: 'miles' }) <=
radius,
)
}

Expand Down
2 changes: 1 addition & 1 deletion components/map/enhancers/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ export default function Enhancers({
if (region) region.properties.type = activeFilter
onChangeRegion(region)
},
[activeFilter]
[activeFilter],
)

useEffect(() => {
Expand Down
12 changes: 6 additions & 6 deletions components/map/enhancers/ruler.js
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ function useRuler(map, mode = AXES) {
axisBottom(x)
.tickValues(x.domain())
.tickFormat((d) => `${d}°`)
.tickSize(TICK_SIZE)
.tickSize(TICK_SIZE),
)
.call((g) => g.select('.domain').remove())

Expand All @@ -74,7 +74,7 @@ function useRuler(map, mode = AXES) {
axisLeft(y)
.tickValues(y.domain())
.tickFormat((d) => `${d}°`)
.tickSize(TICK_SIZE)
.tickSize(TICK_SIZE),
)
.call((g) => g.select('.domain').remove())

Expand Down Expand Up @@ -105,10 +105,10 @@ function useRuler(map, mode = AXES) {
.attr('y1', xTickHeight + TICK_MARGIN)
.attr('y2', height),
(update) => update,
(exit) => exit.remove()
(exit) => exit.remove(),
)
.attr('x1', (d) => 0.5 + x(d))
.attr('x2', (d) => 0.5 + x(d))
.attr('x2', (d) => 0.5 + x(d)),
)
.call((g) =>
g
Expand All @@ -117,7 +117,7 @@ function useRuler(map, mode = AXES) {
.join(
(enter) => enter.append('line').classed('y', true),
(update) => update,
(exit) => exit.remove()
(exit) => exit.remove(),
)
.attr('y1', (d) => 0.5 + y(d))
.attr('y2', (d) => 0.5 + y(d))
Expand All @@ -126,7 +126,7 @@ function useRuler(map, mode = AXES) {
? yTickNodes[i].getBoundingClientRect().width
: 0
return width - yTickWidth - TICK_MARGIN
})
}),
)
},
}
Expand Down
2 changes: 1 addition & 1 deletion components/sidebar/layers.js
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ function Layers({ options, setOptions, children }) {
setTick(
setTimeout(() => {
setSliderChanging(false)
}, 250)
}, 250),
)
}}
onKeyUp={(e) => setSlider('year', e.target.value)}
Expand Down
2 changes: 1 addition & 1 deletion components/visualization/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ export default function Visualization({ data, options }) {
const counts = binEdges
.map((b, i) => {
return biomassDeltas.filter(
(d) => (d >= binEdges[i]) & (d < binEdges[i + 1])
(d) => (d >= binEdges[i]) & (d < binEdges[i + 1]),
).length
})
.slice(0, nBins)
Expand Down

0 comments on commit b9d74a4

Please sign in to comment.