import/no-extraneous-dependencies not working on windows
See original GitHub issueWhat I am doing:
Lint file with import/no-extraneous-dependencies
enabled and which importing debug
module, that is not presented in package.json
dependencies
Expected behavior: The error should be displayed
Actual behavior: Linting finish successfully
OS: Windows 10 x64 1809
Investigation
Find problem in function importTypes -> isSubpath
. It not treating module as external because of working only with forward slashes as path separators. Looks like normalization for paths is needed.
Issue Analytics
- State:
- Created 3 years ago
- Comments:7 (3 by maintainers)
Top Results From Across the Web
Why (and How Can I FIx) ESLint import/no-extraneous ...
I solved it simply by setting devDependencies to true. ... Then to fix this issue you should add "plugins": ["import"] in your .eslintrc ......
Read more >[import/no-extraneous-dependencies] Problems when only ...
We've started to see failures when moving from 2.18.2 to 2.20.0 regarding importing only types from devDependencies in TypeScript source ...
Read more >eslint/eslint - Gitter
If you work on a team, see if anyone else is having the same problem. Kamran Tahir ... Run 'npm i -S assert'...
Read more >eslint-plugin-import - npm
Start using eslint-plugin-import in your project by running `npm i ... Forbid the use of extraneous packages ( no-extraneous-dependencies ) ...
Read more >[note] ESLint | PJCHENder 未整理筆記
npx eslint --init # To check syntax, find problems, and enforce ... 這個錯誤,可以在 rules 的地方針對 'import/no-extraneous-dependencies' 的 ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
This is fixed here https://github.com/benmosher/eslint-plugin-import/commit/47f912e74eccbb6009ea5778a7cdb33e918dd495. Tests for
no-extraneous-dependencies
are passing on windows now.A PR with a failing test case on windows would be great; then i can validate when it’s fixed.