Search code examples
eslint

Disable eslint for all files in directory and subdirectories


I have some files that are in a certain folder and those files are from a vendor so I cannot control them. I would like to disable eslint for all the files in that directory and all subfolders.


Solution

  • You can add a .eslintignore in project root directory, and use it the same as .gitignore, .npmignore, etc..

    When it comes to ignoring multiple files at the same time, we can use **.

    For example: src/** means ignore all files in [root]/src.

    Note that .eslintignore files are deprecated in newer versions of eslint.