-
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from yossydev/feat/biome
環境構築
- Loading branch information
Showing
13 changed files
with
100 additions
and
44 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
name: Code quality | ||
|
||
on: | ||
push: | ||
pull_request: | ||
|
||
jobs: | ||
quality: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
- name: Setup Biome | ||
uses: biomejs/setup-biome@v2 | ||
with: | ||
version: latest | ||
- name: Run Biome | ||
run: biome ci . |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
import { createClient } from 'honox/client' | ||
import { createClient } from "honox/client"; | ||
|
||
createClient() | ||
createClient(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,14 @@ | ||
import {} from 'hono' | ||
import {} from "hono"; | ||
|
||
type Head = { | ||
title?: string | ||
} | ||
title?: string; | ||
}; | ||
|
||
declare module 'hono' { | ||
interface Env { | ||
Variables: {} | ||
Bindings: {} | ||
} | ||
declare module "hono" { | ||
interface ContextRenderer { | ||
(content: string | Promise<string>, head?: Head): Response | Promise<Response> | ||
( | ||
content: string | Promise<string>, | ||
head?: Head, | ||
): Response | Promise<Response>; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
@tailwind base; | ||
@tailwind components; | ||
@tailwind utilities; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,13 @@ | ||
import { useState } from 'hono/jsx' | ||
import { useState } from "hono/jsx"; | ||
|
||
export default function Counter() { | ||
const [count, setCount] = useState(0) | ||
const [count, setCount] = useState(0); | ||
return ( | ||
<div> | ||
<p>{count}</p> | ||
<button onClick={() => setCount(count + 1)}>Increment</button> | ||
<button type="button" onClick={() => setCount(count + 1)}> | ||
Increment | ||
</button> | ||
</div> | ||
) | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,13 @@ | ||
import { css } from 'hono/css' | ||
import { createRoute } from 'honox/factory' | ||
import Counter from '../islands/counter' | ||
|
||
const className = css` | ||
font-family: sans-serif; | ||
` | ||
import { createRoute } from "honox/factory"; | ||
import Counter from "../islands/counter"; | ||
|
||
export default createRoute((c) => { | ||
const name = c.req.query('name') ?? 'Hono' | ||
const name = c.req.query("name") ?? "Hono"; | ||
return c.render( | ||
<div class={className}> | ||
<h1>Hello, {name}!</h1> | ||
<div> | ||
<h1 className="text-3xl font-bold underline">Hello world! {name}</h1> | ||
<Counter /> | ||
</div>, | ||
{ title: name } | ||
) | ||
}) | ||
{ title: name }, | ||
); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,8 @@ | ||
import { showRoutes } from 'hono/dev' | ||
import { createApp } from 'honox/server' | ||
import { showRoutes } from "hono/dev"; | ||
import { createApp } from "honox/server"; | ||
|
||
const app = createApp() | ||
const app = createApp(); | ||
|
||
showRoutes(app) | ||
showRoutes(app); | ||
|
||
export default app | ||
export default app; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
{ | ||
"$schema": "https://biomejs.dev/schemas/1.5.3/schema.json", | ||
"organizeImports": { | ||
"enabled": true | ||
}, | ||
"formatter": { | ||
"enabled": true, | ||
"formatWithErrors": true, | ||
"indentStyle": "space", | ||
"indentWidth": 2, | ||
"lineWidth": 80 | ||
}, | ||
"linter": { | ||
"enabled": true, | ||
"rules": { | ||
"recommended": true | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
export default { | ||
plugins: { | ||
tailwindcss: {}, | ||
autoprefixer: {}, | ||
}, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
/** @type {import('tailwindcss').Config} */ | ||
export default { | ||
content: ["./app/**/*.{js,ts,jsx,tsx}"], | ||
theme: { | ||
extend: {}, | ||
}, | ||
plugins: [], | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters