over 7 years ago

I use eslint to lint ES2015 + React projects. One problem I encounter with eslint is that it does not support the spread operator. I realized that I had to install babel-eslint to make this work. I have to modify .eslintrc to make it work with babel-eslint:

{
  "parser": "babel-eslint",
    ...
}

Then, I run eslint and got this error:

Error: Cannot find module 'estraverse-fb'

It turns out that if you are using eslint 2.0, you have to use babel-eslint 6.x.x. The detail is explained in this thread.

← Do not use .bind() or Arrow Functions in JSX Props Enable logging in Postgresql →
 
comments powered by Disqus