Tbpgr Blog

Employee Experience Engineer tbpgr(てぃーびー) のブログ

Circle CIでESLintを実行し、結果をHTMLとしてBuild artifactsに保存する

alt

Circle CIでESLintを実行し、結果をHTMLとしてBuild artifactsに保存します

HTMLレポート機能

ESLintはHTMLレポート機能を備えていないため、
eslint-html-reporter package を利用します。

#
"devDependencies": {
  "eslint": "^3.7.1",
  "eslint-html-reporter": "^0.5.2"
}
#

サンプル

circle.yml

general:
  artifacts:
    - tmp/report.html
test:
  pre:
    - npm run lint -- -f node_modules/eslint-html-reporter/reporter.js -o tmp/report.html

結果

  • Artifacts

f:id:tbpg:20161013225145p:plain

  • レポート

report.html のリンクをクリックして結果レポートを開きます

f:id:tbpg:20161013225151p:plain

関連資料