-
Notifications
You must be signed in to change notification settings - Fork 335
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
"parserOptions.project" has been set for @typescript-eslint/parser with WIERD file path #1537
Comments
Try moving the linting configuration for So basically remove:
and instead have this at the root level of your config:
|
Try removing An alternative (but worse) option would be to add |
I'm pretty sure the parser would just ignore non-TS files. In fact, even the TypeScript ESLint docs have an example |
@PapyElGringo can you provide us with a repository we can clone that demos this with steps to reproduce. This would be the fastest way to understand what is going on. |
Sure but first let me give you more information:
The repo is the following https://github.com/material-shell/material-shell Current version of vscode
|
Can you also provide steps on how to reproduce: e.g. which file to open? |
Any additinal steps? |
Well I know that the issue is not reproductible for everyone as it worked fine for me also previously or for others contributors but I don't know what changed on my side |
Very hard to say why it is not working for you. I would guess that in one of the parent directories you added an Eslint configuration file which is now taken into consideration. Or some different lookup path for node modules. Have you tried to add the |
I had the same problem, but the problem was solved when I added the following in vscode's setting.json:
Yes, I had to additionally specify the location of tsconfig in the vscode plugin, it seems that vscode-eslint is not reading my .eslintrc, even though I have specified tsconfig.json in this file, my .eslintrc file:
By the way, the above solution can't completely solve my problem, because eslint will now apply the ts check to the js file. It seems that I also need to additionally explain in setting.json that this configuration is only valid for ts, which feels very cumbersome. Also, I asked the same question on stackoverflow, my project was created by create-react-app, for testing, I removed all vscode settings to make sure it wasn't my environment configuration issue. |
I will close the issue since I was not able to reproduce the original problem. Please ping if additional information is available. |
I could reproduce the same issue @aim-leo has Basically if you open the project on oryginal directory all is ok, when you open it on symlink VS Code (or maybe rather eslint extension) is lost and you get that error |
Note that we have a known issue around symlinks in typescript-eslint: typescript-eslint/typescript-eslint#2987. |
Hi, To solve this problem, just add "**/*.json" to the includes array in the tsconfig.json file at the root of your project
|
Hello everyone and thanks for your support.
I open an issue here because I don't reproduce the issue when using the
npx eslint
command on my project but vscode does.I get the following issues
Please not the wierd file path used for the check.
eslintrc.js
tsconfig.json
I figured out that If I change the
"include": ["src"]
with"include": ["../../../../../home/papyelgringo/workspace/material-shell/src"]
it does fix the issue but it's not a solution.Any idea?
Thanks in advance
The text was updated successfully, but these errors were encountered: