Not possible to use plugins? #16
Comments
Will this work use - repo: https://github.com/prettier/pre-commit
rev: main
hooks:
- id: prettier
additional_dependencies:
- prettier-plugin-svelte:1.4.1 |
Hi. I am having the same issue. When I try to install
My pre-commit config: - repo: https://github.com/prettier/pre-commit
rev: v2.1.2
hooks:
- id: prettier
name: prettier + plugin-xml
additional_dependencies:
- "@prettier/plugin-xml@0.12.0"
args:
- --plugin=@prettier/plugin-xm It works fine without the plugin. I am trying to migrate from https://github.com/prettier/prettier to https://github.com/prettier/pre-commit |
As in prettier#16 This frees args keywork, so that it can be used downstream in pre-commit hooks Fixes prettier#16
As in https://github.com/prettier/prettier/blob/master/.pre-commit-hooks.yaml#L3 This frees args keywork, so that it can be used downstream in pre-commit hooks Fixes prettier#16
This frees additional_dependencies keyword, so that it can be used downstream in pre-commit hooks Fixes prettier#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
This should be fixed with the PRs mentioned above. Seems like the problem was that, in https://github.com/prettier/pre-commit/blob/main/.pre-commit-hooks.yaml, hook is defining Moving them to separate definitions should work. In the meantime, another workaround is to copy the needed values: - 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 |
It's also possible to use plugins in config file {
"plugins": [
"@prettier/plugin-xml",
"path/to/your/plugin"
]
} |
I'm trying to use
prettier-plugin-svelte
, but I think it's detected from being installed rather than inpackage.json
(?) and so since there's no (good) way to put it in thepre-commit
environment, it isn't picked up?The text was updated successfully, but these errors were encountered: