Description
What code were you trying to parse?
A new React component module. This happens on all new TypeScript source files, however. This is being triggered from the instance of ESLint that VSCode runs in the background, meaning that in order to get this error to go away, I have to reload the entire VSCode window.
import React from "react";
import { EditorProps } from ".";
import { Switch } from "@material-ui/core";
export function AreaListMode( { settings, updateSettings }: EditorProps ) {
return <Switch checked={ settings.areaListStyle } onChange={ e => updateSettings( { areaListStyle: e.target.checked ? "compact" : "default" } ) } />;
}
tsconfig.json include
:
"include": [
"projects/*/typings/**/*",
"projects/*/src/**/*"
],
What did you expect to happen?
The file should be parsed normally, as its path is matched by the include
property in my tsconfig.json
file.
What actually happened?
A "Parsing error" is reported on the first line of any file that is created while the VSCode linter instance is running, saying that the file is not included in the project. The error does not go away unless I restart VSCode (or reload the window).
Versions
package | version |
---|---|
@typescript-eslint/parser |
2.0.0 |
TypeScript |
3.4.5 |
ESLint |
6.1.0 |
node |
12.7.0 |
npm yarn |
1.17.3 |