The `imports` in tests for the rule `import/no-extraneous-dependencies`
See original GitHub issueSome of the dependencies in test code are in devDependencies
. When I lint the test code, some errors appear:
1:1 error 'chai' should be listed in the project's dependencies, not devDependencies import/no-extraneous-dependencies
This error is unexpected.
Issue Analytics
- State:
- Created 7 years ago
- Comments:10 (2 by maintainers)
Top Results From Across the Web
Eslint allow extraneous dependencies in tests - Stack Overflow
Why am I getting "Definition for rule 'import/no-extraneous-dependencies' was not found" when running ESLint? 1 · ESLint configuration in .
Read more >node_modules/eslint-plugin-import/docs/rules/no-extraneous ...
import/no-extraneous-dependencies: Forbid the use of extraneous packages. Forbid the import of external modules that are not declared in the ...
Read more >A Guide to ESLint | Laurie on Tech
ESLint allows you to set project-level rules using an .eslintrc file. ... ESLint has a rule called import/no-extraneous-dependencies .
Read more >eslint-config-airbnb-base | Yarn - Package Manager
[minor] add new disabled rules, update eslint · [minor] enable import/no-useless-path-segments for commonjs (#2113) · [fix] whitespace : only set erroring rules ......
Read more >Import Regulations - International Trade Administration
Almost all countries require documentation for imported products and have ... In many cases, U.S. exporters will face additional regulations, testing, ...
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
@Alex1990 the default is for the entire project, which is to only allow dependencies. The proper solution is to make a
.eslintrc
in your “test” folder, that overrides the rule to allow devDependencies also.Yes, take a look at who filed the issue requesting it :-p https://github.com/benmosher/eslint-plugin-import/issues/470
This will be released as an update soon.