diff --git a/.prettierignore b/.prettierignore new file mode 100644 index 0000000..7310e73 --- /dev/null +++ b/.prettierignore @@ -0,0 +1 @@ +.wrangler \ No newline at end of file diff --git a/examples/cloudflare-pages/playwright.config.ts b/examples/cloudflare-pages/playwright.config.ts index d81db00..5ab1d8e 100644 --- a/examples/cloudflare-pages/playwright.config.ts +++ b/examples/cloudflare-pages/playwright.config.ts @@ -21,4 +21,4 @@ export default defineConfig({ port: 6173, reuseExistingServer: !process.env.CI, }, -}) \ No newline at end of file +}) diff --git a/examples/cloudflare-workers/server/index.ts b/examples/cloudflare-workers/server/index.ts index 740577e..0647e6a 100644 --- a/examples/cloudflare-workers/server/index.ts +++ b/examples/cloudflare-workers/server/index.ts @@ -7,7 +7,7 @@ const app = new Hono<{ } }>() -app.use(async(c, next) => { +app.use(async (c, next) => { await next() c.header('X-Powered-By', 'Remix and Hono') }) @@ -15,9 +15,8 @@ app.use(async(c, next) => { app.get('/api', (c) => { return c.json({ message: 'Hello', - var: c.env.MY_VAR + var: c.env.MY_VAR, }) }) - export default app diff --git a/package.json b/package.json index 0cc1324..c9c645d 100644 --- a/package.json +++ b/package.json @@ -10,8 +10,8 @@ "watch": "tsup --watch", "lint": "eslint src examples/cloudflare-pages/app examples/cloudflare-pages/server examples/cloudflare-workers/app examples/cloudflare-workers/server", "lint:fix": "eslint src examples/cloudflare-pages/app examples/cloudflare-pages/server examples/cloudflare-workers/app examples/cloudflare-workers/server --fix", - "format": "prettier --check --cache \"src/**/*.{js,ts,tsx}\" \"examples/cloudflare-pages/app/**/*.{js,ts,tsx}\" \"examples/cloudflare-workers/app/**/*.{js,ts,tsx}\"", - "format:fix": "prettier --write --cache --cache-strategy metadata \"src/**/*.{js,ts,tsx}\" \"examples/cloudflare-pages/app/**/*.{js,ts,tsx}\" \"examples/cloudflare-workers/app/**/*.{js,ts,tsx}\"", + "format": "prettier --check --cache \"src/**/*.{ts,tsx}\" \"examples/cloudflare-pages/**/*.{ts,tsx}\" \"examples/cloudflare-workers/**/*.{ts,tsx}\"", + "format:fix": "prettier --write --cache --cache-strategy metadata \"src/**/*.{ts,tsx}\" \"examples/cloudflare-pages/**/*.{ts,tsx}\" \"examples/cloudflare-workers/**/*.{ts,tsx}\"", "publint": "publint", "prerelease": "npm run build && npm run test", "release": "np"