eslint-html-reporter icon indicating copy to clipboard operation
eslint-html-reporter copied to clipboard

Suppress ignored files.

Open lbeier opened this issue 8 years ago • 5 comments

I'm wondering if there is a way to suppress and not show and count ignored files in the report.

I need to ignore multiple minified files and library folders and they are showing as warnings in our report, and it would be nice to see a cleaner report without theses ignored files.

Thanks in advance

lbeier avatar Mar 15 '16 14:03 lbeier

@tutabeier Hi! Sorry I turned off email notifications and I'm only seeing this now. Did you ignore the files with .eslintignore? If you ignore the files with .eslintignore they should not show up in the report.

ratherblue avatar Apr 06 '16 19:04 ratherblue

@tutabeier Just checking in to see if this fixed your issue.

ratherblue avatar Apr 12 '16 23:04 ratherblue

Hi @ratherblue,

No, still not.

This is my .eslintignore

bower_components/**
node_modules/**
scripts/libraries/**
scripts/datePicker/**
scripts/plugins/**
app/dist/**
**/*min.js

My Gruntfile.js:

eslint: {
  options: {
    configFile: ".eslintrc",
    format: require('eslint-html-reporter'),
    outputFile: "../../../target/reports/tests/js/eslint-report.html",
    fix: false
  },
  target: [
      "Gruntfile.js",
      "scripts/**/*.js",
      "app/**/*.js",
      "../../test/spec/**/*Spec.js",
      "../../test/e2e/**/*.spec.js",
      "../../test/angularSpecs/app/**/*Spec.js",
      "../../test/angularSpecs/app/**/*.spec.js"
  ]
}

I attached a screenshot of the generated report. As you can see, the *.min.js file are still showing up in the report. It's not a big problem, but I would prefer a cleaner report only with the warning and errors.

And, I might be wrong, but I think the ignored file are counting as warning alerts, which I would also prefer they don't count as warning in my report. eslintignore

Thanks!

lbeier avatar Apr 13 '16 16:04 lbeier

What version of eslint are you using? And I will look into fixing this. Thanks for the report!

ratherblue avatar Apr 13 '16 20:04 ratherblue

This a shortcoming of grunt-eslint, so it's not a bug. I will add this as an enhancement though.

ratherblue avatar Apr 13 '16 22:04 ratherblue