Closed joao-p-marques closed 4 years ago
This makes it not able to override args
, so I don't think it's good.
Before we do any changes, Please read discussions with the author of pre-commit
in https://github.com/prettier/pre-commit/issues/1#issuecomment-670962627
Can't we override the entry
keyword in a downstream hook?
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 (https://github.com/prettier/prettier/issues/9459, still we don't know why).
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 https://github.com/prettier/pre-commit/issues/16