Skip to content

Commit 0675940

Browse files
committed
Add README note about babel-eslint
1 parent 902bd6c commit 0675940

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

README.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,19 @@ module.exports = {
2626
- Use ESLint’s [`--report-unused-disable-directives`](https://eslint.org/docs/user-guide/command-line-interface#--report-unused-disable-directives) flag to ensure you do not use more `eslint-disable` comments than needed.
2727
- This config is [Prettier](https://prettier.io/)-compatible, but it is still usable by projects which do not wish to use Prettier.
2828

29+
### Experimental syntax
30+
31+
By default, this config uses ESLint’s built-in parser, which doesn’t support [experimental ECMAScript features](https://github.com/eslint/eslint/blob/a675c89573836adaf108a932696b061946abf1e6/README.md#what-about-experimental-features). If your code uses experimental syntax transpiled with Babel, make sure to set the ESLint parser to [babel-eslint](https://github.com/babel/babel-eslint):
32+
33+
```js
34+
module.exports = {
35+
// See https://github.com/torchbox/eslint-config-torchbox for rules.
36+
extends: 'torchbox',
37+
// Support non-standard, experimental JS features that Babel knows how to process.
38+
parser: 'babel-eslint',
39+
};
40+
```
41+
2942
## What’s included
3043

3144
> See [`config.js`](./config.js) for full config defintion.

0 commit comments

Comments
 (0)