mirror of
https://github.com/OpenListTeam/OpenList-Desktop.git
synced 2025-11-25 03:14:56 +08:00
26 lines
673 B
YAML
26 lines
673 B
YAML
|
|
# Pre-commit hook configuration
|
||
|
|
# Install with: yarn add -D husky lint-staged
|
||
|
|
# Then run: npx husky install
|
||
|
|
|
||
|
|
repos:
|
||
|
|
- repo: local
|
||
|
|
hooks:
|
||
|
|
- id: frontend-lint
|
||
|
|
name: Frontend Lint
|
||
|
|
entry: yarn lint:fix
|
||
|
|
language: system
|
||
|
|
files: \.(ts|vue|js)$
|
||
|
|
|
||
|
|
- id: rust-fmt
|
||
|
|
name: Rust Format
|
||
|
|
entry: bash -c 'cd src-tauri && cargo fmt --all'
|
||
|
|
language: system
|
||
|
|
files: \.rs$
|
||
|
|
|
||
|
|
- id: rust-clippy
|
||
|
|
name: Rust Clippy
|
||
|
|
entry: bash -c 'cd src-tauri && cargo clippy --all-targets --all-features -- -D warnings'
|
||
|
|
language: system
|
||
|
|
files: \.rs$
|
||
|
|
pass_filenames: false
|