-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy path.pre-commit-config.yaml
More file actions
53 lines (49 loc) · 1.44 KB
/
.pre-commit-config.yaml
File metadata and controls
53 lines (49 loc) · 1.44 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
repos:
# Secrets detection
- repo: https://github.com/Yelp/detect-secrets
rev: v1.4.0
hooks:
- id: detect-secrets
args: ['--baseline', '.secrets.baseline']
exclude: package-lock.json
# Python code quality
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.1.8
hooks:
- id: ruff
args: [--fix, --exit-non-zero-on-fix]
- id: ruff-format
# Python security linting
- repo: https://github.com/PyCQA/bandit
rev: 1.7.5
hooks:
- id: bandit
args: ['-c', '.bandit']
exclude: tests/
# General file checks
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.5.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
- id: check-yaml
- id: check-json
- id: check-toml
- id: check-added-large-files
args: ['--maxkb=10000']
- id: check-merge-conflict
- id: check-case-conflict
- id: mixed-line-ending
- id: no-commit-to-branch
args: ['--branch', 'main', '--branch', 'master']
# Frontend linting (if you want to run ESLint in pre-commit)
# - repo: https://github.com/pre-commit/mirrors-eslint
# rev: v8.57.0
# hooks:
# - id: eslint
# files: \.(js|jsx|ts|tsx)$
# types: [file]
# additional_dependencies:
# - eslint@8.57.0
# - '@typescript-eslint/parser@6.21.0'
# - '@typescript-eslint/eslint-plugin@6.21.0'