Skip to content
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

docs: update lefthook example #662

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions src/content/docs/ja/recipes/git-hooks.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ Gitリポジトリのルートに`lefthook.yml`というファイルを追加し
pre-commit:
commands:
check:
root: .
glob: "*.{js,ts,cjs,mjs,d.cts,d.mts,jsx,tsx,json,jsonc}"
run: npx @biomejs/biome check --no-errors-on-unmatched --files-ignore-unknown=true {staged_files}
```
Expand All @@ -33,6 +34,7 @@ Gitリポジトリのルートに`lefthook.yml`というファイルを追加し
pre-commit:
commands:
check:
root: .
glob: "*.{js,ts,cjs,mjs,d.cts,d.mts,jsx,tsx,json,jsonc}"
run: npx @biomejs/biome check --write --no-errors-on-unmatched --files-ignore-unknown=true {staged_files} && git update-index --again
```
Expand All @@ -45,6 +47,7 @@ Gitリポジトリのルートに`lefthook.yml`というファイルを追加し
pre-push:
commands:
check:
root: .
glob: "*.{js,ts,cjs,mjs,d.cts,d.mts,jsx,tsx,json,jsonc}"
run: npx @biomejs/biome check --no-errors-on-unmatched --files-ignore-unknown=true {push_files}
```
Expand Down
3 changes: 3 additions & 0 deletions src/content/docs/pt-br/recipes/git-hooks.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ Alguns exemplos de configurações:
pre-commit:
commands:
check:
root: .
glob: "*.{js,ts,cjs,mjs,d.cts,d.mts,jsx,tsx,json,jsonc}"
run: npx @biomejs/biome check --no-errors-on-unmatched --files-ignore-unknown=true {staged_files}
```
Expand All @@ -34,6 +35,7 @@ Alguns exemplos de configurações:
pre-commit:
commands:
check:
root: .
glob: "*.{js,ts,cjs,mjs,d.cts,d.mts,jsx,tsx,json,jsonc}"
run: npx @biomejs/biome check --write --no-errors-on-unmatched --files-ignore-unknown=true {staged_files} && git update-index --again
```
Expand All @@ -46,6 +48,7 @@ Alguns exemplos de configurações:
pre-push:
commands:
check:
root: .
glob: "*.{js,ts,cjs,mjs,d.cts,d.mts,jsx,tsx,json,jsonc}"
run: npx @biomejs/biome check --no-errors-on-unmatched --files-ignore-unknown=true {push_files}
```
Expand Down
3 changes: 3 additions & 0 deletions src/content/docs/recipes/git-hooks.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ Some examples of _Lefthook_ configurations:
pre-commit:
commands:
check:
root: .
glob: "*.{js,ts,cjs,mjs,d.cts,d.mts,jsx,tsx,json,jsonc}"
run: npx @biomejs/biome check --no-errors-on-unmatched --files-ignore-unknown=true {staged_files}
```
Expand All @@ -33,6 +34,7 @@ Some examples of _Lefthook_ configurations:
pre-commit:
commands:
check:
root: .
glob: "*.{js,ts,cjs,mjs,d.cts,d.mts,jsx,tsx,json,jsonc}"
run: npx @biomejs/biome check --write --no-errors-on-unmatched --files-ignore-unknown=true {staged_files} && git update-index --again
```
Expand All @@ -45,6 +47,7 @@ Some examples of _Lefthook_ configurations:
pre-push:
commands:
check:
root: .
glob: "*.{js,ts,cjs,mjs,d.cts,d.mts,jsx,tsx,json,jsonc}"
run: npx @biomejs/biome check --no-errors-on-unmatched --files-ignore-unknown=true {push_files}
```
Expand Down
3 changes: 3 additions & 0 deletions src/content/docs/zh-cn/recipes/git-hooks.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ Git 允许在运行 git 命令的过程中执行 [Git Hooks](https://git-scm.com
pre-commit:
commands:
check:
root: .
glob: "*.{js,ts,cjs,mjs,d.cts,d.mts,jsx,tsx,json,jsonc}"
run: npx @biomejs/biome check --no-errors-on-unmatched --files-ignore-unknown=true {staged_files}
```
Expand All @@ -33,6 +34,7 @@ Git 允许在运行 git 命令的过程中执行 [Git Hooks](https://git-scm.com
pre-commit:
commands:
check:
root: .
glob: "*.{js,ts,cjs,mjs,d.cts,d.mts,jsx,tsx,json,jsonc}"
run: npx @biomejs/biome check --write --no-errors-on-unmatched --files-ignore-unknown=true {staged_files} && git update-index --again
```
Expand All @@ -45,6 +47,7 @@ Git 允许在运行 git 命令的过程中执行 [Git Hooks](https://git-scm.com
pre-push:
commands:
check:
root: .
glob: "*.{js,ts,cjs,mjs,d.cts,d.mts,jsx,tsx,json,jsonc}"
run: npx @biomejs/biome check --no-errors-on-unmatched --files-ignore-unknown=true {push_files}
```
Expand Down