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 Dec 11, 2023
1 parent 7fd7798 commit 9bf1395
Show file tree
Hide file tree
Showing 8 changed files with 16 additions and 16 deletions.
4 changes: 2 additions & 2 deletions components/splash/dot-grid.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,11 +51,11 @@ const Dots = ({ playState, color }) => {
for (col = 0; col < ncols; col++) {
if (random() > 0.3) {
dots1.push(
<Dot key={row + '-' + col} y={row * 21 + 10} x={col * 5.1 + 2} />
<Dot key={row + '-' + col} y={row * 21 + 10} x={col * 5.1 + 2} />,
)
} else {
dots2.push(
<Dot key={row + '-' + col} y={row * 21 + 10} x={col * 5.1 + 2} />
<Dot key={row + '-' + col} y={row * 21 + 10} x={col * 5.1 + 2} />,
)
}
}
Expand Down
2 changes: 1 addition & 1 deletion components/splash/use-animation.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ const useAnimation = ({ duration = 4000, delay = 0 } = {}) => {
clearInterval(tick)
const interval = setInterval(
() => setRepeating((prev) => !prev),
duration
duration,
)
setTick(interval)
}
Expand Down
2 changes: 1 addition & 1 deletion pages/api/checkout_sessions.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ async function recaptchaHandler(response) {
'Content-Type': 'application/json',
},
referrerPolicy: 'no-referrer',
}
},
)
const { success, 'error-codes': errorCodes } = await result.json()

Expand Down
4 changes: 2 additions & 2 deletions pages/donate.js
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ const CustomAmount = ({ color, onClick }) => {

return !helpMessage
},
[amount]
[amount],
)

return (
Expand Down Expand Up @@ -186,7 +186,7 @@ const Donate = () => {
setStatus('processing')
setTimeout(() => {
setStatus((prevStatus) =>
prevStatus === 'processing' ? null : prevStatus
prevStatus === 'processing' ? null : prevStatus,
)
}, 1200)

Expand Down
6 changes: 3 additions & 3 deletions pages/press.js
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ const getColors = () => {
colorOrder.reduce((a, c) => {
a[c] = 0
return a
}, {})
}, {}),
)

const recentColors = recentSources.reduce((colors, source, i) => {
Expand Down Expand Up @@ -96,7 +96,7 @@ const getColors = () => {
colors[source] ||= colorOrder[i % 4]
return colors
},
{ ...highlightColors, ...recentColors }
{ ...highlightColors, ...recentColors },
)
}

Expand Down Expand Up @@ -129,7 +129,7 @@ const Press = () => {
const inYear = years[new Date(d.date.replace(/-/g, '/')).getFullYear()]
const inFormat = format[d.format]
return inYear && inFormat
})
}),
)
}, [years, format])

Expand Down
10 changes: 5 additions & 5 deletions pages/sitemap.xml.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,12 @@ function generateSiteMap(pages) {
return `
<url>
<loc>${`${BASE_URL}/${page}`}</loc>${
date
? `
date
? `
<lastmod>${date}</lastmod>
`
: ''
}
: ''
}
</url>
`
})
Expand All @@ -56,7 +56,7 @@ export async function getServerSideProps({ res }) {
])

const [research, blog] = await Promise.all(
requests.map((request) => request.json())
requests.map((request) => request.json()),
)

const sitemap = generateSiteMap(research.concat(blog))
Expand Down
2 changes: 1 addition & 1 deletion tests/api/checkout_sessions.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ describe('api/checkout_sessions', () => {
expect(fetch).toHaveBeenCalledTimes(1)
expect(fetch).toHaveBeenCalledWith(
`https://www.google.com/recaptcha/api/siteverify?secret=${process.env.RECAPTCHA_SECRET_KEY}&response=recaptcha_response`,
expect.anything()
expect.anything(),
)
})

Expand Down
2 changes: 1 addition & 1 deletion utils/rate-limit.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ const rateLimit = (options) => {
res.setHeader('X-RateLimit-Limit', limit)
res.setHeader(
'X-RateLimit-Remaining',
isRateLimited ? 0 : limit - currentUsage
isRateLimited ? 0 : limit - currentUsage,
)

return isRateLimited ? reject() : resolve()
Expand Down

0 comments on commit 9bf1395

Please sign in to comment.