Skip to content

Commit cdeb3ce

Browse files
committed
Fix code lint errors
1 parent 260e744 commit cdeb3ce

6 files changed

Lines changed: 11 additions & 18 deletions

File tree

.cache/pages.json

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -22,15 +22,10 @@
2222
"contact",
2323
"offline",
2424
{
25-
"privacy": [
26-
"my-data"
27-
]
25+
"privacy": ["my-data"]
2826
},
2927
{
30-
"services": [
31-
"create-custom-font-sets",
32-
"overview"
33-
]
28+
"services": ["create-custom-font-sets", "overview"]
3429
},
3530
{
3631
"tags": [
@@ -45,4 +40,4 @@
4540
"typescript"
4641
]
4742
}
48-
]
43+
]

src/components/WebMentions/server/__tests__/index.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ describe('fetchWebmentions', () => {
103103
})
104104

105105
it('deduplicates concurrent requests for the same URL', async () => {
106-
let resolveFetch: ((response: Response) => void) | undefined
106+
let resolveFetch: ((_response: Response) => void) | undefined
107107
fetchMock.mockImplementation(
108108
() => new Promise<Response>((resolve) => {
109109
resolveFetch = resolve

src/components/WebMentions/server/index.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,13 @@
55
* @see https://github.com/aaronpk/webmention.io
66
*/
77
import { WEBMENTION_IO_TOKEN } from 'astro:env/server'
8+
import { isDev } from '@lib/config/environmentServer'
89
import type { Webmention, WebmentionResponse } from '@components/WebMentions/@types'
910

1011
const allowedTypes = new Set(['mention-of', 'in-reply-to', 'like-of', 'repost-of'])
1112
const PLACEHOLDER_TOKENS = new Set(['', 'updateme', 'your_api_token_here'])
1213
const SUCCESS_CACHE_TTL_MS = 5 * 60 * 1000
13-
const FAILURE_RETRY_COOLDOWN_MS = import.meta.env.DEV ? 60 * 1000 : 5 * 60 * 1000
14+
const FAILURE_RETRY_COOLDOWN_MS = isDev() ? 60 * 1000 : 5 * 60 * 1000
1415
const LOG_THROTTLE_WINDOW_MS = 60 * 1000
1516
const FETCH_TIMEOUT_MS = 10_000
1617

@@ -123,7 +124,7 @@ const logWithThrottle = (
123124

124125
const createTimeoutSignal = (): AbortSignal | undefined => {
125126
const AbortSignalWithTimeout = AbortSignal as typeof AbortSignal & {
126-
timeout?: (ms: number) => AbortSignal
127+
timeout?: (_ms: number) => AbortSignal
127128
}
128129

129130
if (typeof AbortSignalWithTimeout?.timeout === 'function') {

src/content.config.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
*/
1111
import { defineCollection, reference, z } from 'astro:content'
1212
import { glob, file } from 'astro/loaders'
13+
import { isProd } from '@lib/config/environmentServer'
1314
import { validTags } from '@content/_tagList'
1415

1516
const pattern = '**\/[^_]*.{md,mdx}'
@@ -18,7 +19,7 @@ const MAX_BREADCRUMB_TITLE_LENGTH = 50
1819
const loggedBreadcrumbTitleWarnings = new Set<string>()
1920

2021
const warnOnBreadcrumbTitleLength = (title: string, collectionName: string): void => {
21-
if ((process.env['NODE_ENV'] ?? 'development') !== 'production') return
22+
if (!isProd()) return
2223
if (title.length <= MAX_BREADCRUMB_TITLE_LENGTH) return
2324

2425
const warningKey = `${collectionName}:${title}`

test/containers/convertkit/mappings/subscribe-success.json

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,6 @@
2020
"Content-Type": "application/json",
2121
"X-Mock-Service": "convertkit"
2222
},
23-
"transformers": [
24-
"response-template"
25-
]
23+
"transformers": ["response-template"]
2624
}
2725
}

test/containers/resend/mappings/send-email-success.json

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,6 @@
1515
"Content-Type": "application/json",
1616
"X-Mock-Service": "resend"
1717
},
18-
"transformers": [
19-
"response-template"
20-
]
18+
"transformers": ["response-template"]
2119
}
2220
}

0 commit comments

Comments
 (0)