Skip to content
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

eslint.runtime does not respect current opened folder bug #1671

Closed
alexanderniebuhr opened this issue Jun 28, 2023 · 1 comment
Closed

eslint.runtime does not respect current opened folder bug #1671

alexanderniebuhr opened this issue Jun 28, 2023 · 1 comment

Comments

@alexanderniebuhr
Copy link

alexanderniebuhr commented Jun 28, 2023

I'm using [proto](https://moonrepo.dev/proto) for my node version managment.
proto works by automatically choosing the right node version for a specific folder it is run in.

This works great in any terminal, even in the integrated VS Code one. However if you run proto in a directory where no version definition is set, it will fall-back to a default version.

setting "eslint.runtime": "node", does pick-up the fall-back version, and overwrites the bundled node version of VS Code, which is great. However it does not respect the per-project versions. Therefore I expect that the eslint.runtime is derived/evaluated before the folder is loaded in VS Code, so proto will not see the folder context and therefore provide the fall-back value and not the correct version.

Is my assumption correct?
Can you change the behaviour, so that the eslint.runtime command is ran against the workspace folder?

maybe related to: #1602

@alexanderniebuhr alexanderniebuhr changed the title eslint.runtime does not work for workspace context eslint.runtime does not respect current opened folder bug Jun 28, 2023
@dbaeumer
Copy link
Member

Actually this is a dup of #1602. In a normal setup we don't start the eslint server on the workspace folder hence it doesn't see the version definition.

What you can try as a workaround for now is to point eslint.runtime to a shell script that changes into the workspace folder and then starts node.

Closing as dup of #1602

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants