This repository has been archived by the owner on May 30, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy path.pre-commit-config.yaml
71 lines (68 loc) · 1.96 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
59
60
61
62
63
64
65
66
67
68
69
70
71
repos:
# general pre-commit hooks
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
hooks:
- id: check-case-conflict
- id: check-json
- id: check-toml
- id: check-xml
- id: check-yaml
args: [--allow-multiple-documents]
- id: detect-aws-credentials
args: [--allow-missing-credentials]
- id: detect-private-key
- id: end-of-file-fixer
- id: mixed-line-ending
- id: requirements-txt-fixer
- id: trailing-whitespace
args: [--markdown-linebreak-ext=md]
# license checks
- repo: https://github.com/Lucas-C/pre-commit-hooks
rev: v1.5.1
hooks:
- id: insert-license
name: add license header (frontend)
files: (?<!\.config)\.[jt]sx?$
args: [--license-filepath, LICENSE_HEADER.txt, --comment-style, "//"]
- id: insert-license
name: add license header (backend)
files: (?<!__init__)\.py$
args: [--license-filepath, LICENSE_HEADER.txt, --comment-style, "#"]
# python projects
- repo: https://github.com/PyCQA/isort
rev: 5.12.0
hooks:
- id: isort
name: format imports with isort
language_version: python3
args: ["--profile", "black"]
files: \.py$
- repo: https://github.com/ambv/black
rev: 23.3.0
hooks:
- id: black
name: format with black
language_version: python3
files: \.py$
- repo: https://github.com/PyCQA/flake8
rev: 6.0.0
hooks:
- id: flake8
name: lint with flake8
args: [--config, tox.ini]
files: \.py$
# javascript and typescript projects
- repo: https://github.com/pre-commit/mirrors-prettier
rev: v2.7.1
hooks:
- id: prettier
name: format with prettier
files: ^frontend\/.*
- repo: https://github.com/pre-commit/mirrors-eslint
rev: v8.39.0
hooks:
- id: eslint
name: lint with eslint
files: \.[jt]sx?$
types: [file]