-
-
Notifications
You must be signed in to change notification settings - Fork 10
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
Add pre-commit hook #57
Conversation
Odd π This seems like an weird approach to have to add support for tools to pre-commit to me... Anyway, if this is the only way to support it I'm happy to add it to the repo π Before I merge this tho, one question: did you add the entry: svglint -C # The `-C` flag is used due to https://github.com/birjj/svglint/issues/56 |
Yes. I've added the comment ππΌ
Can be supported with a mirror repository like https://github.com/pre-commit/mirrors-prettier but I would need to put my own user in the But that approach seems much more complicated as the maintainment is not hard. Feel free to ping me to if you receive a PR involving this file and I'll review it. |
Thanks!
I do believe that would be the better way to manage things (from pre-commit's perspective). Unfortunately, with only 23 repos in the org, it seems that's not the preferred way + given the relative unpopularity of this package, I don't think they'd even be inclined to accept it. Also, I agree that maintaining this shouldn't be too difficult, so I'll just merge this in and create a release π |
π This PR is included in version 2.1.1 π The release is available on: Your semantic-release bot π¦π |
Hi guys! βπΌ
I'm facing a situation where I need to use SVGLint outside of a Javascript project, so I'm using pre-commit to run linters. SVGLint does not have the file to define hooks, so added in this PR.
To use SVGLint as a pre-commit hook:
pip install pre-commit
pre-commit install
Note that the previous config will not work as the revision
v2.1.1
is not created yet, so this chage will require a new patch or minor version change in SVGLint. To test it, replace the keyrepo
byhttps://github.com/mondeja/svglint
andrev
bypre-commit-hook
(this branch) and run it withpre-commit run --all-files
. You'll probably need to initialize the CWD as a GIT repo and create an initial commit as well.All fields are documented at Creating new hooks in pre-commit.com. The key
minimum_pre_commit_version
is defined becausenode
has been added to pre-commit as a supported language in v1.5.0.