Add pre-commit documentation to docs
valentincalomme opened this issue · 2 comments
Hi! Love the package. I wanted to add it to my pre-commit hooks but realized there wasn't explicit documentation in the docs.
It would be nice to have a small section explaining how to add it to your hooks and use it with specific settings and parameters.
Happy to help contribute to that.
Thank you!
I also use Import Linter with pre-commit. To be honest I'm not sure what specific instructions would be needed beyond whatever is documented in pre-commit, along with the running the linter section. Do you want to suggest some wording so I've got more of an idea what you're looking for?
I don't think it needs much info indeed, but something like this could be added to the README.md
or at the end of the running the linter section:
`import-linter` can also be used as a `pre-commit` hook. To do so, simply add this section to your `.pre-commit-config.yaml` file:
- repo: https://github.com/seddonym/import-linter/
rev: "v2.0"
hooks:
- id: import-linter
# any arguments from `lint-imports` can be added here
args: ["--verbose"]
For the part with the args, I am not entirely certain it works.