gcazaciuc / eslint-plugin-flowtype

A plugin for ESLint that strips FlowType type annonations before linting the files.
18 stars 0 forks source link

Re: parser #1

Open RReverser opened 9 years ago

RReverser commented 9 years ago

In README you state:

Internally the plugin makes use of Recast for performing AST transforms and stripping the annotations together with esprima-fb parser( which is now deprecated but i couldn't get flow-parser to play nice with recast as such had to use esprima ).

Please see relevant section from Facebook's blog article:

Alternatively, if you need to parse JSX, take a look at acorn parser in combination with acorn-jsx plugin which is used inside of Babel and thus always supports the latest syntax.

Hopefully this should help.

gcazaciuc commented 9 years ago

Thanks a lot. I'll check it out and update here.

volkanunsal commented 9 years ago

Would be interested to use this plugin if this issue is solved. esprima is throwing all sorts of illegal token errors on my code.

curiouslychase commented 9 years ago

I'm in the same boat as @volkanunsal.

Edit: Actually, using "parser": "babel-eslint" in my .eslintrc gives me everything I need in es6, so I don't need this plugin anymore.