@yoshinani/style-guide 0.10.2 → 0.11.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +28 -4
- package/cspell/words.txt +1 -0
- package/package.json +4 -2
package/README.md
CHANGED
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
|
|
9
9
|
以下の設定が利用可能で、組み合わせて使うことを想定しています。
|
|
10
10
|
|
|
11
|
-
- [Prettier](#prettier)
|
|
11
|
+
- [Prettier](#prettier) または [Biome](#biome)
|
|
12
12
|
- [ESLint](#eslint)
|
|
13
13
|
- [TypeScript](#typescript)
|
|
14
14
|
- [commitlint](#commitlint)
|
|
@@ -45,15 +45,29 @@ yarn add --dev @yoshinani/style-guide
|
|
|
45
45
|
|
|
46
46
|
## Biome
|
|
47
47
|
|
|
48
|
+
現在、この設定ではBiomeのフォーマッター機能のみを有効にしています。リンターとしては、別途 [ESLint](#eslint) を設定してください。
|
|
49
|
+
|
|
50
|
+
まず、プロジェクトルートにBiomeをインストールします。
|
|
51
|
+
|
|
52
|
+
```sh
|
|
53
|
+
pnpm add -w -D @biomejs/biome
|
|
54
|
+
```
|
|
55
|
+
|
|
48
56
|
共有のBiome設定を利用するには、`biome.jsonc` を作成して、以下のように `extends` を設定します。
|
|
49
57
|
|
|
50
58
|
```jsonc
|
|
51
59
|
{
|
|
52
|
-
"
|
|
60
|
+
"$schema": "./node_modules/@biomejs/biome/configuration_schema.json",
|
|
61
|
+
"extends": ["@yoshinani/style-guide/biome"],
|
|
62
|
+
"files": {
|
|
63
|
+
"includes": ["**", "!**/.next", "!**/.turbo"]
|
|
64
|
+
}
|
|
53
65
|
}
|
|
54
66
|
```
|
|
55
67
|
|
|
56
|
-
VSCodeでフォーマッターとしてBiome
|
|
68
|
+
VSCodeでフォーマッターとしてBiomeを利用する場合は、まず[Biomeの拡張機能](https://marketplace.visualstudio.com/items?itemName=biomejs.biome)をインストールしてください。
|
|
69
|
+
|
|
70
|
+
次に、`.vscode/settings.json` に以下の設定を追加します。
|
|
57
71
|
|
|
58
72
|
```json
|
|
59
73
|
{
|
|
@@ -63,6 +77,16 @@ VSCodeでフォーマッターとしてBiomeを利用する場合は、 `.vscode
|
|
|
63
77
|
}
|
|
64
78
|
```
|
|
65
79
|
|
|
80
|
+
プロジェクトの推奨拡張機能として設定するために、`.vscode/extensions.json`を作成し、以下の内容を追加することをお勧めします。
|
|
81
|
+
|
|
82
|
+
```json
|
|
83
|
+
{
|
|
84
|
+
"recommendations": [
|
|
85
|
+
"biomejs.biome"
|
|
86
|
+
]
|
|
87
|
+
}
|
|
88
|
+
```
|
|
89
|
+
|
|
66
90
|
## ESLint
|
|
67
91
|
|
|
68
92
|
利用できる設定は以下の通りです。
|
|
@@ -157,7 +181,7 @@ export default {
|
|
|
157
181
|
}
|
|
158
182
|
```
|
|
159
183
|
|
|
160
|
-
|
|
184
|
+
2. vscode拡張での設定
|
|
161
185
|
|
|
162
186
|
```json
|
|
163
187
|
{
|
package/cspell/words.txt
CHANGED
package/package.json
CHANGED
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@yoshinani/style-guide",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.11.0",
|
|
4
4
|
"description": "Yoshinani's Style Guide",
|
|
5
5
|
"license": "MIT",
|
|
6
|
+
"type": "module",
|
|
6
7
|
"publishConfig": {
|
|
7
|
-
"access": "public"
|
|
8
|
+
"access": "public",
|
|
9
|
+
"provenance": true
|
|
8
10
|
},
|
|
9
11
|
"homepage": "https://github.com/yoshinani-dev/style-guide#readme",
|
|
10
12
|
"bugs": {
|