diff options
-rw-r--r-- | .gitignore | 1 | ||||
-rw-r--r-- | .gitlab-ci.yml | 23 | ||||
-rw-r--r-- | package.json | 3 |
3 files changed, 24 insertions, 3 deletions
diff --git a/.gitignore b/.gitignore index 6a1002621f4..0b602d613c7 100644 --- a/.gitignore +++ b/.gitignore @@ -5,6 +5,7 @@ .chef .directory /.envrc +eslint-report.html /.gitlab_shell_secret .idea /.rbenv-version diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index ab45ea57aed..2b65bc4182b 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -349,7 +349,7 @@ coverage: - coverage/index.html - coverage/assets/ -lint-javascript: +lint:javascript: cache: paths: - node_modules/ @@ -358,7 +358,24 @@ lint-javascript: before_script: - npm install script: - - npm run eslint + - npm --silent run eslint + +lint:javascript:report: + cache: + paths: + - node_modules/ + stage: post-test + image: "node:7.1" + before_script: + - npm install + script: + - find app/ spec/ -name '*.js' -or -name '*.js.es6' -exec sed --in-place 's|/\* eslint-disable .*\*/||' {} \; # run report over all files + - npm --silent run eslint-report || true # ignore exit code + artifacts: + name: eslint-report + expire_in: 31d + paths: + - eslint-report.html # Trigger docs build # https://gitlab.com/gitlab-com/doc-gitlab-com/blob/master/README.md#deployment-process @@ -398,11 +415,13 @@ pages: dependencies: - coverage - teaspoon + - lint:javascript:report script: - mv public/ .public/ - mkdir public/ - mv coverage public/coverage-ruby - mv coverage-javascript/default/ public/coverage-javascript/ + - mv eslint-report.html public/ artifacts: paths: - public diff --git a/package.json b/package.json index 2a9fb808eef..93e23d63c36 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,8 @@ "private": true, "scripts": { "eslint": "eslint --ext .js,.js.es6 .", - "eslint-fix": "eslint --fix --ext .js,.js.es6 ." + "eslint-fix": "npm run eslint -- --fix", + "eslint-report": "npm run eslint -- --format html --output-file ./eslint-report.html" }, "devDependencies": { "eslint": "^3.1.1", |