Skip to content

Commit 34fc393

Browse files
committed
chore: migrate lint config to OCA Odoo 19 template
- Migrate eslint to v9.35.0 with flat config (eslint.config.cjs) - Migrate prettier to v3.6.2 with config file (prettier.config.cjs) - Upgrade ruff to v0.13.0 - Upgrade pylint_odoo to v9.3.15 - Upgrade pre-commit-hooks to v6.0.0 - Remove fix-encoding-pragma hook (not needed for Python 3.12) - Remove legacy .eslintrc.yml and .prettierrc.yml - Add OpenSPP-specific globals (maptilersdk, turf, L) to eslint - Keep OpenSPP customizations: line-length=120, max-complexity=25
1 parent 94c4060 commit 34fc393

File tree

6 files changed

+242
-208
lines changed

6 files changed

+242
-208
lines changed

.eslintrc.yml

Lines changed: 0 additions & 189 deletions
This file was deleted.

.pre-commit-config.yaml

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -83,8 +83,8 @@ repos:
8383
files: \.(css|htm|html|js|json|jsx|less|md|scss|toml|ts|xml|yaml|yml)$
8484
language: node
8585
additional_dependencies:
86-
- "prettier@3.3.3"
87-
- "@prettier/plugin-xml@3.4.1"
86+
- "prettier@3.6.2"
87+
- "@prettier/plugin-xml@3.4.2"
8888
- repo: local
8989
hooks:
9090
- id: eslint
@@ -97,10 +97,11 @@ repos:
9797
types: [javascript]
9898
language: node
9999
additional_dependencies:
100-
- "eslint@8.57.0"
101-
- "eslint-plugin-jsdoc@50.3.1"
100+
- "eslint@9.35.0"
101+
- "eslint-plugin-jsdoc@57.0.8"
102+
- "globals@16.0.0"
102103
- repo: https://github.com/pre-commit/pre-commit-hooks
103-
rev: v4.6.0
104+
rev: v6.0.0
104105
hooks:
105106
- id: trailing-whitespace
106107
# exclude autogenerated files
@@ -109,8 +110,6 @@ repos:
109110
# exclude autogenerated files
110111
exclude: /README\.rst$|\.pot?$
111112
- id: debug-statements
112-
- id: fix-encoding-pragma
113-
args: ["--remove"]
114113
- id: check-case-conflict
115114
- id: check-docstring-first
116115
- id: check-executables-have-shebangs
@@ -122,13 +121,13 @@ repos:
122121
- id: mixed-line-ending
123122
args: ["--fix=lf"]
124123
- repo: https://github.com/astral-sh/ruff-pre-commit
125-
rev: v0.6.8
124+
rev: v0.13.0
126125
hooks:
127126
- id: ruff
128127
args: [--fix, --exit-non-zero-on-fix]
129128
- id: ruff-format
130129
- repo: https://github.com/OCA/pylint-odoo
131-
rev: v9.1.3
130+
rev: v9.3.15
132131
hooks:
133132
- id: pylint_odoo
134133
name: pylint with optional checks

.prettierrc.yml

Lines changed: 0 additions & 8 deletions
This file was deleted.

.ruff.toml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
21
target-version = "py312"
32
fix = true
43
line-length = 120
@@ -7,7 +6,7 @@ line-length = 120
76
extend-select = [
87
"B",
98
"C90",
10-
"E501", # line too long (default 88)
9+
"E501", # line too long
1110
"I", # isort
1211
"UP", # pyupgrade
1312
]

0 commit comments

Comments
 (0)