@@ -5,7 +5,7 @@ exclude: |
55 # Files and folders generated by bots, to avoid loops
66 ^setup/|/static/description/index\.html$|
77 # We don't want to mess with tool-generated files
8- .svg$|/tests/([^/]+/)?cassettes/|^.copier-answers.yml$|^.github/|
8+ .svg$|/tests/([^/]+/)?cassettes/|^.copier-answers.yml$|^.github/|^eslint.config.cjs|^prettier.config.cjs|
99 # Maybe reactivate this when all README files include prettier ignore tags?
1010 ^README\.md$|
1111 # Library files can have extraneous formatting (even minimized)
@@ -38,10 +38,6 @@ repos:
3838 entry : found a en.po file
3939 language : fail
4040 files : ' [a-zA-Z0-9_]*/i18n/en\.po$'
41- - repo : https://github.com/sbidoul/whool
42- rev : v0.5
43- hooks :
44- - id : whool-init
4541 - repo : https://github.com/oca/maintainer-tools
4642 rev : d5fab7ee87fceee858a3d01048c78a548974d935
4743 hooks :
@@ -57,32 +53,57 @@ repos:
5753 - --repo-name=sy-account-analytic
5854 - --if-source-changed
5955 - --keep-source-digest
60- - --convert-fragments-to-markdown
61- - id : oca-gen-external-dependencies
6256 - repo : https://github.com/OCA/odoo-pre-commit-hooks
6357 rev : v0.0.25
6458 hooks :
6559 - id : oca-checks-odoo-module
6660 - id : oca-checks-po
67- - repo : https://github.com/pre-commit/mirrors-prettier
68- rev : v2.7.1
61+ args :
62+ - --disable=po-pretty-format
63+ - repo : https://github.com/myint/autoflake
64+ rev : v1.6.1
65+ hooks :
66+ - id : autoflake
67+ args :
68+ - --expand-star-imports
69+ - --ignore-init-module-imports
70+ - --in-place
71+ - --remove-all-unused-imports
72+ - --remove-duplicate-keys
73+ - --remove-unused-variables
74+ - repo : https://github.com/psf/black
75+ rev : 22.8.0
76+ hooks :
77+ - id : black
78+ - repo : local
6979 hooks :
7080 - id : prettier
7181 name : prettier (with plugin-xml)
82+ entry : prettier
83+ args :
84+ - --write
85+ - --list-different
86+ - --ignore-unknown
87+ types : [text]
88+ files : \.(css|htm|html|js|json|jsx|less|md|scss|toml|ts|xml|yaml|yml)$
89+ language : node
7290 additional_dependencies :
7391 - " prettier@2.7.1"
7492 - " @prettier/plugin-xml@2.2.0"
75- args :
76- - --plugin=@prettier/plugin-xml
77- files : \.(css|htm|html|js|json|jsx|less|md|scss|toml|ts|xml|yaml|yml)$
78- - repo : https://github.com/pre-commit/mirrors-eslint
79- rev : v8.24.0
93+ - repo : local
8094 hooks :
8195 - id : eslint
82- verbose : true
96+ name : eslint
97+ entry : eslint
8398 args :
8499 - --color
85100 - --fix
101+ verbose : true
102+ types : [javascript]
103+ language : node
104+ additional_dependencies :
105+ - " eslint@8.24.0"
106+ - " eslint-plugin-jsdoc@"
86107 - repo : https://github.com/pre-commit/pre-commit-hooks
87108 rev : v4.3.0
88109 hooks :
@@ -105,12 +126,35 @@ repos:
105126 - id : check-xml
106127 - id : mixed-line-ending
107128 args : ["--fix=lf"]
108- - repo : https://github.com/astral-sh/ruff-pre-commit
109- rev : v0.1.3
129+ - repo : https://github.com/asottile/pyupgrade
130+ rev : v2.38.2
131+ hooks :
132+ - id : pyupgrade
133+ args : ["--keep-percent-format"]
134+ - repo : https://github.com/PyCQA/isort
135+ rev : 5.12.0
136+ hooks :
137+ - id : isort
138+ name : isort except __init__.py
139+ args :
140+ - --settings=.
141+ exclude : /__init__\.py$
142+ - repo : https://github.com/acsone/setuptools-odoo
143+ rev : 3.1.8
144+ hooks :
145+ - id : setuptools-odoo-make-default
146+ - id : setuptools-odoo-get-requirements
147+ args :
148+ - --output
149+ - requirements.txt
150+ - --header
151+ - " # generated from manifests external_dependencies"
152+ - repo : https://github.com/PyCQA/flake8
153+ rev : 3.9.2
110154 hooks :
111- - id : ruff
112- args : [--fix, --exit-non-zero-on-fix]
113- - id : ruff-format
155+ - id : flake8
156+ name : flake8
157+ additional_dependencies : ["flake8-bugbear==21.9.2"]
114158 - repo : https://github.com/OCA/pylint-odoo
115159 rev : v8.0.19
116160 hooks :
0 commit comments