Skip to content

Commit 8139399

Browse files
authored
chore: bump @hono/eslint-config and enable curly rule (#4620)
1 parent 4e87275 commit 8139399

4 files changed

Lines changed: 19 additions & 11 deletions

File tree

bun.lock

Lines changed: 3 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -656,7 +656,7 @@
656656
"nodejs"
657657
],
658658
"devDependencies": {
659-
"@hono/eslint-config": "^2.0.3",
659+
"@hono/eslint-config": "^2.0.5",
660660
"@hono/node-server": "^1.13.5",
661661
"@types/glob": "^9.0.0",
662662
"@types/jsdom": "^21.1.7",

src/client/client.test.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1559,7 +1559,9 @@ describe('Custom buildSearchParams', () => {
15591559
const customBuildSearchParams = (query: Record<string, string | string[]>) => {
15601560
const searchParams = new URLSearchParams()
15611561
for (const [k, v] of Object.entries(query)) {
1562-
if (v === undefined) continue
1562+
if (v === undefined) {
1563+
continue
1564+
}
15631565
if (Array.isArray(v)) {
15641566
v.forEach((item) => searchParams.append(`${k}[]`, item))
15651567
} else {

src/middleware/csrf/index.test.ts

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -438,8 +438,12 @@ describe('CSRF by Middleware', () => {
438438
'*',
439439
csrf({
440440
secFetchSite: (secFetchSite, c) => {
441-
if (secFetchSite === 'same-origin') return true
442-
if (c.req.path.startsWith('/webhook/')) return true
441+
if (secFetchSite === 'same-origin') {
442+
return true
443+
}
444+
if (c.req.path.startsWith('/webhook/')) {
445+
return true
446+
}
443447
return false
444448
},
445449
})
@@ -479,8 +483,12 @@ describe('CSRF by Middleware', () => {
479483
csrf({
480484
secFetchSite: async (secFetchSite, c) => {
481485
await new Promise((r) => setTimeout(r, 10))
482-
if (secFetchSite === 'same-origin') return true
483-
if (c.req.path.startsWith('/webhook/')) return true
486+
if (secFetchSite === 'same-origin') {
487+
return true
488+
}
489+
if (c.req.path.startsWith('/webhook/')) {
490+
return true
491+
}
484492
return false
485493
},
486494
})

0 commit comments

Comments
 (0)