eslint-plugin-import
eslint-plugin-import copied to clipboard
`import/no-extraneous-dependencies` more compatible when user pass not exist paths
Scenario:
'import/no-extraneous-dependencies': [
'error',
{
packageDir: [
__dirname,
'node_modules/module-exist',
'node_modules/module-not-exist',
],
},
]
If there is a module module-not-exist that's not installed in node_modules. Even if module-exist did add some dependencies. The lint won't apply dependencies in module-exist.
I think this rule can be more compatible. If packageContent have add some dependencies. These dependencies should be applied.
Like our team is maintaining a shared .eslintrc file and some dependencies is not required in particular projects. We hope that users don't need to change the .eslintrc file when they add a new dependency.
I'm not sure what you're asking. What do you expect to happen, and what's happening now?
@ljharb You can view this PR https://github.com/benmosher/eslint-plugin-import/pull/1954