-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy path.pre-commit-config.yaml
84 lines (77 loc) · 2.48 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
---
ci:
skip: [yarn-build, yarn-lint]
repos:
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.7.0
hooks:
- id: ruff
files: ^(scripts|tests|custom_components)/.+\.py$
args: [--fix, --exit-non-zero-on-fix]
- id: ruff-format
files: ^(scripts|tests|custom_components)/.+\.py$
- repo: https://github.com/pycqa/pydocstyle
rev: 6.3.0
hooks:
- id: pydocstyle
files: ^(custom_components|tests)/.+\.py$
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: cef0300fd0fc4d2a87a85fa2093c6b283ea36f4b # frozen: v5.0.0
hooks:
- id: trailing-whitespace
- id: check-added-large-files
- id: check-ast
- id: check-json
- id: check-merge-conflict
- id: check-xml
- id: check-yaml
- id: debug-statements
- id: end-of-file-fixer
- id: requirements-txt-fixer
- id: mixed-line-ending
args: ["--fix=lf"]
- id: no-commit-to-branch
args:
- --branch=dev
- --branch=master
- --branch=main
- --branch=rc
- --branch=production
- repo: local
hooks:
- id: yarn-lint
name: Lint js with yarn
description: This hook ensures that all Javascript/Typescript files are linted
language: node
types: ["text", "ts"]
entry: yarn lint:fix
additional_dependencies: ["[email protected]"]
- id: yarn-build
name: Build with yarn
description: This hook ensures that the JS package is built
language: node
types: ["text", "ts"]
entry: yarn build
pass_filenames: false
additional_dependencies: ["[email protected]"]
- repo: https://github.com/adrienverge/yamllint.git
rev: 81e9f98ffd059efe8aa9c1b1a42e5cce61b640c6 # frozen: v1.35.1
hooks:
- id: yamllint
types: [yaml]
- repo: https://github.com/PyCQA/flake8
rev: e43806be3607110919eff72939fda031776e885a # frozen: 7.1.1
hooks:
- id: flake8
args: ["--max-line-length=120"]
additional_dependencies: [Flake8-pyproject]
# Ensure all code is as secure as possible and follows best practices
- repo: https://github.com/pre-commit/mirrors-mypy
rev: 102bbee94061ff02fd361ec29c27b7cb26582f5f # frozen: v1.12.1
hooks:
- id: mypy
files: ^(custom_components)/.+\.py$
- repo: https://github.com/rhysd/actionlint
rev: 4e683ab8014a63fafa117492a0c6053758e6d593 # frozen: v1.7.3
hooks:
- id: actionlint