Skip to content

Commit

Permalink
とりあえず Biome 導入してみた
Browse files Browse the repository at this point in the history
button 要素に type='button' やんなきゃいけないの知らなかった
  • Loading branch information
erutobusiness committed Dec 3, 2023
1 parent f84c02c commit 5e43273
Show file tree
Hide file tree
Showing 5 changed files with 139 additions and 4 deletions.
12 changes: 12 additions & 0 deletions biome.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"$schema": "https://biomejs.dev/schemas/1.4.1/schema.json",
"organizeImports": {
"enabled": true
},
"linter": {
"enabled": true,
"rules": {
"recommended": true
}
}
}
122 changes: 122 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
"react-dom": "^18.2.0"
},
"devDependencies": {
"@biomejs/biome": "^1.4.1",
"@types/node": "^20.10.2",
"@types/react": "^18.2.37",
"@types/react-dom": "^18.2.15",
Expand Down
6 changes: 3 additions & 3 deletions src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,16 @@ function App() {
return (
<>
<div>
<a href="https://vitejs.dev" target="_blank">
<a href="https://vitejs.dev" target="_blank" rel="noreferrer">
<img src={viteLogo} className="logo" alt="Vite logo" />
</a>
<a href="https://react.dev" target="_blank">
<a href="https://react.dev" target="_blank" rel="noreferrer">
<img src={reactLogo} className="logo react" alt="React logo" />
</a>
</div>
<h1>Vite + React</h1>
<div className="card">
<button onClick={() => setCount((count) => count + 1)}>
<button type='button' onClick={() => setCount((count) => count + 1)}>
count is {count}
</button>
<p>
Expand Down
2 changes: 1 addition & 1 deletion src/main.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import ReactDOM from 'react-dom/client'
import App from './App.tsx'
import './index.css'

ReactDOM.createRoot(document.getElementById('root')!).render(
ReactDOM.createRoot(document.getElementById('root') as HTMLElement).render(
<React.StrictMode>
<App />
</React.StrictMode>,
Expand Down

0 comments on commit 5e43273

Please sign in to comment.