1
0
mirror of https://github.com/SpaceVim/SpaceVim.git synced 2025-04-15 08:09:11 +08:00

docs(eslint): update ESLint in JS as IDE docs

This commit is contained in:
Mike Barberry 2022-01-07 21:55:19 -08:00 committed by GitHub
parent 8ec4ad91f6
commit 039d5187e9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -53,7 +53,31 @@ It will run [eslint](https://eslint.org/) asynchronously.
To install eslint, just run following command in terminal.
```sh
npm install -g eslint-cli
npm install -g eslint
```
Create .eslintrc.json in $HOME directory
```
touch ~/.eslintrc.json
```
Add basic configuration that can be extended based on specific needs
```
{
"env": {
"browser": true,
"commonjs": true,
"es2021": true
},
"extends": "eslint:recommended",
"parserOptions": {
"ecmaVersion": 13
},
"rules": {
}
}
```
![eslint](https://user-images.githubusercontent.com/13142418/51972203-dbfd4580-24b5-11e9-9bbd-2a88e6f656f6.png)