Definition for rule 'react/require-extension' was not found

帅比萌擦擦* 提交于 2020-02-04 08:42:00

问题


I have started to use Atom to work react-native.When I open index.js from Atom.I am getting error such as "definition for rule 'react/require-extension' was not found" top of the code line.I think ,ıt couldn't import @format .

I don't know exactly. I am newbie at react.Any experience about this trouble or any advise ?

enter image description here

enter image description here


回答1:


If you are using eslint for your ReactNative project then edit your .eslintrc file and add this snip of code

"rules": { "react/require-extension": "off" }

Now .eslintrc file should look like this.

{
  "extends": "rallycoding",
  "rules": {
    "react/require-extension": "off"
  }
}



来源:https://stackoverflow.com/questions/55383611/definition-for-rule-react-require-extension-was-not-found

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!