Browse Source

Add ESLint/Prettier and stylelint to git hooks

merge-requests/70/head
Deimos 6 years ago
parent
commit
5ea8b3a1bd
  1. 4
      git_hooks/pre-commit
  2. 4
      git_hooks/pre-push

4
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"

4
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"
Loading…
Cancel
Save