babel/eslint/babel-eslint-parser
2015-06-05 10:00:15 +01:00
..
2015-02-27 21:44:06 +11:00
2015-06-05 10:00:15 +01:00
2015-02-27 21:44:06 +11:00
2015-06-05 10:00:15 +01:00
2015-05-22 21:04:00 -04:00

babel-eslint Build Status

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's an issue, check if it can be reproduced with the regular parser and with the latest versions of eslint and babel-eslint. For issues related to JSX, see if eslint-plugin-react helps!

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