Skip to content
This repository has been archived by the owner on Nov 16, 2020. It is now read-only.

Move cmd args to entry key #17

Merged
merged 1 commit into from
Oct 27, 2020

Conversation

joao-p-marques
Copy link

@joao-p-marques joao-p-marques commented Oct 21, 2020

As in https://github.com/prettier/prettier/blob/master/.pre-commit-hooks.yaml#L3

This frees args keyword, so that it can be used downstream in pre-commit
hooks

Fixes #16

As in https://github.com/prettier/prettier/blob/master/.pre-commit-hooks.yaml#L3

This frees args keyword, so that it can be used downstream in pre-commit
hooks

Fixes prettier#16
@fisker
Copy link
Member

fisker commented Oct 21, 2020

This makes it not able to override args, so I don't think it's good.

@fisker
Copy link
Member

fisker commented Oct 21, 2020

Before we do any changes, Please read discussions with the author of pre-commit in #1 (comment)

@joao-p-marques
Copy link
Author

Can't we override the entry keyword in a downstream hook?

@yajo
Copy link

yajo commented Oct 21, 2020

Without this patch (and #18 or whatever works for it), to enable the XML plugin you need:

  - repo: https://github.com/prettier/pre-commit
    rev: v2.1.2
    hooks:
      - id: prettier
        name: prettier + plugin-xml
        additional_dependencies:
          - prettier@2.1.2
          - "@prettier/plugin-xml@0.12.0"
        args:
          - --write
          - --list-different
          - --ignore-unknown
          - --plugin=@prettier/plugin-xml

While before it was:

  - repo: https://github.com/prettier/prettier
    rev: 2.1.2
    hooks:
      - id: prettier
        name: prettier + plugin-xml
        additional_dependencies:
          - "@prettier/plugin-xml@0.12.0"
        args:
          - --plugin=@prettier/plugin-xml

Clearly much better. Sadly that's broken since today (prettier/prettier#9459, still we don't know why).

yajo pushed a commit to Tecnativa/doodba-copier-template that referenced this pull request Oct 23, 2020
This seems to be a better fix (for now) than #149 because it just fixes the npm 7 installation problem without having to worry about prettier/pre-commit#17 or prettier/pre-commit#18 for the moment.

Once those are solved, we can start using the new repo.
yajo pushed a commit to Tecnativa/doodba-copier-template that referenced this pull request Oct 23, 2020
This seems to be a better fix (for now) than #149 because it just fixes the npm 7 installation problem without having to worry about prettier/pre-commit#17 or prettier/pre-commit#18 for the moment.

Once those are solved, we can start using the new repo.

Updated prettier BTW.
github-actions bot pushed a commit to Tecnativa/doodba-copier-template that referenced this pull request Oct 23, 2020
This seems to be a better fix (for now) than #149 because it just fixes the npm 7 installation problem without having to worry about prettier/pre-commit#17 or prettier/pre-commit#18 for the moment.

Once those are solved, we can start using the new repo.

Updated prettier BTW.
@fisker fisker merged commit e5a0258 into prettier:v2.1.2 Oct 27, 2020
fisker added a commit that referenced this pull request Oct 27, 2020
@yajo yajo deleted the fix-hooks-entry-definition branch October 27, 2020 16:49
joao-p-marques added a commit to Tecnativa/doodba-copier-template that referenced this pull request Nov 5, 2020
* Revert "Pin nodejs versions for pre-commit"
  This reverts commit 955f6dd.

* Re-apply "Migrate prettier from prettier/prettier to prettier/pre-commit"
  This reverts commit 1f85193.

* Improve prettier pre-commit configuration
  After prettier/pre-commit#17 was fixed
joao-p-marques added a commit to Tecnativa/doodba-copier-template that referenced this pull request Nov 5, 2020
* Revert "Pin nodejs versions for pre-commit"
  This reverts commit 955f6dd.

* Re-apply "Migrate prettier from prettier/prettier to prettier/pre-commit"
  This reverts commit 1f85193.

* Improve prettier pre-commit configuration
  After prettier/pre-commit#17 was fixed

* Update to v2.1.2 in template config
joao-p-marques added a commit to Tecnativa/doodba-copier-template that referenced this pull request Nov 5, 2020
* Revert "Pin nodejs versions for pre-commit"
  This reverts commit 955f6dd.

* Re-apply "Migrate prettier from prettier/prettier to prettier/pre-commit"
  This reverts commit 1f85193.

* Improve prettier pre-commit configuration
  After prettier/pre-commit#17 was fixed

* Update to v2.1.2 in template config
joao-p-marques added a commit to Tecnativa/doodba-copier-template that referenced this pull request Nov 5, 2020
* Revert "Pin nodejs versions for pre-commit"
  This reverts commit 955f6dd.

* Re-apply "Migrate prettier from prettier/prettier to prettier/pre-commit"
  This reverts commit 1f85193.

* Improve prettier pre-commit configuration
  After prettier/pre-commit#17 was fixed

* Update to v2.1.2 in template config
yajo added a commit to Tecnativa/doodba-copier-template that referenced this pull request Nov 5, 2020
* Migrate from prettier/prettier to prettier/pre-commit

* Revert "Pin nodejs versions for pre-commit"
  This reverts commit 955f6dd.

* Re-apply "Migrate prettier from prettier/prettier to prettier/pre-commit"
  This reverts commit 1f85193.

* Improve prettier pre-commit configuration
  After prettier/pre-commit#17 was fixed

* Update to v2.1.2 in template config

* Update .pre-commit-config.yaml.jinja

Co-authored-by: Jairo Llopis <Yajo@users.noreply.github.com>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants