-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Closed
Description
I just stumbled across lint-staged, which allows you to run (if I'm reading it correctly) any linter on staged files in a pre-commit hook. In other words, if you did this:
perl -pi -e 's/font-size: 12px;/font-size: \$font-size-small;/' **/*.scss
git commit -am 'use $font-size-small instead of 12px'Then we'd run stylelint on only the staged files, and if any errors were found the commit would be aborted. ✨
We'd either need to offer instructions for adding the relevant commit hook or add husky to our dev dependencies.