blob: c3cbbb7dfed3a232de80e8bea14037f98290bb20 [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
barredterra8afb7792024-03-26 12:22:19 +010058 - repo: https://github.com/astral-sh/ruff-pre-commit
59 rev: v0.2.0
Ankush Menat0afff862021-09-01 15:43:41 +053060 hooks:
barredterra8afb7792024-03-26 12:22:19 +010061 - id: ruff
62 name: "Run ruff linter and apply fixes"
63 args: ["--fix"]
Ankush Menat0afff862021-09-01 15:43:41 +053064
barredterra8afb7792024-03-26 12:22:19 +010065 - id: ruff-format
66 name: "Format Python code"
Chillar Anand915b3432021-09-02 16:44:59 +053067
Ankush Menat21e00da2022-02-12 12:58:32 +053068
Ankush Menat0afff862021-09-01 15:43:41 +053069ci:
70 autoupdate_schedule: weekly
71 skip: []
72 submodules: false