babel-eslint 
babel-eslint allows you to lint ALL valid Babel code with the fantastic ESLint.
NOTE: Please note that this is experimental and may have numerous bugs. It is however successfuly linting the babel core.
If there is an issue, first check if it can be reproduced with the regular parser and with the latest versions of eslint and babel-eslint.
For questions and support please visit the #linting babel slack channel!
Known Issues
no-undeffor global flow types:ReactElement,ReactClass#130- Workaround: define types as globals in
.eslintrcor define types and import themimport type ReactElement from './types'
- Workaround: define types as globals in
no-unused-vars/no-undefwith Flow declarations (declare module A {}) #132no-unused-vars: [2, {vars: local}]#136
Please check out eslint-plugin-react for react/jsx issues
no-unused-varswith jsx
Please check out eslint-plugin-babel for the issues below:
How does it work?
ESLint allows custom parsers. This is great but some of the syntax nodes that Babel supports aren't supported by ESLint. When using this plugin, ESLint is monkeypatched and your code is transformed into code that ESLint can understand. All location info such as line numbers, columns is also retained so you can track down errors with ease.
Usage
Install
$ npm install -g eslint babel-eslint
Setup
.eslintrc
{
"parser": "babel-eslint",
"rules": {
"strict": 0
}
}
Check out the ESLint docs for all possible rules.
Run
$ eslint your-files-here