From 0a39b99e08c2ccf6dd419190fcd4af17903c3c58 Mon Sep 17 00:00:00 2001 From: zihluwang Date: Sat, 28 Jun 2025 21:44:16 +0800 Subject: [PATCH] style: code reformatting --- .gitignore | 3 +++ .prettierrc | 9 +++++---- package.json | 1 + pnpm-lock.yaml | 10 ++++++++++ src/index.ts | 8 ++++---- 5 files changed, 23 insertions(+), 8 deletions(-) diff --git a/.gitignore b/.gitignore index 3b0fe33..72f5dc1 100644 --- a/.gitignore +++ b/.gitignore @@ -170,3 +170,6 @@ dist .dev.vars .wrangler/ + +.idea/ +*.iml diff --git a/.prettierrc b/.prettierrc index 5c7b5d3..ff28e12 100644 --- a/.prettierrc +++ b/.prettierrc @@ -1,6 +1,7 @@ { - "printWidth": 140, - "singleQuote": true, - "semi": true, - "useTabs": true + "printWidth": 100, + "singleQuote": false, + "semi": false, + "useTabs": false, + "tabWidth": 2 } diff --git a/package.json b/package.json index c6293e9..b8da2cd 100644 --- a/package.json +++ b/package.json @@ -11,6 +11,7 @@ }, "devDependencies": { "@cloudflare/vitest-pool-workers": "^0.8.19", + "prettier": "^3.6.2", "typescript": "^5.5.2", "vitest": "~3.2.0", "wrangler": "^4.22.0" diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 6b2cbda..0e868be 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -11,6 +11,9 @@ importers: '@cloudflare/vitest-pool-workers': specifier: ^0.8.19 version: 0.8.47(@vitest/runner@3.2.4)(@vitest/snapshot@3.2.4)(vitest@3.2.4) + prettier: + specifier: ^3.6.2 + version: 3.6.2 typescript: specifier: ^5.5.2 version: 5.8.3 @@ -822,6 +825,11 @@ packages: resolution: {integrity: sha512-3Ybi1tAuwAP9s0r1UQ2J4n5Y0G05bJkpUIO0/bI9MhwmD70S5aTWbXGBwxHrelT+XM1k6dM0pk+SwNkpTRN7Pg==} engines: {node: ^10 || ^12 || >=14} + prettier@3.6.2: + resolution: {integrity: sha512-I7AIg5boAr5R0FFtJ6rCfD+LFsWHp81dolrFD8S79U9tb8Az2nGrJncnMSnys+bpQJfRUzqs9hnA81OAA3hCuQ==} + engines: {node: '>=14'} + hasBin: true + printable-characters@1.0.42: resolution: {integrity: sha512-dKp+C4iXWK4vVYZmYSd0KBH5F/h1HoZRsbJ82AVKRO3PEo8L4lBS/vLwhVtpwwuYcoIsVY+1JYKR268yn480uQ==} @@ -1618,6 +1626,8 @@ snapshots: picocolors: 1.1.1 source-map-js: 1.2.1 + prettier@3.6.2: {} + printable-characters@1.0.42: {} rollup@4.44.1: diff --git a/src/index.ts b/src/index.ts index 43b1255..647ec28 100644 --- a/src/index.ts +++ b/src/index.ts @@ -12,7 +12,7 @@ */ export default { - async fetch(request, env, ctx): Promise { - return new Response('Hello World!'); - }, -} satisfies ExportedHandler; + async fetch(request, env, ctx): Promise { + return new Response("Hello World!") + }, +} satisfies ExportedHandler