-
-
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
no-extraneous-dependencies should not complain when importing file from project name #541
Comments
I think you may be able to solve this with the following resolver config: // MyProject/.eslintrc.json
{
"settings": {
"import/resolver": {
"node": { "paths": [ ".." ] }
}
}
} or, failing that: // MyProject/.eslintrc.js
exports.settings = {
"import/resolver": {
"node": { "paths": [ path.join(__dirname, "..") ] }
}
} Notably, I'm assuming your |
If the first way works, let me know and I'll update config/react-native.js. Or if I can make the assumption that ESLint will be run from the project folder, could do |
psst: added to import/order internal milestone to remember the react-native resolver when implementing the resolver-chooses-import-type API (#479) |
Hi,
I have a React-native project named "MyProject".
When I import a file from
'MyProject/src/store'
(which is valid with react-native, which is the way to load something from the root of the project), it complains.I think it should detect that's the name of the current project, which is valid, and shouldn't throw an error.
The text was updated successfully, but these errors were encountered: