-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.pre-commit-config.yaml
More file actions
73 lines (67 loc) · 2.14 KB
/
.pre-commit-config.yaml
File metadata and controls
73 lines (67 loc) · 2.14 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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
# Pre-commit hooks for ATP Website
# See https://pre-commit.com for more information
# See https://pre-commit.com/hooks.html for more hooks
repos:
# General hooks for all files
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v5.0.0
hooks:
- id: trailing-whitespace
exclude: ^(package-lock\.json|.*\.md)$
- id: end-of-file-fixer
exclude: ^(package-lock\.json)$
- id: check-yaml
exclude: ^(render\.yaml)$
- id: check-added-large-files
args: ['--maxkb=1000']
- id: check-json
exclude: ^(package-lock\.json|tsconfig\.json)$
- id: check-merge-conflict
- id: check-case-conflict
- id: mixed-line-ending
# Python backend hooks
- repo: https://github.com/psf/black
rev: 24.10.0
hooks:
- id: black
name: Format Python code with Black
files: ^backend/.*\.py$
args: ['--line-length=88']
- repo: https://github.com/pycqa/isort
rev: 5.13.2
hooks:
- id: isort
name: Sort Python imports with isort
files: ^backend/.*\.py$
args: ['--profile=black', '--line-length=88']
- repo: https://github.com/pycqa/flake8
rev: 7.1.1
hooks:
- id: flake8
name: Lint Python code with Flake8
files: ^backend/.*\.py$
args: ['--max-line-length=88', '--extend-ignore=E203,W503']
# Frontend hooks
- repo: https://github.com/pre-commit/mirrors-eslint
rev: v9.28.0
hooks:
- id: eslint
name: Lint JavaScript/TypeScript with ESLint
files: \.(js|jsx|ts|tsx)$
exclude: ^backend/
types: [file]
additional_dependencies:
- eslint@9.28.0
- eslint-plugin-react-hooks@5.2.0
- eslint-plugin-react-refresh@0.4.19
- typescript-eslint@8.38.0
- globals@16.0.0
- '@eslint/js@9.21.0'
- repo: https://github.com/pre-commit/mirrors-prettier
rev: v4.0.0-alpha.8
hooks:
- id: prettier
name: Format code with Prettier
files: \.(js|jsx|ts|tsx|json|css|scss|md|yaml|yml)$
exclude: ^(backend/|package-lock\.json)$
args: ['--write', '--ignore-unknown']