Skip to content

Commit 85e1d7f

Browse files
committed
style: run lint
1 parent 87dfb1a commit 85e1d7f

File tree

3 files changed

+7
-5
lines changed

3 files changed

+7
-5
lines changed

plugin/src/helpers/functions.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ export const setupImageFunction = async ({
6767
basePath: string
6868
imageconfig: Partial<ImageConfigComplete>
6969
remotePatterns: RemotePattern[]
70-
responseHeaders?: Record<string,string>
70+
responseHeaders?: Record<string, string>
7171
}): Promise<void> => {
7272
const functionsPath = INTERNAL_FUNCTIONS_SRC || FUNCTIONS_SRC
7373
const functionName = `${IMAGE_FUNCTION_NAME}.js`
@@ -78,7 +78,7 @@ export const setupImageFunction = async ({
7878
...imageconfig,
7979
basePath: [basePath, IMAGE_FUNCTION_NAME].join('/'),
8080
remotePatterns,
81-
responseHeaders
81+
responseHeaders,
8282
})
8383
await copyFile(join(__dirname, '..', '..', 'lib', 'templates', 'ipx.js'), join(functionDirectory, functionName))
8484

plugin/src/helpers/utils.ts

+4-2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
/* eslint-disable max-lines */
12
import type { NetlifyConfig } from '@netlify/build'
23
import type { Header } from '@netlify/build/types/config/netlify_config'
34
import globby from 'globby'
@@ -188,10 +189,11 @@ export const isNextAuthInstalled = (): boolean => {
188189
}
189190

190191
export const getCustomImageResponseHeaders = (headers: Header[]): Record<string, string> | null => {
191-
const customImageResponseHeaders = headers.find(h => h.for.startsWith("/_next/image/"))
192-
192+
const customImageResponseHeaders = headers.find((h) => h.for.startsWith('/_next/image/'))
193+
193194
if (customImageResponseHeaders) {
194195
return customImageResponseHeaders?.values as Record<string, string>
195196
}
196197
return null
197198
}
199+
/* eslint-enable max-lines */

plugin/src/index.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ const plugin: NetlifyPlugin = {
129129
netlifyConfig,
130130
basePath,
131131
remotePatterns: experimentalRemotePatterns,
132-
responseHeaders: getCustomImageResponseHeaders(netlifyConfig.headers)
132+
responseHeaders: getCustomImageResponseHeaders(netlifyConfig.headers),
133133
})
134134

135135
await generateRedirects({

0 commit comments

Comments
 (0)