-
-
Notifications
You must be signed in to change notification settings - Fork 14
Expand file tree
/
Copy path.pre-commit-config.yaml
More file actions
92 lines (84 loc) · 2.69 KB
/
.pre-commit-config.yaml
File metadata and controls
92 lines (84 loc) · 2.69 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
---
ci:
skip: [yarn-build, yarn-lint]
minimum_pre_commit_version: 3.2.0
repos:
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.15.11
hooks:
- id: ruff-check
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: 3e8a8703264a2f4a69428a0aa4dcb512790b2c8c # frozen: v6.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
exclude: ^blueprints/
- 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: ["yarn@1.22.21"]
- 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: ["yarn@1.22.21"]
- repo: https://github.com/adrienverge/yamllint.git
rev: cba56bcde1fdd01c1deb3f945e69764c291a6530 # frozen: v1.38.0
hooks:
- id: yamllint
types: [yaml]
- repo: https://github.com/igorshubovych/markdownlint-cli
rev: v0.48.0
hooks:
- id: markdownlint
args: ["--fix"]
- repo: https://github.com/PyCQA/flake8
rev: d93590f5be797aabb60e3b09f2f52dddb02f349f # frozen: 7.3.0
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: 0f369d245750787ce34997d464ed9605391a5283 # frozen: v1.20.1
hooks:
- id: mypy
files: ^(custom_components)/.+\.py$
- repo: https://github.com/rhysd/actionlint
rev: 914e7df21a07ef503a81201c76d2b11c789d3fca # frozen: v1.7.12
hooks:
- id: actionlint