-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.pre-commit-config.yml
111 lines (99 loc) · 2.86 KB
/
.pre-commit-config.yml
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
# A config file for pre-commit.com
#
# Documentation
# https://github.com/specifysystems/code-principles/blob/main/pre-commit-hooks.md
default_language_version:
python: python3
default_stages:
- commit
- merge-commit
exclude: ^(lib|.idea)
repos:
- repo: local
hooks:
- id: frontend-tests
name: TypeScript and QUnit
description: Run TypeScript typechecker and automated tests on .ts files
entry: /bin/bash -c "cd src && npm test"
language: script
types_or: [javascript, jsx, ts, tsx]
pass_filenames: false
- repo: https://github.com/maxpatiiuk/pre-commit
rev: v1.0.5
hooks:
- id: regex-blacklist
args:
- specifyweb/frontend/js_src/lib/tests/regexBlacklist.txt
# global hooks:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.0.1
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
- id: check-added-large-files
- id: check-case-conflict
- id: check-docstring-first
- id: check-xml
- id: check-shebang-scripts-are-executable
- id: check-merge-conflict
- id: check-symlinks
- id: detect-private-key
- id: mixed-line-ending
- id: requirements-txt-fixer
- id: fix-byte-order-marker
- id: fix-encoding-pragma
- id: forbid-new-submodules
- repo: https://github.com/codespell-project/codespell
rev: v2.1.0
hooks:
- id: codespell
args:
- --skip="./node_modules/,package-lock.json,./.idea/"
- repo: https://github.com/terrencepreilly/darglint
rev: v1.8.1
hooks:
- id: darglint
args:
- -v 2
- repo: https://github.com/pre-commit/mirrors-prettier
rev: v2.5.0
hooks:
- id: prettier
additional_dependencies:
- prettier-plugin-package@^1.3.0
- prettier-plugin-sh@^0.8.1
- prettier-plugin-tailwind-css@^1.5.0
- repo: https://github.com/awebdeveloper/pre-commit-stylelint
rev: 0.0.2
hooks:
- id: stylelint
files: \.(css|scss|sass|js|jsx|ts|tsx)$
additional_dependencies:
- stylelint@^14.1.0
- stylelint-config-prettier@^9.0.3
- stylelint-config-standard@^24.0.0
- repo: https://github.com/Lucas-C/pre-commit-hooks-safety
rev: v1.2.2
hooks:
- id: python-safety-dependencies-check
- repo: https://github.com/jorisroovers/gitlint
rev: v0.16.0
hooks:
- id: gitlint
- repo: https://github.com/IamTheFij/docker-pre-commit
rev: v2.0.1
hooks:
- id: docker-compose-check
- repo: https://github.com/markdownlint/markdownlint
rev: v0.11.0
hooks:
- id: markdownlint
files: \.md$
args:
- --git-recurse
- repo: https://github.com/maxpatiiuk/mirrors-jscpd
rev: v3.3.26
hooks:
- id: jscpd
types: [text]