-
Notifications
You must be signed in to change notification settings - Fork 348
Parsing error: File 'tsconfig.json' not found - if project does not contain tsconfig.json in workspace root #722
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
I also just ran in to this in a yarn workspace.
Trying to plug in ESLint in parserOptions: {
project: './tsconfig.json',
}, But it looks like the VSCode plugin is resolving that to Interesting note: The
I'm going package by package to start, but planning on hoisting stuff to the root of the project and extending eslintrc files from a base. The plan right now is for every packages' eslintrc to point to its |
I was able to fix the issue in my case by removing parserOptions entirely. I realise this may not work for everyone but for me it seemed fine. |
For me the error resolved when I got started on integrating ESLint into a 2nd package. At that point, yarn workspace hoisting took over and pulled ESLint up to the root node_modules, VSCode ESLint Plugin could find the executable, and it started respecting nested .eslintrc files. |
Sorta broke again. Yarn Workspaces stopped hoisting Over at the Yarn repo, since this has turned into a crapshow, I just did a But that'll stop working the second I |
Also experiencing the same issue because our project has no tsconfig.json in the root directory. Is it possible to specify a custom path? |
Possibly can't be fixed until typescript-eslint/typescript-eslint#251 is resolved (from #605) |
I am pretty sure that this is unrelated to the extension itself. @joepio what happens if you validate files in the front / server folder in a terminal using eslint command. Will that work? |
Running eslint in the
|
@joepio I mean running it in the workspace folder. Something like
Have you tried to add the following configuration to tell eslint what your working directories are:
|
Does not seem to work:
This works! Nice, thanks! |
Closing the issue then. |
I have a project (repo link) that has two separate tsconfig files in non-root folders. When I open this project in VScode, the linter gives this error in every TS file:
That path indeed does not link to an existing file, since it should look in a specific subdirectory of
project-root
.Whenever I open one of the subfolders, the error goes away and the plugin functions as expected.
Possibly related to #691
The text was updated successfully, but these errors were encountered: