Skip to content

Commit

Permalink
Add v11 node type breaking change to readme
Browse files Browse the repository at this point in the history
This documents the breaking change that landed in
babel#785
  • Loading branch information
lencioni authored Jan 22, 2020
1 parent 249a294 commit adb04f4
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,16 @@
**babel-eslint** allows you to lint **ALL** valid Babel code with the fantastic
[ESLint](https://github.com/eslint/eslint).

## Breaking change in v11.x.x
## Breaking changes in v11.x.x

As of the v11.x.x release, babel-eslint now requires Babel as a peer dependency and expects a valid [Babel configuration file](https://babeljs.io/docs/en/configuration) to exist. This ensures that the same Babel configuration is used during both linting and compilation.

v11 also changes some AST node types to match espree v6:

- `ExperimentalSpreadProperty` became `SpreadElement`.
- `ExperimentalRestProperty` became `RestElement`.
- `Literal` became `JSXText` (for JSXText).

## When should I use babel-eslint?

ESLint's default parser and core rules [only support the latest final ECMAScript standard](https://github.com/eslint/eslint/blob/a675c89573836adaf108a932696b061946abf1e6/README.md#what-about-experimental-features) and do not support experimental (such as new features) and non-standard (such as Flow or TypeScript types) syntax provided by Babel. babel-eslint is a parser that allows ESLint to run on source code that is transformed by Babel.
Expand Down

0 comments on commit adb04f4

Please sign in to comment.