Add typescript and tsdoc eslint config for .ts and/or .tsx (react) files
- Add @vidispine/eslint-config-typescript and eslint (8.x) as devDependencies,
- Extend config in package.json or equivalent file, e.g.:
"eslintConfig": {
"extends": [
"@vidispine/eslint-config-typescript/base" // For .ts
"@vidispine/eslint-config-typescript" // For .tsx (also works with trailing "/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
},