Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
no-extraneous-dependencies includes only paths that can be resolved,
as only resolved paths can be reliably tested if they live in a `node_modules` folder. Up until now, this rule assumed, that every package that lives in a `node_modules` folder or *cannot be resolved* is an external package. This happens because of [that line](https://github.com/benmosher/eslint-plugin-import/blob/master/src/core/importType.js#L32). If project uses aliasing, or transforms imports, this assumption is wrong, as they may not be resolvable by import plugin, but also, they should not be defined in package.json. Changing `isExternalPath` will make any ordering lints unstable (order may change depending if you ran `npm install` or not). Using `import/ignore` setting does not make sense too, as it's used to ignore imports unknown to the plugin, like .css files. But still, you may import a css file from a dependency, and this rule should check that.
- Loading branch information
Showing
8 changed files
with
14 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
Empty file.
Empty file.
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters