Absolute paths with reactive eslint errors

in my React Native application, in my package.json I set the name rpms . This allows me to:

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

A thread handles this type of import well, however, eslint-plugin-import raises the value of import/no-extraneous-dependencies and import/no-unresolved . I added to my rules:

 "import/no-unresolved": [2, { "ignore": ["rpms"] }], 

And so I turn off import/no-unresolved . To disable another I tried with:

 "settings": { "import/ignore": ["rpms"] }, 

However, it does not work. However, I have the feeling that perhaps ignoring these errors is the wrong way.

+5
source share
1 answer

Published a package to solve this problem.

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

Let me know how this happens.

+1
source

Source: https://habr.com/ru/post/1258156/


All Articles