blob: 1f115811f83d3eeb1868ba9a103831f1ccb3a36e [file] [log] [blame]
Ankush Menat0afff862021-09-01 15:43:41 +05301exclude: 'node_modules|.git'
2default_stages: [commit]
3fail_fast: false
4
5
6repos:
7 - repo: https://github.com/pre-commit/pre-commit-hooks
Ankush Menat78733382023-12-21 20:09:10 +05308 rev: v4.3.0
Ankush Menat0afff862021-09-01 15:43:41 +05309 hooks:
10 - id: trailing-whitespace
11 files: "erpnext.*"
Ankush Menat65279c22021-09-01 15:52:16 +053012 exclude: ".*json$|.*txt$|.*csv|.*md"
Ankush Menat0afff862021-09-01 15:43:41 +053013 - id: check-yaml
14 - id: no-commit-to-branch
15 args: ['--branch', 'develop']
16 - id: check-merge-conflict
17 - id: check-ast
Ankush Menat78733382023-12-21 20:09:10 +053018 - id: check-json
19 - id: check-toml
20 - id: check-yaml
21 - id: debug-statements
Ankush Menat0afff862021-09-01 15:43:41 +053022
barredterra2c160362024-02-29 17:08:25 +010023 - repo: https://github.com/pre-commit/mirrors-prettier
24 rev: v2.7.1
25 hooks:
26 - id: prettier
27 types_or: [javascript, vue, scss]
28 # Ignore any files that might contain jinja / bundles
29 exclude: |
30 (?x)^(
31 erpnext/public/dist/.*|
32 cypress/.*|
33 .*node_modules.*|
34 .*boilerplate.*|
35 erpnext/public/js/controllers/.*|
36 erpnext/templates/pages/order.js|
37 erpnext/templates/includes/.*
38 )$
39
Deepesh Garg924cdef2023-07-14 18:53:02 +053040 - repo: https://github.com/pre-commit/mirrors-eslint
41 rev: v8.44.0
42 hooks:
43 - id: eslint
44 types_or: [javascript]
45 args: ['--quiet']
46 # Ignore any files that might contain jinja / bundles
47 exclude: |
48 (?x)^(
49 erpnext/public/dist/.*|
50 cypress/.*|
51 .*node_modules.*|
52 .*boilerplate.*|
Deepesh Garg40772542023-07-22 23:07:18 +053053 erpnext/public/js/controllers/.*|
Deepesh Garg0d70ae22023-07-23 19:34:08 +053054 erpnext/templates/pages/order.js|
55 erpnext/templates/includes/.*
Deepesh Garg924cdef2023-07-14 18:53:02 +053056 )$
57
Deepesh Garge81bec52022-11-16 16:24:28 +053058 - repo: https://github.com/PyCQA/flake8
Deepesh Garg924cdef2023-07-14 18:53:02 +053059 rev: 6.0.0
Ankush Menat0afff862021-09-01 15:43:41 +053060 hooks:
61 - id: flake8
Chillar Anand772d4752021-10-06 22:28:48 +053062 additional_dependencies: [
ChillarAnand4dc17a82021-10-11 10:37:59 +053063 'flake8-bugbear',
Corentin Flr5c4df3e2023-08-29 07:29:58 +020064 'flake8-tuple',
Chillar Anand772d4752021-10-06 22:28:48 +053065 ]
ChillarAnand4dc17a82021-10-11 10:37:59 +053066 args: ['--config', '.github/helper/.flake8_strict']
Ankush Menat0afff862021-09-01 15:43:41 +053067 exclude: ".*setup.py$"
68
Ankush Menat21e00da2022-02-12 12:58:32 +053069 - repo: https://github.com/adityahase/black
70 rev: 9cb0a69f4d0030cdf687eddf314468b39ed54119
71 hooks:
72 - id: black
Ankush Menatd29e3142022-03-29 11:47:28 +053073 additional_dependencies: ['click==8.0.4']
Ankush Menat21e00da2022-02-12 12:58:32 +053074
Deepesh Garg2bad86d2023-01-30 19:58:23 +053075 - repo: https://github.com/PyCQA/isort
76 rev: 5.12.0
Chillar Anand915b3432021-09-02 16:44:59 +053077 hooks:
78 - id: isort
79 exclude: ".*setup.py$"
80
Ankush Menat21e00da2022-02-12 12:58:32 +053081
Ankush Menat0afff862021-09-01 15:43:41 +053082ci:
83 autoupdate_schedule: weekly
84 skip: []
85 submodules: false