Why is eslint-plugin-import configured to ignore node_modules?
- Dominant language
- JavaScript
- Stars
- 148k
- Forks
- 26.6k
- PR merge metrics
- No merged PRs in 30d
Description
In [eslint-config-airbnb-base/rules/imports.js](https://github.com/airbnb/javascript/blob/master/packages/eslint-config-airbnb-base/rules/imports.js#L26), `import/ignore` is set to ignore `node_modules` and a number of non-js files (coffee, css, etc.)
Ignoring `node_modules` means that none of the lint analysis can happen against external libraries. In particular, I care about `import/named` flagging things like
```
import { badBadBad } from 'redux';
```
What's the rationale for this change? We can already use eslint's native ignore functionality to avoid linting all of node_modules, right?
Contributor guide
No contributing guide indexed for this repository
Research direction
Start with packages/eslint-config-airbnb-base/rules/imports.js at the import/ignore configuration, then review how eslint-plugin-import handles node_modules and non-JavaScript files. Reproduce the reported import/named example with redux and determine whether the existing ignore rules have a documented rationale; done means the rationale or resulting configuration decision is recorded.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- eslint, javascript
- Domain
- tooling
- Issue type
- Documentation
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100