Skip to content

Commit 70bb0e1

Browse files
committed
fix linting
1 parent ca6b7ca commit 70bb0e1

File tree

10 files changed

+21
-24
lines changed

10 files changed

+21
-24
lines changed

examples/app-pages-router/app/rewrite-destination/page.tsx

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
1-
export default async function RewriteDestination(
2-
props: {
3-
searchParams: Promise<{ a: string }>;
4-
}
5-
) {
1+
export default async function RewriteDestination(props: {
2+
searchParams: Promise<{ a: string }>;
3+
}) {
64
const searchParams = await props.searchParams;
75
return (
86
<div>

examples/app-router/app/search-query/page.tsx

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,8 @@
11
import { headers } from "next/headers";
22

3-
export default async function SearchQuery(
4-
props: {
5-
searchParams: Promise<Record<string, string | string[]>>;
6-
}
7-
) {
3+
export default async function SearchQuery(props: {
4+
searchParams: Promise<Record<string, string | string[]>>;
5+
}) {
86
const propsSearchParams = await props.searchParams;
97
const mwSearchParams = (await headers()).get("search-params");
108
const multiValueParams = propsSearchParams["multi"];

examples/app-router/next.config.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,4 +73,4 @@ const nextConfig: NextConfig = {
7373
},
7474
};
7575

76-
export default nextConfig;
76+
export default nextConfig;

packages/open-next/src/adapters/cache.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -379,10 +379,10 @@ export default class S3Cache {
379379
// If we use an in house version of getDerivedTags in build we should use it here instead of next's one
380380
const derivedTags: string[] =
381381
data?.kind === "FETCH"
382-
? ctx?.tags ?? data?.data?.tags ?? [] // before version 14 next.js used data?.data?.tags so we keep it for backward compatibility
382+
? (ctx?.tags ?? data?.data?.tags ?? []) // before version 14 next.js used data?.data?.tags so we keep it for backward compatibility
383383
: data?.kind === "PAGE"
384-
? data.headers?.["x-next-cache-tags"]?.split(",") ?? []
385-
: [];
384+
? (data.headers?.["x-next-cache-tags"]?.split(",") ?? [])
385+
: [];
386386
debug("derivedTags", derivedTags);
387387
// Get all tags stored in dynamodb for the given key
388388
// If any of the derived tags are not stored in dynamodb for the given key, write them

packages/open-next/src/build/generateOutput.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -303,8 +303,8 @@ export async function generateOutput(options: BuildOptions) {
303303
value.placement === "global"
304304
? key
305305
: isExternalMiddleware
306-
? "middleware"
307-
: undefined,
306+
? "middleware"
307+
: undefined,
308308
});
309309
});
310310
});

packages/open-next/src/core/routing/middleware.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,7 @@ export async function handleMiddleware(
190190
responseHeaders: resHeaders,
191191
url: newUrl,
192192
rawPath: rewritten
193-
? newUrl ?? internalEvent.rawPath
193+
? (newUrl ?? internalEvent.rawPath)
194194
: internalEvent.rawPath,
195195
type: internalEvent.type,
196196
headers: { ...internalEvent.headers, ...reqHeaders },

packages/open-next/src/core/routing/util.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -459,9 +459,8 @@ export function fixISRHeaders(headers: OutgoingHttpHeaders) {
459459
// 31536000 is the default s-maxage value for SSG pages
460460
if (sMaxAge && sMaxAge !== 31536000) {
461461
const remainingTtl = Math.max(sMaxAge - age, 1);
462-
headers[
463-
CommonHeaders.CACHE_CONTROL
464-
] = `s-maxage=${remainingTtl}, stale-while-revalidate=2592000`;
462+
headers[CommonHeaders.CACHE_CONTROL] =
463+
`s-maxage=${remainingTtl}, stale-while-revalidate=2592000`;
465464
}
466465
}
467466
if (headers[CommonHeaders.NEXT_CACHE] !== "STALE") return;

packages/open-next/src/http/openNextResponse.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -328,10 +328,12 @@ export class OpenNextNodeResponse extends Transform implements ServerResponse {
328328
* There are probably not used right now in Next.js, but better be safe than sorry
329329
*/
330330

331-
setHeaders(headers: Headers | Map<string, number | string | readonly string[]>): this {
331+
setHeaders(
332+
headers: Headers | Map<string, number | string | readonly string[]>,
333+
): this {
332334
headers.forEach((value, key) => {
333335
this.setHeader(key, Array.isArray(value) ? value : value.toString());
334-
})
336+
});
335337
return this;
336338
}
337339

packages/open-next/src/overrides/tagCache/dynamodb-lite.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ const tagCache: TagCache = {
159159
const revalidatedTags = ((await result.json()) as any).Items ?? [];
160160
debug("revalidatedTags", revalidatedTags);
161161
// If we have revalidated tags we return -1 to force revalidation
162-
return revalidatedTags.length > 0 ? -1 : lastModified ?? Date.now();
162+
return revalidatedTags.length > 0 ? -1 : (lastModified ?? Date.now());
163163
} catch (e) {
164164
error("Failed to get revalidated tags", e);
165165
return lastModified ?? Date.now();

packages/open-next/src/overrides/tagCache/dynamodb.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ const tagCache: TagCache = {
114114
const revalidatedTags = result.Items ?? [];
115115
debug("revalidatedTags", revalidatedTags);
116116
// If we have revalidated tags we return -1 to force revalidation
117-
return revalidatedTags.length > 0 ? -1 : lastModified ?? Date.now();
117+
return revalidatedTags.length > 0 ? -1 : (lastModified ?? Date.now());
118118
} catch (e) {
119119
error("Failed to get revalidated tags", e);
120120
return lastModified ?? Date.now();

0 commit comments

Comments
 (0)