I'm encountering an issue while attempting to utilize literal types in Visual Studio Code. When following the example from the documentation,
https://i.stack.imgur.com/V6njl.png
eslint is flagging an error in the code (Parsing error: Type expected.eslint)
My setup includes TypeScript 4.3.5 (using the vscode typescript version) and VS Code version 1.52.
https://i.stack.imgur.com/riAX4.png
I have also attempted creating a .eslintrc.json file with the following contents
{
"parserOptions": {
"ecmaVersion": "latest",
"sourceType": "module",
"ecmaFeatures": {
"jsx": true
}
},
"rules": {
"semi": "error"
}
}
However, the linting error persists despite these efforts.
I've tried restarting VS Code, uninstalling and reinstalling the eslint plugin, but the issue remains unsolved.
What other changes or attempts should I consider?