Skip to content

Commit

Permalink
chore: fix format command and add .prettierignore (#31)
Browse files Browse the repository at this point in the history
  • Loading branch information
yusukebe authored Nov 20, 2024
1 parent d79b5be commit 1c50620
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
1 change: 1 addition & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
.wrangler
2 changes: 1 addition & 1 deletion examples/cloudflare-pages/playwright.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,4 @@ export default defineConfig({
port: 6173,
reuseExistingServer: !process.env.CI,
},
})
})
5 changes: 2 additions & 3 deletions examples/cloudflare-workers/server/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,16 @@ const app = new Hono<{
}
}>()

app.use(async(c, next) => {
app.use(async (c, next) => {
await next()
c.header('X-Powered-By', 'Remix and Hono')
})

app.get('/api', (c) => {
return c.json({
message: 'Hello',
var: c.env.MY_VAR
var: c.env.MY_VAR,
})
})


export default app
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit 1c50620

Please sign in to comment.