Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

how to silence warnings about ignored files in eslint

Tags:

eslint

After setting up eslint and adding some files in the ignore list, every time that eslint is run it produces warnings about files that are ignored:

 /path/to/file/name.min.js   0:0  warning  File ignored because of a matching ignore pattern. Use "--no-ignore" to override 

How can this warning be silenced?

like image 253
SimonW Avatar asked Jun 20 '16 16:06

SimonW


People also ask

How do I ignore warning on ESLint?

Ignore multiple files or folders To turn off ESLint in the whole file, you can add /* eslint-disable */ in the first line of that file. Alternatively, you can create a file . eslintignore in the root catalog.

How do I tell ESLint to ignore a folder?

To ignore some folder from eslint rules we could create the file . eslintignore in root directory and add there the path to the folder we want omit (the same way as for . gitignore ). Excerpt from the ESLint documentation "In addition to any patterns in a .


1 Answers

One workaround I know at the moment is --quiet option, which suppresses all warnings. Of course that doesn't make sense if you have "warn" rules in your config.

Another way not to show that warning is to use dir names: eslint src instead of globbing patterns: eslint src/*.

like image 191
tibalt Avatar answered Sep 24 '22 02:09

tibalt