Generate ESLint HTML report (!7374)
This commit is contained in:
parent
d6603493ea
commit
459cd939e7
3 changed files with 24 additions and 3 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -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
|
||||||
|
|
|
@ -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/
|
||||||
|
@ -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
|
||||||
|
@ -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
|
||||||
|
|
|
@ -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…
Reference in a new issue