aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/.pre-commit-config.yaml
diff options
context:
space:
mode:
authorHsiangNianian <i@jyunko.cn>2026-01-16 13:52:26 +0800
committerHsiangNianian <i@jyunko.cn>2026-01-16 14:18:19 +0800
commit47ec90726e2402eba2cf4b50a2cc572f2cfbcbd5 (patch)
tree05583dfabb72f80c523834df42858e5a978ecd4c /.pre-commit-config.yaml
parent7f4d7ec17e0a7e35b6865af2975fc4b1a2d4281d (diff)
downloadDropOut-47ec90726e2402eba2cf4b50a2cc572f2cfbcbd5.tar.gz
DropOut-47ec90726e2402eba2cf4b50a2cc572f2cfbcbd5.zip
chore: update pre-commit configuration for Rust and Python hooks
Modified the .pre-commit-config.yaml to downgrade versions of pre-commit hooks for improved compatibility. Removed local Rust hooks and replaced them with hooks from the official Rust pre-commit repository, adding support for formatting and linting. Adjusted Python hooks to streamline the linting process.
Diffstat (limited to '.pre-commit-config.yaml')
-rw-r--r--.pre-commit-config.yaml42
1 files changed, 9 insertions, 33 deletions
diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml
index 0929a81..f8b6348 100644
--- a/.pre-commit-config.yaml
+++ b/.pre-commit-config.yaml
@@ -1,49 +1,25 @@
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
- rev: v6.0.0
+ rev: v5.0.0
hooks:
- id: check-ast
- id: check-case-conflict
- id: check-json
+ exclude: ^ui/tsconfig.*\.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
+ rev: v0.1.6
hooks:
- - id: ruff-check
- types_or: [ python, pyi ]
+ - id: ruff
args: [ --fix ]
- id: ruff-format
- types_or: [ python, pyi ]
- - repo: local
+ - repo: https://github.com/doublify/pre-commit-rust
+ rev: v1.0
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
+ - id: fmt
+ - id: clippy
+ args: ["--", "-D", "warnings"] \ No newline at end of file