Skip to content

Commit

Permalink
chore: update @hono/eslint-config (#180)
Browse files Browse the repository at this point in the history
  • Loading branch information
yusukebe authored Sep 15, 2024
1 parent ddf747a commit 1882825
Show file tree
Hide file tree
Showing 17 changed files with 344 additions and 1,176 deletions.
6 changes: 0 additions & 6 deletions .eslintignore

This file was deleted.

3 changes: 0 additions & 3 deletions .eslintrc.cjs

This file was deleted.

3 changes: 3 additions & 0 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import baseConfig from '@hono/eslint-config'

export default [...baseConfig]
6 changes: 2 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,8 @@
"devDependencies": {
"@changesets/changelog-github": "^0.4.8",
"@changesets/cli": "^2.26.2",
"@hono/eslint-config": "^0.0.4",
"@typescript-eslint/eslint-plugin": "^6.6.0",
"@typescript-eslint/parser": "^6.6.0",
"eslint": "^8.55.0",
"@hono/eslint-config": "^1.0.1",
"eslint": "^9.10.0",
"prettier": "^3.2.4",
"typescript": "^5.2.2"
}
Expand Down
2 changes: 1 addition & 1 deletion packages/build/src/adapter/cloudflare-pages/index.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import type { Plugin, ResolvedConfig } from 'vite'
import { readdir, writeFile } from 'node:fs/promises'
import { resolve } from 'node:path'
import type { Plugin, ResolvedConfig } from 'vite'
import type { BuildOptions } from '../../base.js'
import buildPlugin, { defaultOptions } from '../../base.js'

Expand Down
4 changes: 2 additions & 2 deletions packages/build/src/base.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import type { ConfigEnv, Plugin, ResolvedConfig, UserConfig } from 'vite'
import { builtinModules } from 'module'
import { readdirSync } from 'node:fs'
import path, { resolve } from 'node:path'
import type { ConfigEnv, Plugin, ResolvedConfig, UserConfig } from 'vite'
import { resolve } from 'node:path'
import { getEntryContent } from './entry/index.js'
import type { GetEntryContentOptions } from './entry/index.js'

Expand Down
3 changes: 1 addition & 2 deletions packages/build/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { defaultOptions } from './base.js'
import basePlugin, { defaultOptions } from './base.js'
export { defaultOptions }

import basePlugin from './base.js'
export default basePlugin
2 changes: 1 addition & 1 deletion packages/build/test/basic.test.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { existsSync, readFileSync, rmSync } from 'node:fs'
import { build } from 'vite'
import { existsSync, readFileSync, rmSync } from 'node:fs'
import buildPlugin from '../src/base'

describe('Base Plugin', () => {
Expand Down
2 changes: 1 addition & 1 deletion packages/build/test/bun.test.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { existsSync, readFileSync, rmSync } from 'node:fs'
import { build } from 'vite'
import { existsSync, readFileSync, rmSync } from 'node:fs'
import bunBuildPlugin from '../src/adapter/bun'

describe('Build Plugin with Bun Adapter', () => {
Expand Down
2 changes: 1 addition & 1 deletion packages/build/test/cloudflare-pages.test.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { existsSync, readFileSync, rmSync } from 'node:fs'
import { build } from 'vite'
import { existsSync, readFileSync, rmSync } from 'node:fs'
import cloudflarePagesPlugin from '../src/adapter/cloudflare-pages'

describe('Build Plugin with Cloudflare Pages Adapter', () => {
Expand Down
2 changes: 1 addition & 1 deletion packages/cloudflare-pages/src/cloudflare-pages.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import type { ConfigEnv, Plugin, ResolvedConfig, UserConfig } from 'vite'
import { builtinModules } from 'module'
import { readdir, writeFile } from 'node:fs/promises'
import { resolve } from 'node:path'
import type { ConfigEnv, Plugin, ResolvedConfig, UserConfig } from 'vite'
import { getEntryContent } from './entry.js'

type CloudflarePagesOptions = {
Expand Down
2 changes: 1 addition & 1 deletion packages/cloudflare-pages/test/cloudflare-pages.test.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import * as fs from 'node:fs'
import { build } from 'vite'
import { describe, it, expect, afterAll } from 'vitest'
import * as fs from 'node:fs'
import cloudflarePagesPlugin from '../src/index'

describe('cloudflarePagesPlugin', () => {
Expand Down
2 changes: 1 addition & 1 deletion packages/dev-server/src/adapter/cloudflare.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ export const cloudflareAdapter: (options?: CloudflareAdapterOptions) => Promise<
if (proxy !== undefined) {
try {
await proxy.dispose()
} catch (error) {
} catch {
/**
* It throws an error if server is not running.
*/
Expand Down
2 changes: 1 addition & 1 deletion packages/dev-server/src/dev-server.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import type http from 'http'
import { getRequestListener } from '@hono/node-server'
import { minimatch } from 'minimatch'
import type { Plugin as VitePlugin, ViteDevServer, Connect } from 'vite'
import type http from 'http'
import type { Env, Fetch, EnvFunc, Adapter, LoadModule } from './types.js'

export type DevServerOptions = {
Expand Down
2 changes: 1 addition & 1 deletion packages/ssg/src/ssg.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { relative } from 'node:path'
import type { Hono } from 'hono'
import { toSSG } from 'hono/ssg'
import type { Plugin, ResolvedConfig } from 'vite'
import { createServer } from 'vite'
import { relative } from 'node:path'

type SSGOptions = {
entry?: string
Expand Down
4 changes: 2 additions & 2 deletions packages/ssg/test/ssg.test.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import fs from 'node:fs'
import path from 'node:path'
import { build } from 'vite'
import { describe, it, expect, beforeAll, afterAll } from 'vitest'
import fs from 'node:fs'
import path from 'node:path'
import ssgPlugin from '../src/index'

describe('ssgPlugin', () => {
Expand Down
Loading

0 comments on commit 1882825

Please sign in to comment.