Flow + Standard: Parsing error on type declaration
I have installed flow and standard and everything works perfectly form the CLI. I am struggling to make IDE give good suggestions though. I followed this basic example https://flow.org/en/docs/react/components/
and keep getting such error from standard in IDE (both WebStorm and RubyMine)
How can I make Flow and Standard work well together?
Please sign in to leave a comment.
Please see https://standardjs.com/#can-i-use-a-javascript-language-variant-like-flow-or-typescript
Been there, done that. As I mentioned - everything works perfectly fine in CLI
please provide your configuration file (package.json or whatever file you use) and screenshot of Settings | Languages & Frameworks | JavaScript | Code Quality Tools | ESLint page
BTW, what WebStorm version do you use?
package.json
And the settings:
The situation is the same when I use standard from within project.
Node 8.2.1 if that may play a role.
Tried on Webstorm 2017.1.4 and RubyMine 2017.2.4
>The situation is the same when I use standard from within project.
Please always use the one from the project - unless you have the same set of eslint plugins installed globally. This won't work otherwise. BTW, what command do you use when linting your code in cli? Do you use local or global standard package?
Could not make it happen. I used local statandard.
I just went with eslint with standard-flow config, works well.
Actually, I can't make Standard working with Flow as well, but my issue is different - https://youtrack.jetbrains.com/issue/WEB-29231... Let's see if fixing it fixes your problem as well
I am getting the same issue.
my .eslintrc:
and in package.json, my dev dependencies are:
Please provide more details on your issue - what exactly happens in your case?
Also how do your ESLint settings look like in the IDE? What Standard is chosen? (Should be the one installed locally)
What are Standard settings in package.json?
What is your IDE version?
Hi Oksana,
I am experiencing two issues. Here is the code:
As you can see there are 2 issues:
1)
and 2)
Not sure why 2 is an issue, as it's clearly being used in the touchableOpacity component.
As for my settings, ESLINT in the IDE is using "automatic search", and finding the .eslintrc in the root of my repo, and the package is `~/git/my_app/node_modules/eslint`, to which I have posted my setup.
my IDE version is
WebStorm 2018.1
Build #WS-181.4203.535, built on March 22, 2018
Licensed to My Name
Subscription is active until April 16, 2019
For educational use only.
JRE: 1.8.0_152-release-1136-b20 x86_64
JVM: OpenJDK 64-Bit Server VM by JetBrains s.r.o
macOS 10.13.5
1) This is happening because
babel-eslint
is not specified as the parser. See https://github.com/gajus/eslint-plugin-flowtype#configuration2) logged as https://youtrack.jetbrains.com/issue/WEB-34047, please follow it for updates