aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/.pre-commit-config.yaml
diff options
context:
space:
mode:
authorBegonia, HE <163421589+BegoniaHe@users.noreply.github.com>2026-01-16 04:02:19 +0100
committerGitHub <noreply@github.com>2026-01-16 04:02:19 +0100
commitc8d8c1ea53c175b95c731468447f25a96a9a9803 (patch)
tree6f0ebff8ee61bd8da718a69ba67c21f49a06c70d /.pre-commit-config.yaml
parent83027c383f26f772842771a6d670642fd36c269a (diff)
parentfa11a9152fdf519bb5f222d94e2ce937babb17fb (diff)
downloadDropOut-c8d8c1ea53c175b95c731468447f25a96a9a9803.tar.gz
DropOut-c8d8c1ea53c175b95c731468447f25a96a9a9803.zip
Merge branch 'HsiangNianian:main' into chore/add-github-templates
Diffstat (limited to '.pre-commit-config.yaml')
-rw-r--r--.pre-commit-config.yaml49
1 files changed, 49 insertions, 0 deletions
diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml
new file mode 100644
index 0000000..0929a81
--- /dev/null
+++ b/.pre-commit-config.yaml
@@ -0,0 +1,49 @@
+repos:
+ - repo: https://github.com/pre-commit/pre-commit-hooks
+ rev: v6.0.0
+ hooks:
+ - id: check-ast
+ - id: check-case-conflict
+ - id: check-json
+ - id: check-toml
+ - id: check-yaml
+ - id: fix-byte-order-marker
+
+ - repo: https://github.com/astral-sh/ruff-pre-commit
+ rev: v0.14.13
+ hooks:
+ - id: ruff-check
+ types_or: [ python, pyi ]
+ args: [ --fix ]
+ - id: ruff-format
+ types_or: [ python, pyi ]
+
+ - repo: local
+ hooks:
+ - id: cargo-fmt
+ name: cargo fmt
+ entry: bash -c 'cd src-tauri && cargo fmt --all'
+ language: system
+ files: ^src-tauri/.*\.rs$
+ pass_filenames: false
+
+ - id: cargo-clippy
+ name: cargo clippy
+ entry: bash -c 'cd src-tauri && cargo clippy --all-targets --all-features -- -D warnings'
+ language: system
+ files: ^src-tauri/.*\.rs$
+ pass_filenames: false
+
+ - id: oxlint
+ name: oxlint (svelte/ts/js)
+ entry: pnpm --dir ui run lint:fix
+ language: system
+ files: ^ui/
+ pass_filenames: false
+
+ - id: oxfmt
+ name: oxfmt (format)
+ entry: pnpm --dir ui run format
+ language: system
+ files: ^ui/
+ pass_filenames: false \ No newline at end of file