Skip to content

Commit

Permalink
chore: update linter and add prettier (#66)
Browse files Browse the repository at this point in the history
  • Loading branch information
yusukebe authored Jan 29, 2024
1 parent 29ca500 commit 66aa60a
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 15 deletions.
8 changes: 5 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,18 @@
"scripts": {
"build": "yarn workspaces foreach run build",
"lint": "eslint 'packages/**/*.{ts,tsx}'",
"lint:fix": "eslint --fix 'packages/**/*.{ts,tsx}'"
"lint:fix": "eslint --fix 'packages/**/*.{ts,tsx}'",
"format": "prettier --check 'packages/**/*.{ts,tsx}'",
"format:fix": "prettier --write 'packages/**/*.{ts,tsx}'"
},
"devDependencies": {
"@changesets/changelog-github": "^0.4.8",
"@changesets/cli": "^2.26.2",
"@hono/eslint-config": "^0.0.2",
"@hono/eslint-config": "^0.0.4",
"@typescript-eslint/eslint-plugin": "^6.6.0",
"@typescript-eslint/parser": "^6.6.0",
"eslint": "^8.55.0",
"prettier": "^3.0.3",
"prettier": "^3.2.4",
"typescript": "^5.2.2"
}
}
4 changes: 3 additions & 1 deletion packages/dev-server/src/dev-server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,9 @@ function injectStringToResponse(response: Response, content: string) {
const stream = response.body
const newContent = new TextEncoder().encode(content)

if (!stream) return null
if (!stream) {
return null
}

const reader = stream.getReader()
const newContentReader = new ReadableStream({
Expand Down
1 change: 1 addition & 0 deletions packages/ssg/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
},
"homepage": "https://github.com/honojs/vite-plugins",
"devDependencies": {
"glob": "^10.3.10",
"hono": "4.0.0-rc.2",
"publint": "^0.1.12",
"rimraf": "^5.0.1",
Expand Down
1 change: 0 additions & 1 deletion packages/ssg/src/ssg.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import fs from 'node:fs/promises'
import path from 'node:path'
import type { Hono } from 'hono'
import { toSSG } from 'hono/ssg'
import type { Plugin } from 'vite'
Expand Down
21 changes: 11 additions & 10 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -713,9 +713,9 @@ __metadata:
languageName: node
linkType: hard

"@hono/eslint-config@npm:^0.0.2":
version: 0.0.2
resolution: "@hono/eslint-config@npm:0.0.2"
"@hono/eslint-config@npm:^0.0.4":
version: 0.0.4
resolution: "@hono/eslint-config@npm:0.0.4"
dependencies:
"@typescript-eslint/eslint-plugin": ^6.14.0
"@typescript-eslint/parser": ^6.14.0
Expand All @@ -727,7 +727,7 @@ __metadata:
peerDependencies:
eslint: ^8.0.0
typescript: ^5.0.0
checksum: 6ad03c0b0d6a58dbfaff2b91e4446969ab933ede79e980f0ad385dbe4f2a689f96443c799a6a0c302020f63a7c0080df038697b399e2975e2fb78be8a320d4f7
checksum: a8aba05f75623973522a00dc25260510cc008a574f70b91d681b8c478e1dc145b5584068be31169dbf8b0a8a58a5b367041f520ae45a9ad249c1690b30537ba7
languageName: node
linkType: hard

Expand Down Expand Up @@ -779,6 +779,7 @@ __metadata:
version: 0.0.0-use.local
resolution: "@hono/vite-ssg@workspace:packages/ssg"
dependencies:
glob: ^10.3.10
hono: 4.0.0-rc.2
publint: ^0.1.12
rimraf: ^5.0.1
Expand Down Expand Up @@ -3363,11 +3364,11 @@ __metadata:
dependencies:
"@changesets/changelog-github": ^0.4.8
"@changesets/cli": ^2.26.2
"@hono/eslint-config": ^0.0.2
"@hono/eslint-config": ^0.0.4
"@typescript-eslint/eslint-plugin": ^6.6.0
"@typescript-eslint/parser": ^6.6.0
eslint: ^8.55.0
prettier: ^3.0.3
prettier: ^3.2.4
typescript: ^5.2.2
languageName: unknown
linkType: soft
Expand Down Expand Up @@ -4954,12 +4955,12 @@ __metadata:
languageName: node
linkType: hard

"prettier@npm:^3.0.3":
version: 3.1.1
resolution: "prettier@npm:3.1.1"
"prettier@npm:^3.2.4":
version: 3.2.4
resolution: "prettier@npm:3.2.4"
bin:
prettier: bin/prettier.cjs
checksum: e386855e3a1af86a748e16953f168be555ce66d6233f4ba54eb6449b88eb0c6b2ca79441b11eae6d28a7f9a5c96440ce50864b9d5f6356d331d39d6bb66c648e
checksum: 6ec9385a836e0b9bac549e585101c086d1521c31d7b882d5c8bb7d7646da0693da5f31f4fff6dc080710e5e2d34c85e6fb2f8766876b3645c8be2f33b9c3d1a3
languageName: node
linkType: hard

Expand Down

0 comments on commit 66aa60a

Please sign in to comment.