📝 Edit page
➕ Add page
Ignore
The ESLint ignore config
This config is a plain text file, with glob patterns.
.eslintignore
Related
- ESLint ignore rule in a script - ignore a rule, rather than a path.
Resources
- Ignoring Files and Directories in the docs.
- Ignoring code - specifically the The .eslintignore File section.
Examples
From the docs:
.eslintignore
**/*.js
.eslintignore
# Ignore files compiled from TypeScript and CoffeeScript **/*.{ts,coffee}.js
.eslintignore
# Ignore built files except build/index.js build/ !build/index.js
Note that node_modules
is always ignored.
Logging ignored paths
When you pass directories to ESLint, files and directories are silently ignored.
If you pass a specific file to ESLint, then you will see a warning messaged log, indicating that the file was skipped.
Example file:
foo.js
When running:
$ eslint foo.js
The output message will tell your foo.js
was ignored and that you can use the --no-ignore
flag.