-
Notifications
You must be signed in to change notification settings - Fork 23
Expand file tree
/
Copy path.pre-commit-config.yaml
More file actions
133 lines (131 loc) · 3.86 KB
/
.pre-commit-config.yaml
File metadata and controls
133 lines (131 loc) · 3.86 KB
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
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
# Global excludes, override per repo below if different excludes required.
exclude: >
(?x)^(
docs
| node_modules
| assets
| static
| 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: v6.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.6
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.15.12
hooks:
- id: ruff
- id: ruff-format
- repo: https://github.com/mozilla-l10n/moz-fluent-linter
rev: v0.4.9
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: v4.0.0-alpha.8
hooks:
- id: prettier
additional_dependencies:
- prettier@^3.7.4
- repo: https://github.com/awebdeveloper/pre-commit-stylelint
rev: 0.0.2
hooks:
- id: stylelint
additional_dependencies:
- "stylelint@16.26.1"
- "stylelint-config-standard-scss@13.1.0"
- "postcss-scss@4.0.9"
- "postcss@8.5.8"
- repo: https://github.com/awebdeveloper/pre-commit-stylelint
rev: 0.0.2
hooks:
- id: stylelint
files: media/css/.*/flare26.*\.css$
args: [-c, .stylelintrc-flare26]
additional_dependencies:
- "stylelint@16.26.1"
- "stylelint-config-standard-scss@13.1.0"
- "postcss-scss@4.0.9"
- "postcss@8.5.8"
- "stylelint-use-logical@2.1.3"
- repo: https://github.com/eslint/eslint
rev: v10.2.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
- repo: https://github.com/asottile/pyupgrade
rev: "v3.21.2"
hooks:
- id: pyupgrade
args: [--py313]
- repo: https://github.com/adamchainz/django-upgrade
rev: "1.30.0"
hooks:
- id: django-upgrade
args: [--target-version, "5.2"]