Add configuration section to README (babel/babel-eslint#303)
This commit is contained in:
parent
a2f345b24b
commit
872449d6fc
@ -65,6 +65,21 @@ $ npm install eslint@2.x babel-eslint@6 --save-dev
|
|||||||
|
|
||||||
Check out the [ESLint docs](http://eslint.org/docs/rules/) for all possible rules.
|
Check out the [ESLint docs](http://eslint.org/docs/rules/) for all possible rules.
|
||||||
|
|
||||||
|
### Configuration
|
||||||
|
|
||||||
|
`sourceType` can be set to `'module'`(default) or `'script'` if your code isn't using ECMAScript modules.
|
||||||
|
|
||||||
|
**.eslintrc**
|
||||||
|
|
||||||
|
```json
|
||||||
|
{
|
||||||
|
"parser": "babel-eslint",
|
||||||
|
"parserOptions": {
|
||||||
|
"sourceType": "module"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
### Run
|
### Run
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user