-
-
Notifications
You must be signed in to change notification settings - Fork 64
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
Apply to JavaScript files #267
Comments
You can set |
@JounQin Thank you. But I already have a |
Then you should add Or at least you should provide a minimal reproduction. |
Hi, I actually have allowJs, the setup all works as it should except for the fact that eslint throws a If the tsconfig was not set up correctly, I guess IntelliSense and Go to Source would not work. But it does work. Are you saying that this import resolver ( Hmmm, let me add a minimal repo shortly. |
Yes. |
I don't understand why it's not |
@JounQin Sorry, I messed up the minimal repo. It does not show the issue. Bear with me for a few min while I recreate it. |
@JounQin I was unable to recreate it. The current version of the min repo is as similar as possible to my main repo, which bizarrely started working when I restarted the devContainer. ESLint seems a bit slow though. Did you spot anything I did in my base eslint config that should take long? In any case, thanks a lot for the quick response, and sorry for the lack of a good reproduction. Any reason why it might have been necessary to restart the container? Just restarting vscode did not work. |
Related #176, maybe try to use relative path for
Sorry, I'm lack of experience of dev container. |
The eslint-plugin-import and eslint-import-resolver-typescript docs are quite clear that the latter is needed to support tsconfig @-rules (
compilerOptions.path
).I have set it up correctly, with these:
Where project is resolved as such:
I know that works, it comes from turborepo's examples.
The issue is when I use JavaScript files (as opposed to TypeScript).
import/no-unresolved
then throws an error.Any way to fix this? Ideally, the typescript resolver should also be applied to the JavaScript files.
The text was updated successfully, but these errors were encountered: