Add react eslint config
- Add @vidispine/eslint-config-react and eslint (8.x) as devDependencies
- Also uses @vidispine/eslint-config-typescript to lint
*.tsx
files.
- Also uses @vidispine/eslint-config-typescript to lint
- Extend config in package.json or equivalent file, e.g.:
"eslintConfig": {
"extends": [
"@vidispine/eslint-config-react"
]
}
- Install ESLint plugin for VSCode
- Allow eslint for this workspace
- Open Command Palette (CTRL+SHIFT+P) > ESLint: Manage Library Execution > Allow
- Add this to .vscode/settings.json if you want to fix lint issues on save:
"editor.codeActionsOnSave": {
"source.fixAll.eslint": true
},