forked from mozilla/bedrock
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.pre-commit-config.yaml
93 lines (93 loc) · 2.5 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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
# Global excludes, override per repo below if different excludes required.
exclude: >
(?x)^(
docs
| bedrock/settings
| node_modules
| assets
| static
| bedrock/externalfiles/files_cache
| git-repos
| lib/fluent_migrations
)
repos:
# Note: hooks that add content must run before ones which check formatting, lint, etc
- repo: https://github.com/Lucas-C/pre-commit-hooks
rev: v1.1.10
hooks:
- id: insert-license
language: python
files: \.py$
args:
- --license-filepath
- license_header/mpl2_header.txt
- --comment-style
- "|#|"
- id: insert-license
exclude: media\/.*\/libs\/.*$
files: \.js$
args:
- --license-filepath
- license_header/mpl2_header.txt
- --comment-style
- /*|*|*/
- id: insert-license
files: \.scss$
args:
- --license-filepath
- license_header/mpl2_header.txt
- --comment-style
- //
- id: insert-license
files: \.sh$
args:
- --license-filepath
- license_header/mpl2_header.txt
- id: insert-license
files: \.html$ # jinja2
args:
- --license-filepath
- license_header/mpl2_header.txt
- --comment-style
- '{#||#}'
- id: insert-license
files: \.ftl$ # fluent templates
args:
- --license-filepath
- license_header/mpl2_header.txt
- --comment-style
- "|#|"
- repo: https://github.com/psf/black
rev: 21.9b0
hooks:
- id: black
language_version: python3
- repo: https://github.com/PyCQA/isort
rev: 5.9.3
hooks:
- id: isort
- repo: https://gitlab.com/pycqa/flake8
rev: 3.7.7
hooks:
- id: flake8
# TODO Add this and fix issues found
# additional_dependencies: [flake8-bugbear]
- repo: https://github.com/pre-commit/mirrors-prettier
rev: v2.4.1
hooks:
- id: prettier
- repo: https://github.com/awebdeveloper/pre-commit-stylelint
rev: 0.0.2
hooks:
- id: stylelint
additional_dependencies:
- "stylelint@13.12.0"
- "stylelint-config-standard@20.0.0"
- repo: https://github.com/eslint/eslint
rev: v7.32.0
hooks:
- id: eslint
additional_dependencies:
- "eslint-plugin-json@2.1.1"
- "eslint-config-prettier@8.3.0"
# Additional excludes in /.eslintignore file