diff --git a/.eslintrc b/.eslintrc index 04661b89..eed28373 100644 --- a/.eslintrc +++ b/.eslintrc @@ -2,5 +2,11 @@ "env": { "mocha": true }, - "extends": "standard" + "extends": "standard", + "ignorePatterns": [ + ".github", + "bfx-report-ui", + "bfx-reports-framework", + "dist" + ] } diff --git a/scripts/build-ui.sh b/scripts/build-ui.sh index 7194f96d..c0a61bca 100755 --- a/scripts/build-ui.sh +++ b/scripts/build-ui.sh @@ -128,9 +128,12 @@ checkNodeModulesDir "$UI_FOLDER" npm ls --depth=0 --only=prod 1<&- echo -e "\n${COLOR_BLUE}UI building...${COLOR_NORMAL}" -mv -f "$ROOT/.eslintrc" "$ROOT/off-eslintrc" -npm run build -mv -f "$ROOT/off-eslintrc" "$ROOT/.eslintrc" +mv -f "$ROOT/.eslintrc" "$ROOT/off-eslintrc" || [[ $? == 1 ]] +npm run build || ( + echo -e "\n${COLOR_RED}The UI has not been built successful${COLOR_NORMAL}" >&2 && + exit 1 + ) +mv -f "$ROOT/off-eslintrc" "$ROOT/.eslintrc" || [[ $? == 1 ]] if ! [ -s "$UI_BUILD_FOLDER/index.html" ]; then echo -e "\n${COLOR_RED}The UI has not been built successful${COLOR_NORMAL}" >&2