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:
parent
8ec4ad91f6
commit
039d5187e9
@ -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": {
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||

|
||||
|
Loading…
x
Reference in New Issue
Block a user