ESLint is throwing a Parsing error: Unexpected token =
error when I try to lint my Es6 classes. What configuration parameter am I missing to enable fat arrow c
I came across the same problem today
and @dreyescat 's answer works for me.
By default, babel uses 3 presets: es2015
, react
, stage-2
Screenshot with "Parsing error: Unexpected token ="
Then if you also select the stage-1
preset, the error is gone
Screenshot with no error
You can test it on the bebeljs.io site yourself