Commit ff56d4a8 authored by tom goriunov's avatar tom goriunov Committed by GitHub

Merge pull request #169 from blockscout/pre-commit-svg

add svg-formatin to pre-commit hook
parents 900bf7d9 b8c4a44e
#!/usr/bin/env sh #!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh" . "$(dirname -- "$0")/_/husky.sh"
npx lint-staged # lint js/ts files
\ No newline at end of file echo 🧿 Running file linter...
npx lint-staged
# format svg
echo 🧿 Running svg formatter...
for file in `git diff --diff-filter=ACMRT --cached --name-only | grep ".svg\$"`
do
echo "Formatting $file"
./node_modules/.bin/svgo -q $file
git add $file
done
echo ✅ All pre-commit jobs are done
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment