Ankush Menat | 0afff86 | 2021-09-01 15:43:41 +0530 | [diff] [blame] | 1 | exclude: 'node_modules|.git' |
| 2 | default_stages: [commit] |
| 3 | fail_fast: false |
| 4 | |
| 5 | |
| 6 | repos: |
| 7 | - repo: https://github.com/pre-commit/pre-commit-hooks |
Ankush Menat | 7873338 | 2023-12-21 20:09:10 +0530 | [diff] [blame] | 8 | rev: v4.3.0 |
Ankush Menat | 0afff86 | 2021-09-01 15:43:41 +0530 | [diff] [blame] | 9 | hooks: |
| 10 | - id: trailing-whitespace |
| 11 | files: "erpnext.*" |
Ankush Menat | 65279c2 | 2021-09-01 15:52:16 +0530 | [diff] [blame] | 12 | exclude: ".*json$|.*txt$|.*csv|.*md" |
Ankush Menat | 0afff86 | 2021-09-01 15:43:41 +0530 | [diff] [blame] | 13 | - id: check-yaml |
| 14 | - id: no-commit-to-branch |
| 15 | args: ['--branch', 'develop'] |
| 16 | - id: check-merge-conflict |
| 17 | - id: check-ast |
Ankush Menat | 7873338 | 2023-12-21 20:09:10 +0530 | [diff] [blame] | 18 | - id: check-json |
| 19 | - id: check-toml |
| 20 | - id: check-yaml |
| 21 | - id: debug-statements |
Ankush Menat | 0afff86 | 2021-09-01 15:43:41 +0530 | [diff] [blame] | 22 | |
barredterra | 2c16036 | 2024-02-29 17:08:25 +0100 | [diff] [blame] | 23 | - 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 Garg | 924cdef | 2023-07-14 18:53:02 +0530 | [diff] [blame] | 40 | - 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 Garg | 4077254 | 2023-07-22 23:07:18 +0530 | [diff] [blame] | 53 | erpnext/public/js/controllers/.*| |
Deepesh Garg | 0d70ae2 | 2023-07-23 19:34:08 +0530 | [diff] [blame] | 54 | erpnext/templates/pages/order.js| |
| 55 | erpnext/templates/includes/.* |
Deepesh Garg | 924cdef | 2023-07-14 18:53:02 +0530 | [diff] [blame] | 56 | )$ |
| 57 | |
Deepesh Garg | e81bec5 | 2022-11-16 16:24:28 +0530 | [diff] [blame] | 58 | - repo: https://github.com/PyCQA/flake8 |
Deepesh Garg | 924cdef | 2023-07-14 18:53:02 +0530 | [diff] [blame] | 59 | rev: 6.0.0 |
Ankush Menat | 0afff86 | 2021-09-01 15:43:41 +0530 | [diff] [blame] | 60 | hooks: |
| 61 | - id: flake8 |
Chillar Anand | 772d475 | 2021-10-06 22:28:48 +0530 | [diff] [blame] | 62 | additional_dependencies: [ |
ChillarAnand | 4dc17a8 | 2021-10-11 10:37:59 +0530 | [diff] [blame] | 63 | 'flake8-bugbear', |
Corentin Flr | 5c4df3e | 2023-08-29 07:29:58 +0200 | [diff] [blame] | 64 | 'flake8-tuple', |
Chillar Anand | 772d475 | 2021-10-06 22:28:48 +0530 | [diff] [blame] | 65 | ] |
ChillarAnand | 4dc17a8 | 2021-10-11 10:37:59 +0530 | [diff] [blame] | 66 | args: ['--config', '.github/helper/.flake8_strict'] |
Ankush Menat | 0afff86 | 2021-09-01 15:43:41 +0530 | [diff] [blame] | 67 | exclude: ".*setup.py$" |
| 68 | |
Ankush Menat | 21e00da | 2022-02-12 12:58:32 +0530 | [diff] [blame] | 69 | - repo: https://github.com/adityahase/black |
| 70 | rev: 9cb0a69f4d0030cdf687eddf314468b39ed54119 |
| 71 | hooks: |
| 72 | - id: black |
Ankush Menat | d29e314 | 2022-03-29 11:47:28 +0530 | [diff] [blame] | 73 | additional_dependencies: ['click==8.0.4'] |
Ankush Menat | 21e00da | 2022-02-12 12:58:32 +0530 | [diff] [blame] | 74 | |
Deepesh Garg | 2bad86d | 2023-01-30 19:58:23 +0530 | [diff] [blame] | 75 | - repo: https://github.com/PyCQA/isort |
| 76 | rev: 5.12.0 |
Chillar Anand | 915b343 | 2021-09-02 16:44:59 +0530 | [diff] [blame] | 77 | hooks: |
| 78 | - id: isort |
| 79 | exclude: ".*setup.py$" |
| 80 | |
Ankush Menat | 21e00da | 2022-02-12 12:58:32 +0530 | [diff] [blame] | 81 | |
Ankush Menat | 0afff86 | 2021-09-01 15:43:41 +0530 | [diff] [blame] | 82 | ci: |
| 83 | autoupdate_schedule: weekly |
| 84 | skip: [] |
| 85 | submodules: false |