Skip to content

Commit

Permalink
Merge pull request #156 from hatena/update-docs
Browse files Browse the repository at this point in the history
ドキュメントを更新
  • Loading branch information
susisu authored Dec 26, 2024
2 parents 49dd10b + 8926fbc commit 7d9beb6
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 2 deletions.
6 changes: 4 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,11 @@
```console
$ git switch main
$ git pull
$ yarn version --no-git-tag-version
$ git commit -am "vX.X.X"

$ # package.json 内の version と、README のインストール方法に書かれているバージョンを更新
$ # TODO: バージョン更新用のスクリプトを用意する

$ git commit -am "vX.X.X"
$ git push
$ # push すると CI により自動で publish されます
$ # Breaking Changes がある場合など、必要に応じて GitHub の
Expand Down
32 changes: 32 additions & 0 deletions docs/usage.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,22 @@ export default config({
});
```

ディレクトリごとに React に関する設定を有効化したい場合は、カスタム設定 (後述) で `config.react()` を拡張して使用してください。

```javascript
export default config({}, [
{
// foo/ 以下でのみ React に関する設定を有効化
files: ['foo/**/*.{ts,tsx}'],
extends: config.react(),
// 追加のルール設定など
rules: {
// ...
},
},
]);
```

### Next.js

Next.js に関連した設定やルールを有効化するには、`next` オプションを有効化してください。
Expand All @@ -79,6 +95,22 @@ export default config({
});
```

ディレクトリごとに Next.js に関する設定を有効化したい場合は、カスタム設定 (後述) で `config.next()` を拡張して使用してください。

```javascript
export default config({}, [
{
// foo/ 以下でのみ Next.js に関する設定を有効化
files: ['foo/**/*.{ts,tsx}'],
extends: config.next({ strict: true }),
// 追加のルール設定など
rules: {
// ...
},
},
]);
```

### Prettier

デフォルトでは Prettier を併用することを想定して、Prettier と衝突するフォーマットに関するルールを全て無効化するようになっています。
Expand Down

0 comments on commit 7d9beb6

Please sign in to comment.