-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.pre-commit-config.yaml
58 lines (52 loc) · 1.67 KB
/
.pre-commit-config.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
fail_fast: false
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v3.2.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
- id: check-yaml
- id: check-added-large-files
- repo: local
hooks:
- id: cargo-fmt
name: cargo fmt
description: Format files with rustfmt.
entry: bash -c 'cargo fmt --manifest-path ./src-tauri/Cargo.toml -- --check'
language: rust
files: \.rs$
args: []
- id: cargo-check
name: cargo check
description: Check the package for errors.
entry: bash -c 'cargo check --manifest-path ./src-tauri/Cargo.toml --all'
language: rust
files: \.rs$
pass_filenames: false
- id: cargo-clippy
name: cargo clippy
description: Lint rust sources.
entry: bash -c 'cargo clippy --manifest-path ./src-tauri/Cargo.toml --all-targets --all-features --tests --benches -- -D warnings'
language: rust
files: \.rs$
pass_filenames: false
- id: cargo-test
name: cargo test
description: Unit test for the project.
entry: bash -c 'cargo test --manifest-path ./src-tauri/Cargo.toml --all-features'
language: rust
files: \.rs$
pass_filenames: false
- id: vitest
name: Vitest
entry: bash -c 'pnpm test -- --run'
language: node
files: \.ts$
pass_filenames: false
- id: lint-ts
name: Front-end lint staged
description: Lint the front-end code
entry: bash -c 'pnpm lint-staged -v'
language: node
files: \.(ts|tsx|js|jsx)$
pass_filenames: false