Skip to content
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

React native absolute path imports #626

Closed
willlma opened this issue Oct 15, 2016 · 4 comments
Closed

React native absolute path imports #626

willlma opened this issue Oct 15, 2016 · 4 comments
Labels

Comments

@willlma
Copy link

willlma commented Oct 15, 2016

Having the same issue as this Stackoverflow Question

in my React Native app, within my package.json I've set the name to rpms. This allows me to do:

import Component from 'rpms/App/common/Component'

[…] eslint-plugin-import raises […] import/no-unresolved.

@sindresorhus
Copy link

You need to create a resolver for React Native.

maraujop added a commit to maraujop/eslint-plugin-import that referenced this issue Oct 24, 2016
maraujop added a commit to maraujop/eslint-plugin-import that referenced this issue Oct 24, 2016
@guzart
Copy link

guzart commented Oct 28, 2016

Just publish a package that piggy backs on eslint-import-resolver-node, hope this helps

https://www.npmjs.com/package/eslint-import-resolver-reactnative

@benmosher
Copy link
Member

oo, thanks @guzart!

@Gapur
Copy link

Gapur commented Aug 23, 2019

You can use absolute paths like in this article

https://medium.com/better-programming/using-absolute-paths-in-react-native-3be369244fb1

I hope you found this piece useful.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

No branches or pull requests

5 participants