Skip to content

Commit

Permalink
chore: lint
Browse files Browse the repository at this point in the history
  • Loading branch information
magne4000 committed Aug 24, 2024
1 parent bbde353 commit a2171ea
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"build": "cd packages/vike-cloudflare && pnpm run build",
"release": "cd packages/vike-cloudflare && pnpm run release",
"========= Test": "",
"test": "pnpm run test:units && pnpm run test:e2e && pnpm run test:types",
"test": "pnpm run lint && pnpm run test:units && pnpm run test:e2e && pnpm run test:types",
"test:e2e": "test-e2e",
"test:units": "pnpm --recursive --sequential --filter {packages/*} run test",
"test:types": "test-types",
Expand Down
6 changes: 4 additions & 2 deletions packages/vike-cloudflare/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { cp, mkdir, rm, symlink, writeFile } from "node:fs/promises";
import { builtinModules } from "node:module";
import { dirname, isAbsolute, join, posix } from "node:path";
import { prerender } from "vike/prerender";
import { type Plugin, type ResolvedConfig, normalizePath } from "vite";
import { normalizePath, type Plugin, type ResolvedConfig } from "vite";
import hattipAsset from "../assets/hattip.js?raw";
import honoAsset from "../assets/hono.js?raw";
import vikeAsset from "../assets/vike.js?raw";
Expand Down Expand Up @@ -59,7 +59,7 @@ export const pages = (options?: VikeCloudflarePagesOptions): Plugin[] => {
name: NAME,
enforce: "post",
apply(config) {
return !!config.build?.ssr;
return Boolean(config.build?.ssr);
},
resolveId(id) {
if (id === virtualEntryId) {
Expand Down Expand Up @@ -100,6 +100,7 @@ export const pages = (options?: VikeCloudflarePagesOptions): Plugin[] => {
},
configResolved: async (config) => {
resolvedConfig = config;
// biome-ignore lint/suspicious/noExplicitAny: TODO
shouldPrerender = !!(await (config as any).configVikePromise).prerender;
},
options(inputOptions) {
Expand Down Expand Up @@ -216,6 +217,7 @@ function assert(condition: unknown, message: string): asserts condition {
async function prerenderPages() {
const filePaths: string[] = [];
await prerender({
// biome-ignore lint/suspicious/noExplicitAny: TODO
async onPagePrerender(page: any) {
const result = page._prerenderResult;
filePaths.push(result.filePath);
Expand Down

0 comments on commit a2171ea

Please sign in to comment.