-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
import/no-extraneous-dependencies globs doesn't work on deeper folder tree (monorepo) #1302
Comments
Have you set the packageDir option? |
yup, same output
|
@Hotell your setup (with
So imports in Instead, remove const { join } = require('path');
module.exports = {
rules: {
'import/no-extraneous-dependencies': [
'error',
// Use package.json from both this package folder and root.
{ packageDir: [__dirname, join(__dirname, '../../')] }
]
}
}; This one says:
|
@Hotell can you try again with v2.20.0 and confirm if the problem still exists? |
Trouble with that is if In this setup it is satisfied by a dependency in any package in the monorepo, not the package where the dependency is used. |
This is correct - both how it should work, and how it works with node's resolution algorithm. Are you saying it's not working that way? Or that you want it to be "satisfied by a dependency in any package in the monorepo"? |
I realised aht I'm saying is just what ws said in #1302 (comment) Except I tried using |
I found good alternative using eslint |
Hi all But I've no news about the merge of it... You can try it from my branch if you want. |
Seems reasonable. Please file a new issue if the next release does not address any of these issues. |
Globs doesn't work on nested folders within monorepo. I'm getting lint errors within
foo.test.tsx
orfoo.story.tsx
Here is my project structure:
config:
.eslintrc.js:
The text was updated successfully, but these errors were encountered: