- Operating system: macOS Sonoma 14.2.1
- SonarLint plugin version: 10.2.1.77304
- Programming language you’re coding in: TypeScript
- Is connected mode used: No
And a thorough description of the problem / question:
The TypeScript section of WebStorm is able to find the Node interpreter managed via Volta:
SonarLint complains it can’t find Node though.
I saw NodeJsHelper was using /usr/libexec/path_helper and the Volta node shim should be on the path. I think it might be failing because the cwd when checking for node would need to be the project directory as the Volta shim inspects the relative package.json
to work out which Node to give access to.
I can enter the manual path to the shim (~/.volta/bin/node) in SonarLint when prompted but, because it’s not being requested from the context of the project directory, the wrong Node version shows up. The SonarLint dialog will show it found v21 - the Volta default - rather than v20 - the project-specific version.
Any chance this could be improved in SonarLint?