Skip to content

Commit 85953b6

Browse files
azuclaude
andauthored
feat: Biomeを導入してPrettierを置き換え (#21)
* feat: Biomeを導入してPrettierを置き換え - @biomejs/biome v2.0.6を追加 - Prettierを削除してBiomeでフォーマットとリントを統合 - lint-stagedとpre-commitフックを更新 - コードスタイル設定(4スペース、120文字、ダブルクォート)を維持 - フォーマットとリントのパフォーマンスを向上 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com> * fix: Biomeリンターの警告を修正 - 未使用変数の修正(_errorに変更) - リンター設定をwarnに変更してエラーを警告として表示 - 既存のコードスタイルを維持しつつビルドが通るように調整 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com> * feat: 型安全性向上とモダンなJavaScript記法の採用 - TypeScriptの厳密な型定義を追加(anyをすべて削除) - String.prototype.matchAllとUnicodeフラグ(/u)を採用 - while文での代入式をfor...ofループに置き換え - 絵文字の正規表現でUnicodeフラグを使用してサロゲートペア対応 - 非null assertion演算子を安全なnullish coalescing演算子に変更 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com> * Apply suggestion from @azu * feat: CIにBiomeリンターを追加 - npm testでBiomeのlintチェックを実行 - コード品質の向上とCI時の品質保証を強化 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com> --------- Co-authored-by: Claude <noreply@anthropic.com>
1 parent 7298ec0 commit 85953b6

12 files changed

+413
-198
lines changed

.githooks/pre-commit

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
#!/bin/sh
2-
npx --no-install lint-staged
2+
npx --no-install lint-staged

.textlintrc.json

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
2-
"plugins": {},
3-
"filters": {},
4-
"rules": {
5-
"preset-japanese": true
6-
}
7-
}
2+
"plugins": {},
3+
"filters": {},
4+
"rules": {
5+
"preset-japanese": true
6+
}
7+
}

biome.json

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
{
2+
"$schema": "https://biomejs.dev/schemas/2.0.6/schema.json",
3+
"files": {
4+
"ignoreUnknown": false,
5+
"includes": ["src/**/*", "test/**/*", "*.js", "*.ts", "*.json"]
6+
},
7+
"formatter": {
8+
"enabled": true,
9+
"formatWithErrors": false,
10+
"indentStyle": "space",
11+
"indentWidth": 4,
12+
"lineWidth": 120,
13+
"lineEnding": "lf"
14+
},
15+
"linter": {
16+
"enabled": true,
17+
"rules": {
18+
"recommended": true,
19+
"suspicious": {
20+
"noExplicitAny": "error",
21+
"noImplicitAnyLet": "error",
22+
"noAssignInExpressions": "error",
23+
"noMisleadingCharacterClass": "error"
24+
},
25+
"style": {
26+
"noNonNullAssertion": "error"
27+
},
28+
"correctness": {
29+
"noUnusedVariables": "error"
30+
}
31+
}
32+
},
33+
"javascript": {
34+
"formatter": {
35+
"quoteStyle": "double",
36+
"semicolons": "always",
37+
"trailingCommas": "none"
38+
}
39+
},
40+
"json": {
41+
"formatter": {
42+
"enabled": true
43+
}
44+
}
45+
}

package-lock.json

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

0 commit comments

Comments
 (0)