Skip to content

Commit

Permalink
Merge pull request #45 from acsone/upgrade-js-linters
Browse files Browse the repository at this point in the history
Modernize js linters
  • Loading branch information
sbidoul authored Oct 24, 2024
2 parents 7912645 + 92e6e20 commit eeb3533
Show file tree
Hide file tree
Showing 5 changed files with 230 additions and 190 deletions.
2 changes: 2 additions & 0 deletions copier.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ _envops:
keep_trailing_newline: true
variable_end_string: "}}"
variable_start_string: "{{"
_tasks:
- rm .eslintrs.yml

project_name:
type: str
Expand Down
181 changes: 0 additions & 181 deletions src/.eslintrc.yml

This file was deleted.

33 changes: 24 additions & 9 deletions src/.pre-commit-config.yaml.jinja
Original file line number Diff line number Diff line change
Expand Up @@ -3,35 +3,50 @@ exclude: |
.pot$|
.po$|
^.gitlab|
^[^/]*\.config\.cjs|
# NOT INSTALLABLE ADDONS
# END NOT INSTALLABLE ADDONS
^LICENCE
default_language_version:
python: python{{ python_version }}
node: "16.17.0"
node: "22.9.0"
minimum_pre_commit_version: "4"
repos:
- repo: https://github.com/oca/maintainer-tools
rev: a24deac77aff2f3c968b3b4c269d6aec91a379da
hooks:
# update the NOT INSTALLABLE ADDONS section above
- id: oca-update-pre-commit-excluded-addons
args: [--addons-dir=odoo/addons]
- repo: https://github.com/pre-commit/mirrors-prettier
rev: v3.0.3
- repo: local
hooks:
- id: prettier
name: prettier + plugin-xml
name: prettier (with plugin-xml)
entry: prettier
args:
- --write
- --list-different
- --ignore-unknown
types: [text]
files: \.(css|htm|html|js|json|jsx|less|md|scss|toml|ts|xml|yaml|yml)$
language: node
additional_dependencies:
- "[email protected]"
- "@prettier/[email protected]"
- repo: https://github.com/pre-commit/mirrors-eslint
rev: v8.34.0
- "[email protected]"
- "@prettier/[email protected]"
- repo: local
hooks:
- id: eslint
verbose: true
name: eslint
entry: eslint
args:
- --color
- --fix
verbose: true
types: [javascript]
language: node
additional_dependencies:
- "[email protected]"
- "[email protected]"
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
hooks:
Expand Down
Loading

0 comments on commit eeb3533

Please sign in to comment.