-
-
Notifications
You must be signed in to change notification settings - Fork 50
Expand file tree
/
Copy path.pre-commit-config.yaml
More file actions
107 lines (96 loc) · 3.75 KB
/
.pre-commit-config.yaml
File metadata and controls
107 lines (96 loc) · 3.75 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
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v6.0.0
hooks:
- id: check-yaml
exclude: extralit/mkdocs.yml|examples/deployments/k8s
- id: end-of-file-fixer
exclude_types: [text, jupyter]
- id: trailing-whitespace
- repo: https://github.com/charliermarsh/ruff-pre-commit
rev: v0.12.9
hooks:
- id: ruff
args: [--fix]
- id: ruff-format
##############################################################################
# extralit SDK specific hooks
##############################################################################
# (Removed duplicate ruff hook for extralit SDK; global ruff hook above
# now serves as single source of truth using pyproject.toml configuration)
- repo: https://github.com/Lucas-C/pre-commit-hooks
rev: v1.5.5
hooks:
- id: insert-license
name: "Insert license header in Python source files"
files: '^extralit/.*\.py$'
exclude: ^extralit/docs/snippets/
args:
- --license-filepath
- extralit/LICENSE_HEADER
- --fuzzy-match-generates-todo
- repo: https://github.com/kynan/nbstripout
rev: 0.8.1
hooks:
- id: nbstripout
files: '^extralit/.*\.ipynb$'
args:
- --keep-count
- --keep-output
# - --keep-prompt-number
# - --keep-cell-ids
# - --keep-markdown
# - --keep-output-timestamp
# - --keep-execution-count
# - --keep-metadata
# - --keep-version
##############################################################################
# extralit-server specific hooks
##############################################################################
# (Removed duplicate ruff hook for extralit-server; global ruff hook above
# now serves as single source of truth using pyproject.toml configuration)
- repo: https://github.com/Lucas-C/pre-commit-hooks
rev: v1.5.5
hooks:
- id: insert-license
name: "Insert license header in Python source files"
files: '^extralit-server/.*\.py$'
args:
- --license-filepath
- extralit-server/LICENSE_HEADER
- --fuzzy-match-generates-todo
##############################################################################
# extralit-frontend specific hooks
##############################################################################
- repo: local
hooks:
- id: frontend-lint
name: "Lint and fix extralit-frontend files"
entry: bash -c 'cd extralit-frontend && npx eslint --fix --cache "$@" || true'
language: system
files: '^extralit-frontend/.*\.(js|ts|vue)$'
pass_filenames: true
##############################################################################
# Helm lint hook
##############################################################################
- repo: https://github.com/gruntwork-io/pre-commit
rev: v0.1.30
hooks:
- id: helmlint
name: Helm lint
files: '^examples/deployments/k8s/.*\.yaml$'
args: ["helm", "lint", "examples/deployments/k8s/"]
ci:
autofix_commit_msg: |
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
autofix_prs: true
autoupdate_branch: ""
autoupdate_commit_msg: "[pre-commit.ci] pre-commit autoupdate"
autoupdate_schedule: weekly
skip:
- helmlint # Disabling helmlint on CI by now because helm dependency is not available
- frontend-eslint # Requires npm dependencies to be installed in extralit-frontend
- frontend-prettier # Requires npm dependencies to be installed in extralit-frontend
- frontend-lint # Requires npm dependencies to be installed in extralit-frontend
submodules: false