Pre-commit hook for Styleint
This is the Stylelint hook for pre-commit. This prevents git commits unless the checks pass.
Using styleint with pre-commit
- To use this you first need to install pre-commit(see links below).
- Then create a pre-commit config file and also a stylelint config file in the root of your project.
pre-commit installfrom the root of your project
Finally add this to your
- repo: https://github.com/awebdeveloper/pre-commit-stylelint sha: '' # Use the sha or tag you want to point at like 0.0.1 hooks: - id: stylelint additional_dependencies: ['firstname.lastname@example.org', 'email@example.com']
Now everytime you commit a scss/css file. It will run stylelint on this and prevent commit if the checks fail.