Skip to content

Commit ef04421

Browse files
committed
Fixing linting issues
1 parent 2d57155 commit ef04421

File tree

2 files changed

+13
-13
lines changed

2 files changed

+13
-13
lines changed

app/api/search/searchIndex.ts

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -6,34 +6,34 @@ import {buildDocUrl} from "../shared/docs-utils";
66
const SEARCH_INDEX_PATH = path.join(process.cwd(), "public", "search-index.json");
77

88
type RawSearchIndexEntry = {
9-
path: string;
10-
title: string;
9+
content: string;
1110
hierarchy: string[];
11+
path: string;
1212
summary: string;
13-
content: string;
13+
title: string;
1414
};
1515

1616
type SearchIndexFile = {
17+
entries: RawSearchIndexEntry[];
1718
generatedAt: string;
1819
total: number;
19-
entries: RawSearchIndexEntry[];
2020
};
2121

2222
export type SearchMatch = {
23-
path: string;
24-
title: string;
2523
hierarchy: string[];
26-
summary: string;
27-
snippet: string | null;
28-
score: number;
2924
matchedTokens: number;
25+
path: string;
26+
score: number;
27+
snippet: string | null;
28+
summary: string;
29+
title: string;
3030
};
3131

3232
type CachedEntry = RawSearchIndexEntry & {
33+
contentLower: string;
34+
hierarchyLower: string[];
3335
pathLower: string;
3436
titleLower: string;
35-
hierarchyLower: string[];
36-
contentLower: string;
3737
};
3838

3939
let searchIndexPromise: Promise<CachedEntry[]> | null = null;
@@ -58,7 +58,7 @@ export async function ensureSearchIndex(): Promise<CachedEntry[]> {
5858
});
5959
}
6060

61-
return searchIndexPromise;
61+
return await searchIndexPromise;
6262
}
6363

6464
function scoreEntry(entry: CachedEntry, tokens: string[]) {

next.config.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
import {codecovNextJSWebpackPlugin} from '@codecov/nextjs-webpack-plugin';
22
import {withSentryConfig} from '@sentry/nextjs';
33

4-
import {redirects} from './redirects.js';
54
import {REMOTE_IMAGE_PATTERNS} from './src/config/images';
5+
import {redirects} from './redirects.js';
66

77
const outputFileTracingExcludes = process.env.NEXT_PUBLIC_DEVELOPER_DOCS
88
? {

0 commit comments

Comments
 (0)