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 | |
barredterra | 8afb779 | 2024-03-26 12:22:19 +0100 | [diff] [blame] | 58 | - repo: https://github.com/astral-sh/ruff-pre-commit |
| 59 | rev: v0.2.0 |
Ankush Menat | 0afff86 | 2021-09-01 15:43:41 +0530 | [diff] [blame] | 60 | hooks: |
barredterra | 8afb779 | 2024-03-26 12:22:19 +0100 | [diff] [blame] | 61 | - id: ruff |
| 62 | name: "Run ruff linter and apply fixes" |
| 63 | args: ["--fix"] |
Ankush Menat | 0afff86 | 2021-09-01 15:43:41 +0530 | [diff] [blame] | 64 | |
barredterra | 8afb779 | 2024-03-26 12:22:19 +0100 | [diff] [blame] | 65 | - id: ruff-format |
| 66 | name: "Format Python code" |
Chillar Anand | 915b343 | 2021-09-02 16:44:59 +0530 | [diff] [blame] | 67 | |
Ankush Menat | 21e00da | 2022-02-12 12:58:32 +0530 | [diff] [blame] | 68 | |
Ankush Menat | 0afff86 | 2021-09-01 15:43:41 +0530 | [diff] [blame] | 69 | ci: |
| 70 | autoupdate_schedule: weekly |
| 71 | skip: [] |
| 72 | submodules: false |