From 5ea8b3a1bd444f570a5fba26f7c32ffee30f36fa Mon Sep 17 00:00:00 2001 From: Deimos Date: Mon, 3 Jun 2019 18:25:13 -0600 Subject: [PATCH] Add ESLint/Prettier and stylelint to git hooks --- git_hooks/pre-commit | 4 +++- git_hooks/pre-push | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/git_hooks/pre-commit b/git_hooks/pre-commit index 5f6c465..74fded4 100755 --- a/git_hooks/pre-commit +++ b/git_hooks/pre-commit @@ -5,4 +5,6 @@ vagrant ssh -c ". activate \ && echo 'Checking mypy type annotations...' && mypy . \ && echo 'Checking if Black would reformat any code...' && black --check . \ - && echo -n 'Running tests: ' && pytest -q" + && echo -n 'Running tests: ' && pytest -q \ + && echo 'Checking SCSS style...' && npm run --silent lint:scss \ + && echo 'Checking JS style...' && npm run --silent lint:js" diff --git a/git_hooks/pre-push b/git_hooks/pre-push index 76c9051..261bcfc 100755 --- a/git_hooks/pre-push +++ b/git_hooks/pre-push @@ -6,4 +6,6 @@ vagrant ssh -c ". activate \ && echo 'Checking mypy type annotations...' && mypy . \ && echo 'Checking if Black would reformat any code...' && black --check . \ && echo -n 'Running tests: ' && pytest -q \ - && echo 'Checking code style fully (takes a while)...' && prospector -M" + && echo 'Checking SCSS style...' && npm run --silent lint:scss \ + && echo 'Checking JS style...' && npm run --silent lint:js \ + && echo 'Checking Python style fully (takes a while)...' && prospector -M"