New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: lefthookの設定を追加 #13
base: main
Are you sure you want to change the base?
Conversation
本リポジトリの config はどれも設定例なので、利用されるプロジェクトの判断で採用・不採用してもらえればよいと思いますし、選択肢の提示という意味で記載しておいて良いと思いました。 |
pre-commit: | ||
commands: | ||
fix: | ||
glob: "*.{js,ts,cjs,mjs,d.cts,d.mts,jsx,tsx,json,jsonc}" | ||
run: npx biome check --apply --no-errors-on-unmatched --files-ignore-unknown=true <files> && git update-index --again |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[imo]
設定に隠蔽できるなら可能な限りオプションは減らしたい気持ち
https://biomejs.dev/ja/reference/configuration/#filesignoreunknown
pre-commit: | |
commands: | |
fix: | |
glob: "*.{js,ts,cjs,mjs,d.cts,d.mts,jsx,tsx,json,jsonc}" | |
run: npx biome check --apply --no-errors-on-unmatched --files-ignore-unknown=true <files> && git update-index --again | |
pre-commit: | |
commands: | |
fix: | |
glob: "*.{js,ts,cjs,mjs,d.cts,d.mts,jsx,tsx,json,jsonc}" | |
run: npx biome check --apply --files-ignore-unknown=true <files> && git update-index --again |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
これで秘匿できるのって--files-ignore-unknown=true
ですよね
提示されたdiffだと--no-errors-on-unmatched
が減ってるんですが、これはミスですか?
pre-commit: | ||
commands: | ||
fix: | ||
glob: "*.{js,ts,cjs,mjs,d.cts,d.mts,jsx,tsx,json,jsonc}" | ||
run: npx biome check --apply --no-errors-on-unmatched --files-ignore-unknown=true <files> && git update-index --again |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[ask]
apply-unsafe有効にしていないのは意図的です?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
安全でない習性はpre-commitで行うべきではないかな〜と思います!
pre-commit: | ||
commands: | ||
fix: | ||
glob: '*.{js,jsx,ts,tsx}' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[ask]
対象がbiome寄り少ないのはeslintが対応していないとかですかね?
parallel付けなければ順次実行できるはずなので、prettierとeslintの実行を分割してそれぞれ対象を最大化しておくと良さそう
glob: '*.{js,jsx,ts,tsx}' | |
glob: '*.{js,jsx,ts,tsx}' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
parallelつけたらですかね?
その場合はeslintとprettierが分割して実行できるので良いと思います!
修正DONEdesu
bases/lefthook/README.md
Outdated
1. CLIをインストールする | ||
|
||
```bash | ||
brew install lefthook | ||
``` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[imo]
一応npx経由の実行でも全て問題なく実行できた気がするんですよね
好みの問題かもしれないですが、個人的には全てnpx(bunxなど)経由の実装でいいのかなーと
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
修正しました〜
lefthookの設定をbasesに追加
やったこと
考慮点