forked from daydreamlive/scope
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy path.pre-commit-config.yaml
More file actions
47 lines (42 loc) · 1.36 KB
/
.pre-commit-config.yaml
File metadata and controls
47 lines (42 loc) · 1.36 KB
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
default_install_hook_types: [pre-commit, prepare-commit-msg]
repos:
# General hooks
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v5.0.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
- id: check-merge-conflict
- id: check-yaml
- id: check-json
exclude: '^\.vscode/'
- id: check-toml
# Python formatting and linting with ruff
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.14.11
hooks:
- id: ruff
args: [--fix]
exclude: "(vendor/|/vendor/)"
- id: ruff-format
exclude: "(vendor/|/vendor/)"
# Frontend formatting and linting
- repo: local
hooks:
- id: prettier
name: prettier
entry: bash -c 'cd frontend && npm run format'
language: system
files: ^frontend/.*\.(ts|tsx|js|jsx|json|css|md)$
pass_filenames: false
- id: eslint
name: eslint
entry: bash -c 'cd frontend && npm run lint:fix'
language: system
files: ^frontend/.*\.(ts|tsx|js|jsx)$
pass_filenames: false
- id: signoff
name: Add Signed-off-by
entry: "bash -c 'git interpret-trailers --if-exists doNothing --trailer \"Signed-off-by: $(git config user.name) <$(git config user.email)>\" --in-place \"$1\"' --"
language: system
stages: [prepare-commit-msg]