forked from mik-laj/streamlit-ketcher
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.pre-commit-config.yaml
70 lines (70 loc) · 2.17 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
---
default_stages: [commit, push]
default_language_version:
python: python3
node: 18.6.0
minimum_pre_commit_version: '2.0.0'
repos:
- repo: meta
hooks:
- id: check-hooks-apply
name: Check if all hooks apply to the repository
- repo: https://github.com/psf/black
rev: 23.1.0
hooks:
- id: black
name: Run black (Python formatter)
args: [--config=./pyproject.toml]
- repo: https://github.com/charliermarsh/ruff-pre-commit
# Ruff version.
rev: 'v0.0.256'
hooks:
- id: ruff
args: [--fix, --exit-non-zero-on-fix]
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
hooks:
- id: check-merge-conflict
name: Check that merge conflicts are not being committed
- id: debug-statements
name: Detect accidentally committed debug statements
- id: check-builtin-literals
name: Require literal syntax when initializing Python builtin types
- id: end-of-file-fixer
name: Make sure that there is an empty line at the end
exclude: ^NOTICES$
- id: mixed-line-ending
name: Detect if mixed line ending is used (\r vs. \r\n)
- id: check-executables-have-shebangs
name: Check that executables have shebang
- id: trailing-whitespace
name: Remove trailing whitespace at end of line
exclude: ^NOTICES$
- id: pretty-format-json
name: Format JSON files
args:
- --autofix
- --no-sort-keys
- --indent
- "2"
- repo: https://github.com/adrienverge/yamllint
rev: v1.29.0
hooks:
- id: yamllint
name: Check YAML files with yamllint
entry: yamllint --strict
types: [yaml]
- repo: local
hooks:
- id: yarn-format
name: Run formatted for frontend code
entry: ./dev.py js-format
language: system
files: ^frontend/src\/.+\.([jt]sx?|s?css)$
require_serial: true
- id: license-disclaimer
name: Generate NOTICES
language: system
entry: bash -c "cd frontend; yarn license-disclaimer"
files: '(package\.json|yarn\.lock)$'
pass_filenames: false