Skip to content
Snippets Groups Projects
Commit 459cd939 authored by winniehell's avatar winniehell
Browse files

Generate ESLint HTML report (!7374)

parent d6603493
No related branches found
No related tags found
No related merge requests found
Loading
@@ -5,6 +5,7 @@
Loading
@@ -5,6 +5,7 @@
.chef .chef
.directory .directory
/.envrc /.envrc
eslint-report.html
/.gitlab_shell_secret /.gitlab_shell_secret
.idea .idea
/.rbenv-version /.rbenv-version
Loading
Loading
Loading
@@ -349,7 +349,7 @@ coverage:
Loading
@@ -349,7 +349,7 @@ coverage:
- coverage/index.html - coverage/index.html
- coverage/assets/ - coverage/assets/
   
lint-javascript: lint:javascript:
cache: cache:
paths: paths:
- node_modules/ - node_modules/
Loading
@@ -358,7 +358,24 @@ lint-javascript:
Loading
@@ -358,7 +358,24 @@ lint-javascript:
before_script: before_script:
- npm install - npm install
script: 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 # Trigger docs build
# https://gitlab.com/gitlab-com/doc-gitlab-com/blob/master/README.md#deployment-process # https://gitlab.com/gitlab-com/doc-gitlab-com/blob/master/README.md#deployment-process
Loading
@@ -398,11 +415,13 @@ pages:
Loading
@@ -398,11 +415,13 @@ pages:
dependencies: dependencies:
- coverage - coverage
- teaspoon - teaspoon
- lint:javascript:report
script: script:
- mv public/ .public/ - mv public/ .public/
- mkdir public/ - mkdir public/
- mv coverage public/coverage-ruby - mv coverage public/coverage-ruby
- mv coverage-javascript/default/ public/coverage-javascript/ - mv coverage-javascript/default/ public/coverage-javascript/
- mv eslint-report.html public/
artifacts: artifacts:
paths: paths:
- public - public
Loading
Loading
Loading
@@ -2,7 +2,8 @@
Loading
@@ -2,7 +2,8 @@
"private": true, "private": true,
"scripts": { "scripts": {
"eslint": "eslint --ext .js,.js.es6 .", "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": { "devDependencies": {
"eslint": "^3.1.1", "eslint": "^3.1.1",
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment