diff --git a/.githooks/pre-commit b/.githooks/pre-commit index 4fd4e4f5..9889db34 100755 --- a/.githooks/pre-commit +++ b/.githooks/pre-commit @@ -1,8 +1,10 @@ #!/bin/bash set -e; + +found=0 git diff --cached --name-only | grep -q '.js$' && found=1 if [ $found == 1 ]; then - make lint-js || exit 1 + npm --prefix client run lint || exit 1 npm run test --prefix client || exit 1 fi diff --git a/client/src/helpers/constants.js b/client/src/helpers/constants.js index 69450297..cae6f597 100644 --- a/client/src/helpers/constants.js +++ b/client/src/helpers/constants.js @@ -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]; +// Note that translation strings contain these modes (blocking_mode_CONSTANT) +// i.e. blocking_mode_default, blocking_mode_null_ip export const BLOCKING_MODES = { default: 'default', refused: 'refused',