问题
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