For react-native - WebStorm users:
I'm starting a project with React Native using Jet Brains IDE WebStorm.
On project => node_modules/react-native/Libraries/react-native/react-native-interface.js
IDE get syntax errors:
Am I missing some library or plugin?
You are seeing the syntax error because WebStorm thinks the file is regular JS. However, it's actually written in Flow.
Flow eventually gets transformed into JS, similar to TypeScript. Learn more about Flow here: https://flowtype.org/
Honestly, don't worry about it unless you messing with the core files (which you shouldn't unless you're fixing bugs).
I know it's annoying to have the red squiggly lines in your project. You can just close your project and reopen it. This will remove the red squiggly lines!
If you want to enable Flow syntax, follow these steps: https://www.jetbrains.com/help/webstorm/2016.2/using-the-flow-type-checker.html
EDIT: A quicker hack to get the lines removed is to close the file with the error. Right click it in the project view, mark it as plain text, then remark it as a JS file. Voila! Just make sure to not open file otherwise repeat the steps. lol
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With