You see a syntax error because WebStorm considers the file to be regular JS. However, it is actually written in Flow.
Ultimately, the stream is converted to JS, like TypeScript. Read more about Flow here: https://flowtype.org/
Honestly, don’t worry about this if you don’t mess with the main files (which you don’t need if you don’t fix the errors).
I know it is annoying to have red squiggly lines in your project. You can simply close your project and reopen it. This will remove the red squiggly lines!
If you want to enable stream syntax, follow these steps: https://www.jetbrains.com/help/webstorm/2016.2/using-the-flow-type-checker.html
EDIT: A faster hack to delete lines is to close the file with an error. Right-click on it in the project view, mark it as plain text, then mark it as a JS file. Voila! Just make sure you are not opening the file, otherwise repeat the steps. lol
source share