Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Migrate prettier/prettier to prettier/pre-commit #33

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 2 additions & 2 deletions .pre-commit-config.yaml
Expand Up @@ -3,8 +3,8 @@ repos:
rev: 19.10b0
hooks:
- id: black
- repo: https://github.com/prettier/prettier
rev: "1.19.1"
- repo: https://github.com/prettier/pre-commit
rev: "v1.19.1"
hooks:
- id: prettier
- repo: https://github.com/pre-commit/pre-commit-hooks
Expand Down
8 changes: 6 additions & 2 deletions .pre-commit-config.yaml.jinja
Expand Up @@ -9,7 +9,7 @@
{%- set repo_rev.flake8_bugbear = "20.1.4" %}
{%- set repo_rev.isort = "5.5.1" %}
{%- set repo_rev.pre_commit_hooks = "v3.2.0" %}
{%- set repo_rev.prettier = "2.1.2" %}
{%- set repo_rev.prettier = "v2.1.2" %}
{%- set repo_rev.prettier_xml = "0.12.0" %}
{#- HACK https://github.com/OCA/pylint-odoo/issues/296#issuecomment-700317722 #}
{%- set repo_rev.pylint = "pylint-2.5.3" %}
Expand Down Expand Up @@ -67,14 +67,18 @@ repos:
rev: {{ repo_rev.black }}
hooks:
- id: black
- repo: https://github.com/prettier/prettier
- repo: https://github.com/prettier/pre-commit
rev: {{ repo_rev.prettier }}
hooks:
- id: prettier
name: prettier + plugin-xml
additional_dependencies:
- prettier@2.1.2
- "@prettier/plugin-xml@{{ repo_rev.prettier_xml }}"
args:
- --write
- --list-different
- --ignore-unknown
Comment on lines -70 to +81
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The problem here is that we don't know what will be the outcome of prettier/pre-commit#18 and prettier/pre-commit#17, so maybe it's better to stick to just changing language version and let these things evolve a bit before we do this change.

- --plugin=@prettier/plugin-xml
- repo: https://github.com/pre-commit/mirrors-eslint
rev: {{ repo_rev.eslint }}
Expand Down