8000 Bug: "The file does not match your project config" for all files in VS Code eslint extension when path to workspace folder includes a symlink · Issue #5396 · typescript-eslint/typescript-eslint · GitHub
[go: up one dir, main page]

Skip to content

Bug: "The file does not match your project config" for all files in VS Code eslint extension when path to workspace folder includes a symlink #5396

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

Closed
4 tasks done
joshuakb2 opened this issue Jul 28, 2022 · 1 comment
Labels
duplicate This issue or pull request already exists

Comments

@joshuakb2
Copy link

Before You File a Bug Report Please Confirm You Have Done The Following...

  • I have tried restarting my IDE and the issue persists.
  • I have updated to the latest version of the packages.
  • I have searched for related issues and found none that matched my issue.
  • I have read the FAQ and my problem is not listed.

Issue Description

I actually did find a related issue, but it was closed and locked already. #2234.

I have a repository using TS projects containing 3 applications and 3 libraries. I build them with rollup and use the rollup eslint plugin, and I develop with VS Code using the eslint extension. Even though I can build with rollup and I see no errors from eslint, the eslint extension of VS Code gives an error at the top of every TS file:

Parsing error: "parserOptions.project" has been set for @typescript-eslint/parser.
The file does not match your project config: ../../../../<absolute path to file>.
The file must be included in at least one of the projects provided.

This only happens when the VS Code workspace path includes a symlink. In my case, I have a second hard drive mounted as /extra, and I store all my projects inside /extra/projects, but I have a symlink to that projects folder from my home directory, so I usually open projects through /home/jbaker/projects/<project name>. When I open the project using the more direct path, /extra/projects/<project name>, this error does not happen.

Reproduction Repository Link

https://github.com/joshuakb2/typescript-eslint-bug-repro

Repro Steps

  1. Have VS Code installed with the newest version of the eslint extension
  2. Clone the reproduction repository
  3. Open the repository folder in VS Code (make sure to use a path with no symlinks)
  4. Open the ts/app/main.ts file and observe no eslint errors. Feel free to edit the file to introduce some errors, to confirm that eslint is present and working properly.
  5. Make a symlink to the repository folder and open that symlink as a folder in VS Code
  6. Open the ts/app/main.ts file and observe that eslint thinks the file does not match the project specification.

Versions

package version
@typescript-eslint/eslint-plugin 5.31.0
@typescript-eslint/parser 5.31.0
@typescript-eslint/scope-manager 5.31.0
@typescript-eslint/typescript-estree 5.31.0
@typescript-eslint/type-utils 5.31.0
@typescript-eslint/utils 5.31.0
TypeScript 4.7.4
ESLint 8.20.0
VS Code 1.68.1
VS Code eslint extension 2.2.6
@joshuakb2 joshuakb2 added bug Something isn't working triage Waiting for team members to take a look labels Jul 28, 2022
@bradzacher
Copy link
Member
bradzacher commented Jul 28, 2022

I believe this would be a duplicate of #2987

But thank you so much for such a detailed issue!

@bradzacher bradzacher added duplicate This issue or pull request already exists and removed bug Something isn't working triage Waiting for team members to take a look labels Jul 28, 2022
@typescript-eslint typescript-eslint locked and limited conversation to collaborators Jul 28, 2022
@typescript-eslint typescript-eslint unlocked this conversation Jul 28, 2022
@bradzacher bradzacher closed this as not planned Won't fix, can't repro, duplicate, stale Jul 28, 2022
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 28, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
duplicate This issue or pull request already exists
Projects
None yet
Development

No branches or pull requests

2 participants
0