- Install
eslint
add-on for VSCode. VSCode marketplace ⇧ ⌘ P
, or for linuxctrl ⇧ P
- open command palletePreferences: Open Settings (JSON)
orPreferences: Open Workspace Settings (JSON)
- Add the following to enable fixing auto fixable problems on file save:
"editor.codeActionsOnSave": {
"source.fixAll.eslint": true
}
You can lint the code (js,jsx,ts,tsx) with:
yarn lint
You can fix the errors with:
yarn lint:fix
You can lint the code (scss,css) with:
yarn lint:styles
You can fix the errors with:
yarn lint:styles:fix