blob: 30be903ae8f440e770317f6d00d409b85d6ec0b5 [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
8 rev: v4.0.1
9 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
18
Deepesh Garg924cdef2023-07-14 18:53:02 +053019 - repo: https://github.com/pre-commit/mirrors-eslint
20 rev: v8.44.0
21 hooks:
22 - id: eslint
23 types_or: [javascript]
24 args: ['--quiet']
25 # Ignore any files that might contain jinja / bundles
26 exclude: |
27 (?x)^(
28 erpnext/public/dist/.*|
29 cypress/.*|
30 .*node_modules.*|
31 .*boilerplate.*|
Deepesh Garg40772542023-07-22 23:07:18 +053032 erpnext/public/js/controllers/.*|
Deepesh Garg0d70ae22023-07-23 19:34:08 +053033 erpnext/templates/pages/order.js|
34 erpnext/templates/includes/.*
Deepesh Garg924cdef2023-07-14 18:53:02 +053035 )$
36
Deepesh Garge81bec52022-11-16 16:24:28 +053037 - repo: https://github.com/PyCQA/flake8
Deepesh Garg924cdef2023-07-14 18:53:02 +053038 rev: 6.0.0
Ankush Menat0afff862021-09-01 15:43:41 +053039 hooks:
40 - id: flake8
Chillar Anand772d4752021-10-06 22:28:48 +053041 additional_dependencies: [
ChillarAnand4dc17a82021-10-11 10:37:59 +053042 'flake8-bugbear',
Corentin Flr5c4df3e2023-08-29 07:29:58 +020043 'flake8-tuple',
Chillar Anand772d4752021-10-06 22:28:48 +053044 ]
ChillarAnand4dc17a82021-10-11 10:37:59 +053045 args: ['--config', '.github/helper/.flake8_strict']
Ankush Menat0afff862021-09-01 15:43:41 +053046 exclude: ".*setup.py$"
47
Ankush Menat21e00da2022-02-12 12:58:32 +053048 - repo: https://github.com/adityahase/black
49 rev: 9cb0a69f4d0030cdf687eddf314468b39ed54119
50 hooks:
51 - id: black
Ankush Menatd29e3142022-03-29 11:47:28 +053052 additional_dependencies: ['click==8.0.4']
Ankush Menat21e00da2022-02-12 12:58:32 +053053
Deepesh Garg2bad86d2023-01-30 19:58:23 +053054 - repo: https://github.com/PyCQA/isort
55 rev: 5.12.0
Chillar Anand915b3432021-09-02 16:44:59 +053056 hooks:
57 - id: isort
58 exclude: ".*setup.py$"
59
Ankush Menat21e00da2022-02-12 12:58:32 +053060
Ankush Menat0afff862021-09-01 15:43:41 +053061ci:
62 autoupdate_schedule: weekly
63 skip: []
64 submodules: false