-
Notifications
You must be signed in to change notification settings - Fork 918
/
.pre-commit-config.yaml
112 lines (110 loc) · 3.21 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
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
# Global excludes, override per repo below if different excludes required.
exclude: >
(?x)^(
docs
| node_modules
| assets
| static
| bedrock/externalfiles/files_cache
| git-repos
)
default_language_version:
node: lts
repos:
# Note: hooks that add content must run before ones which check formatting, lint, etc
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v5.0.0
hooks:
- id: check-shebang-scripts-are-executable
- id: check-yaml
- id: end-of-file-fixer
- id: trailing-whitespace
args:
- --markdown-linebreak-ext=md
- repo: https://github.com/Lucas-C/pre-commit-hooks
rev: v1.5.5
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/astral-sh/ruff-pre-commit
rev: v0.7.4
hooks:
- id: ruff
- id: ruff-format
- repo: https://github.com/mozilla-l10n/moz-fluent-linter
rev: v0.4.6
hooks:
- id: fluent_linter
files: \.ftl$
args: [--config, .github/l10n/linter_config.yml, l10n/en/, l10n/en-US/]
- repo: https://github.com/pre-commit/mirrors-prettier
rev: v3.1.0
hooks:
- id: prettier
additional_dependencies:
- repo: https://github.com/awebdeveloper/pre-commit-stylelint
rev: 0.0.2
hooks:
- id: stylelint
additional_dependencies:
- repo: https://github.com/eslint/eslint
rev: v9.13.0
hooks:
- id: eslint
additional_dependencies:
# Additional excludes in /.eslintignore file
- repo: https://github.com/mozmeao/pre-commit-hooks-django
rev: v0.4.1a # this is OUR micro-bumped release of the fork
hooks:
- id: check-untracked-migrations
# If specified in args, below, this hook will work only on those
# branches, otherwise it will work on all branches
# args: ["--branches", "main", "other_branch"]
- id: check-unapplied-migrations
- id: check-absent-migrations