-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Parsing error: "parserOptions.project" has been set for @typescript-eslint/parser. #5765
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
Interesting. #5762 should improve the error message a bit. Two things fix this locally for me:
My recommendation here would be to do either of those two things, or if you can't, set up a As to why those specific files do or don't get the parsing error... great question. Marking as this needing an investigation. |
Something weird is happening with the project references yeah. Similarly your For some reason the combination of the duplicated tsconfig and the unrestricted includes in project references causes TS to exclude What makes it weirder is that TS gives us inconsistent information:
So TS knows that Regardless - cleaning up your project references so there's less duplication in the I would suggest creating a single tsconfig for your entire project. |
I'm going to close this for now because there are workarounds provided. |
The trouble is, the default vue project created with |
@jez9999 check the guide I linked. It should help you setup a tsconfig.eslint.json to lint with. |
@bradzacher Vue 3's default setup has a |
If you ask me, @JoshuaKGoldberg, supporting project references should be a very high priority for this project. They seem to have been around now for 4 years and are presumably widely used. It's somewhat ridiculous they're not supported. Also, I tried adding that experimental flag in
|
That sort of statement is a really harmful, inflammatory statement. It is based on a lack of understanding of the volunteer maintainers' circumstances as well as the very large scope of the problem. I would thank you to not use such a tone, especially when you're asking people to volunteer their free time to help you out.
Project references aren't something you can simply support because we don't support them - TS APIs support them. Right now the APIs TS provides to work with project references are not good for us - there are a number of cases for which they break the type-aware linting; which is why the flag is |
Before You File a Bug Report Please Confirm You Have Done The Following...
Issue Description
I recently added a couple of ESLint rules that required me to add this to my
.eslintrc.cjs
config:This is causing the following error in VS Code in some of my TS and JS files:
The weird thing is I will get this error in a TS file in a dir, but not in another TS file in the same dir. If I rename the file with the error (something like
file.ts
->file2.ts
), the error will disappear, and it appears when I rename it back, so I assume it's some weird caching issue.In my example repo, I'm getting the error for
src/router.js
but not forsrc/main.js
.Reproduction Repository Link
https://gitlab.com/jez9999/eslint-bug
Repro Steps
npm install
npm run lint
Versions
TypeScript
4.8.4
ESLint
8.23.1
node
16.17.0
The text was updated successfully, but these errors were encountered: