# VS Code settings for EDA computers
This setup uses a global eslint installation. VS Code will use a locally installed/project-based ESLint installation, but if it doesn't find one, it will use this global one.
The following steps are best to be applied in order.
## 1. Install npm packages
```sh
npm install -g eslint eslint-config-standard eslint-plugin-standard eslint-plugin-promise eslint-plugin-import eslint-plugin-node eslint-plugin-react
```
## 2. Install VS Code extensions
* ESLint
* vscode-icons
## 3. Edit VS Code's User Settings
File :arrow_right: Preferences :arrow_right: Settings
```js
{
"editor.tabSize": 2,
"workbench.iconTheme": "vscode-icons"
}
```
## 4. Edit VS Code's `keybindings.json`
This enables `CMD+b` to automatically fix as many linting errors/warnings as it can with a single shortcut.
File :arrow_right: Preferences :arrow_right: Keyboard Shortcuts (and then click on `keybindings.json`). Use this as the contents.
```js
[
{
"key": "cmd+b",
"command": "eslint.executeAutofix",
"when": "editorFocus"
}
]
```
## 5. Create `~/.eslintrc.json`
```json
{
"env": {
"browser": true,
"node": true,
"jest": true
},
"extends": [
"eslint:recommended",
"plugin:react/recommended",
"standard"
],
"plugins": [
"standard",
"promise"
],
"rules": {
"eol-last": ["error", "always"],
"no-multiple-empty-lines": [
"error", { "max": 1, "maxEOF": 0, "maxBOF": 0 }
],
"object-curly-spacing": ["error", "never"],
"react/prop-types": "off"
}
}
```