question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

no-unresolved for react native

See original GitHub issue

Basically, could the settings in this issue be included in the eslint-plugin-react-native?

  "settings": {
    "import/resolver": {
      "node": {
        "extensions": [".js", ".ios.js", ".android.js"]
      }
    }
  }

Issue Analytics

  • State:open
  • Created 7 years ago
  • Reactions:10
  • Comments:8 (1 by maintainers)

github_iconTop GitHub Comments

17reactions
bbrock25commented, Sep 8, 2016

additionally, is there a way to have eslint pick up on the Static Image Resources

ie: files that are named as follows:

"file-name@1x.png", "file-name@2x.png", "file-name@3x.png"

but referenced as: require("./file-name.png")

3reactions
mjmaixcommented, Apr 7, 2018

@gustavjf for now I’m using 'import/no-unresolved': [2, { ignore: ['.png$', '.webp$', '.jpg$'] }], to ignore until this issue is fixed.

Read more comments on GitHub >

github_iconTop Results From Across the Web

no-unresolved for react native · Issue #279 · import-js ... - GitHub
In react native, you can have an import statement import Foo from ". ... no-unresolved gives an error when foo.js doesn't exist, ...
Read more >
react native - Import/no-unresolved for static images resources
An issue related to React-Native's import resolver open but no solution to fix the problem is available or discussed.
Read more >
How to remove ESlint error no-unresolved from importing 'react'
The problem is that your webpack config is written in ES6 format, which doesn't play well with eslint-import-resolver-webpack . So, you either refactor...
Read more >
How to Use Module Federation with Re.Pack 3 - Medium
Pack provides default settings for React and React Native libraries ... from 'react-native';// eslint-disable-next-line import/no-unresolved
Read more >
Communication between native and React Native
There is no way to update only a few properties at a time. ... a dimension flexible in both JS and native leads...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found