forked from mozilla/bedrock
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.pre-commit-config.yaml
108 lines (108 loc) · 3.19 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
# Global excludes, override per repo below if different excludes required.
exclude: >
(?x)^(
docs
| node_modules
| assets
| static
| bedrock/externalfiles/files_cache
| git-repos
)
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: v4.6.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.6.3
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/, l10n-pocket/en/]
- repo: https://github.com/pre-commit/mirrors-prettier
rev: v3.1.0
hooks:
- id: prettier
additional_dependencies:
- prettier@3.3.0
- repo: https://github.com/awebdeveloper/pre-commit-stylelint
rev: 0.0.2
hooks:
- id: stylelint
additional_dependencies:
- "stylelint@16.6.1"
- "stylelint-config-standard-scss@13.1.0"
- "postcss-scss@4.0.9"
- "postcss@8.4.38"
- repo: https://github.com/eslint/eslint
rev: v9.4.0
hooks:
- id: eslint
additional_dependencies:
- "eslint-config-prettier@9.1.0"
# 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