Closed klimashkin closed 6 years ago
In general it would be great to have a way to pass options from processJs
to espree directly (add some espreeOptions param), because sometimes we want to stop transpiling some ES20XX features without waiting for a whole ES20XX spec to be finalized, as browsers start supporting it
@klimashkin thanks for your issue. Oh yes passing the options to espree directly would be great indeed. I will work on that as soon as I have time 👍
Probably as a fast fix you could release minor update of node-rcs-core that will require espree as ^4.0.0-rc.0 || ^4.0.0
.
Spec will not be changing and seems like they just wait it to be published to bump final 4.0.0
The problem is, I just checked, I am not using espree (it was accidentally in the dependencies). I use recast
which is using esprima
under the hood. I now have to think about the solution right now, as I can switch the parsers from recast
. I hope I will find a general solution
Oh, my bad, I was sure I saw espree in the source. I think problem with esprima is that it's jquery project that is not really maintained anymore. espree is better because it uses acorn, which is being developed pretty good.
Yap, I thought about the same. I think espree is the way to go.
With v2.0.0
it should be fixed, and your options are now added. For that, please check out the parserOptions.
Awesome, it works! Thank you!
Seems it fails on javascript files that use object rest/spread.
Espree can be updated to version 4, or to fix that in espree 3, option
experimentalObjectRestSpread: true
can be passed