Skip to content

Prefer to use node from environment #1727

@thernstig

Description

@thernstig

#1596 (comment) mentioned:

I would only use a node version different the one the come with VS Code if you need to (e.g. using a eslint plugin that requires some special node features)

@dbaeumer Why is the recommendation to use the one that comes with VS Code?

Most other linters and VS Code extensions I am aware of defaults to using the one "from environment".

Examples:

It makes more sense to me at least. Each project, old or new, comes with a specific Node version. Imagine you work in multiple open source repositories. Most have a .nvmrc or a .node-version file. If I jump around between these, the Node version and thus implicitly the ESLint features changes depending on this.

To me the best solution would be to do like Ruff, where you fall back to the built-in one if you cannot find one from the environment:

importStrategy fromEnvironment Strategy for loading the ruff executable. fromEnvironment picks up Ruff from the environment, falling back to the bundled version if needed. useBundled uses the version bundled with the extension.

Could this be considered?

Metadata

Metadata

Assignees

No one assigned

    Labels

    feature-requestRequest for new features or functionalityhelp wantedIssues identified as good community contribution opportunities

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions