From 44d8e01330362770bf69af353789f781e71f361d Mon Sep 17 00:00:00 2001 From: Lucas Gravley <29484535+admiralAwkbar@users.noreply.github.com> Date: Thu, 7 Nov 2019 10:27:14 -0600 Subject: [PATCH 1/2] fixed it up --- .github/linters/.eslintrc.yml | 1 - Dockerfile | 19 ++++++++++++++++--- TEMPLATES/.eslintrc.yml | 1 - lib/linter.sh | 2 +- 4 files changed, 17 insertions(+), 6 deletions(-) diff --git a/.github/linters/.eslintrc.yml b/.github/linters/.eslintrc.yml index 0a69ae74..a8c4c5df 100644 --- a/.github/linters/.eslintrc.yml +++ b/.github/linters/.eslintrc.yml @@ -26,7 +26,6 @@ globals: parser: '@typescript-eslint/parser' parserOptions: ecmaVersion: 2018 - sourceType: module ########### # Plugins # diff --git a/Dockerfile b/Dockerfile index a3d752cd..d1040d4e 100644 --- a/Dockerfile +++ b/Dockerfile @@ -31,17 +31,29 @@ RUN apk add --no-cache \ ##################### # Run Pip3 Installs # ##################### -RUN pip3 install --upgrade --no-cache-dir \ +RUN pip3 --no-cache-dir install --upgrade --no-cache-dir \ yamllint pylint #################### # Run NPM Installs # #################### -RUN npm -g install \ +RUN npm -g --no-cache install \ markdownlint-cli \ jsonlint prettyjson \ coffeelint \ - typescript eslint standard \ + typescript eslint \ + standard \ + babel-eslint \ + @typescript-eslint/eslint-plugin \ + @typescript-eslint/parser \ + && npm --no-cache install \ + markdownlint-cli \ + jsonlint prettyjson \ + coffeelint \ + typescript eslint \ + standard \ + babel-eslint \ + @typescript-eslint/eslint-plugin \ @typescript-eslint/parser #################### @@ -86,6 +98,7 @@ COPY TEMPLATES /action/lib/.automation ###################### # Set the entrypoint # ###################### +#RUN find / -name node_modules ENTRYPOINT ["/action/lib/linter.sh"] #CMD tail -f /dev/null diff --git a/TEMPLATES/.eslintrc.yml b/TEMPLATES/.eslintrc.yml index 0a69ae74..a8c4c5df 100644 --- a/TEMPLATES/.eslintrc.yml +++ b/TEMPLATES/.eslintrc.yml @@ -26,7 +26,6 @@ globals: parser: '@typescript-eslint/parser' parserOptions: ecmaVersion: 2018 - sourceType: module ########### # Plugins # diff --git a/lib/linter.sh b/lib/linter.sh index 8e1fc425..cd1c318d 100755 --- a/lib/linter.sh +++ b/lib/linter.sh @@ -1493,7 +1493,7 @@ Eslint() ################################ # Lint the file with the rules # ################################ - LINT_CMD=$(cd "$GITHUB_WORKSPACE" || exit; eslint -c "$JAVASCRIPT_LINTER_RULES" "$FILE" 2>&1) + LINT_CMD=$(eslint -c "$JAVASCRIPT_LINTER_RULES" "$FILE" 2>&1) ####################### # Load the error code # From c4e507b0879eed96ef6f7988036c6eabd669ad7e Mon Sep 17 00:00:00 2001 From: Lucas Gravley <29484535+admiralAwkbar@users.noreply.github.com> Date: Thu, 7 Nov 2019 10:28:28 -0600 Subject: [PATCH 2/2] link --- Dockerfile | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Dockerfile b/Dockerfile index d1040d4e..452f4ff0 100644 --- a/Dockerfile +++ b/Dockerfile @@ -56,6 +56,8 @@ RUN npm -g --no-cache install \ @typescript-eslint/eslint-plugin \ @typescript-eslint/parser + # I think we could fix this with path but not sure the language... + # https://github.com/nodejs/docker-node/blob/master/docs/BestPractices.md #################### # Run GEM installs # ####################