Skip to content

Commit

Permalink
updated language for import/ignore setting (ref #103)
Browse files Browse the repository at this point in the history
  • Loading branch information
benmosher committed Dec 14, 2015
1 parent a128a89 commit ae9823d
Showing 1 changed file with 11 additions and 5 deletions.
16 changes: 11 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -341,18 +341,24 @@ You may set the following settings in your `.eslintrc`:
#### `import/ignore`

A list of regex strings that, if matched by a path, will
not parse the matching module. In practice, this means rules other than
`no-unresolved` will not report on the `import` in question.
not report the matching module if no `export`s are found.
In practice, this means rules other than `no-unresolved` will not report on any
`import`s with (absolute) paths matching this pattern, _unless_ `export`s were
found when parsing. This allows you to ignore `node_modules` but still properly
lint packages that define a [`jsnext:main`] in `package.json` (Redux, D3's v4 packages, etc.).

This will replace the default of `node_modules`, so you may need to include it in your own list. Example:
**Note**: setting this explicitly will replace the default of `node_modules`, so you
may need to include it in your own list if you still want to ignore it. Example:

```yaml
settings:
import/ignore:
- node_modules
- coffee$
- node_modules # mostly CommonJS (ignored by default)
- \.coffee$ # fraught with parse errors
```

[`jsnext:main`]: https://github.com/rollup/rollup/wiki/jsnext:main

#### `import/resolver`

See [resolver plugins](#resolver-plugins).
Expand Down

0 comments on commit ae9823d

Please sign in to comment.