fix pre-commit hook

This commit is contained in:
Andrey Meshkov 2020-09-09 14:03:27 +03:00
parent 317e030554
commit 382cddea47
2 changed files with 5 additions and 1 deletions

View File

@ -1,8 +1,10 @@
#!/bin/bash #!/bin/bash
set -e; set -e;
found=0
git diff --cached --name-only | grep -q '.js$' && found=1 git diff --cached --name-only | grep -q '.js$' && found=1
if [ $found == 1 ]; then if [ $found == 1 ]; then
make lint-js || exit 1 npm --prefix client run lint || exit 1
npm run test --prefix client || exit 1 npm run test --prefix client || exit 1
fi fi

View File

@ -293,6 +293,8 @@ export const QUERY_LOG_INTERVALS_DAYS = [1, 7, 30, 90];
export const FILTERS_INTERVALS_HOURS = [0, 1, 12, 24, 72, 168]; export const FILTERS_INTERVALS_HOURS = [0, 1, 12, 24, 72, 168];
// Note that translation strings contain these modes (blocking_mode_CONSTANT)
// i.e. blocking_mode_default, blocking_mode_null_ip
export const BLOCKING_MODES = { export const BLOCKING_MODES = {
default: 'default', default: 'default',
refused: 'refused', refused: 'refused',