-
Notifications
You must be signed in to change notification settings - Fork 4
/
.pre-commit-config.yaml
47 lines (41 loc) · 1.79 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
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.0.1
hooks:
- id: trailing-whitespace # Removes trailing whitespace from all file types
- id: end-of-file-fixer # Ensures the file ends with a newline for all file types
- id: check-yaml # Checks YAML files for syntax errors and format issues
- id: check-json # Checks JSON files for syntax errors and format issues
- id: check-added-large-files # Prevents adding large files to the repository
- repo: https://github.com/psf/black
rev: 23.1.0
hooks:
- id: black
language_version: python3.8 # Formats Python code to adhere to the Black code style
- repo: https://github.com/PyCQA/flake8
rev: 5.0.4
hooks:
- id: flake8
additional_dependencies: [flake8-docstrings]
args: [--max-line-length=88]
language_version: python3.8 # Lints Python code for style and quality issues
- repo: https://github.com/pre-commit/mirrors-eslint
rev: v8.14.0
hooks:
- id: eslint
files: \.(js|jsx|ts|tsx)$ # Lints JavaScript and TypeScript files
- repo: https://github.com/pre-commit/mirrors-prettier
rev: v2.5.1
hooks:
- id: prettier
files: \.(js|jsx|ts|tsx|css|scss|md|yaml|yml|html)$ # Formats JavaScript, TypeScript, CSS, SCSS, Markdown, YAML, and HTML files
- repo: https://github.com/pre-commit/pygrep-hooks
rev: v1.7.0
hooks:
- id: python-check-blanket-noqa # Prevents blanket "noqa" comments in Python files
- id: python-no-eval # Prevents the use of "eval" in Python files
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v0.910
hooks:
- id: mypy
language_version: python3.8 # Checks type annotations in Python files using MyPy