Skip to content

Commit

Permalink
docs: update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
Cheton Wu committed Oct 28, 2021
1 parent 1376b86 commit a79505d
Showing 1 changed file with 10 additions and 27 deletions.
37 changes: 10 additions & 27 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,42 +23,25 @@ We export three ESLint configurations for your usage.
Which produces and runs commands like this:

```sh
npm install --save-dev eslint@^5.2.0
npm install --save-dev eslint-plugin-import@^2.13.0
npm install --save-dev eslint-plugin-jsx-a11y@^6.1.1
npm install --save-dev eslint-plugin-react@^7.10.0
npm install --save-dev eslint@^7.0.0
npm install --save-dev eslint-plugin-import@latest
npm install --save-dev eslint-plugin-jsx-a11y@latest
npm install --save-dev eslint-plugin-react@latest
```

3. Add `"extends": "trendmicro"` to .eslintrc:
```json
{
"extends": "trendmicro",
"parser": "@babel/eslint-parser",
"env": {
"browser": true,
"node": true
}
}
```

## Notes

At the moment, you will need to use [babel-eslint](https://github.com/babel/babel-eslint) if you use stuff like class properties, decorators, types.

### babel-eslint

1. Install the latest version of [babel-eslint](https://github.com/babel/babel-eslint):
```sh
npm install --save-dev babel-eslint@latest
```

2. Update .eslintrc with Babel parser support:
```json
{
"extends": "trendmicro",
"parser": "babel-eslint",
"env": {
"browser": true,
"node": true
},"
"plugins": [
"@babel"
],
"rules": {
}
}
```

0 comments on commit a79505d

Please sign in to comment.