Be the first user to complete this post
|
Add to List |
Use es6 and es6+ in eslint with babel
It seems like Eslint does not support ES6/ES6+ experimental features out of the box at the time of writing. To do that you need to install a dev dependency called babel-eslint
and then specify it to be the parser in your eslintrc file.
npm install --save-dev babel-eslint
//.eslintrc
{
...
"parser": "babel-eslint",
...
}
With this your arrow functions wont complain anymore upon linting.
Also Read:
- Use node in es6 syntax with babel transpiling
- Passing the store down implicitly via context in a react redux app
- Disable eslint no-unused-vars warning on global functions
- Generating container components with connect utility in react redux app
- Chromium flag to by pass the popup to grant media permissions in webRTC