-
Notifications
You must be signed in to change notification settings - Fork 1
Description
Is your feature request related to a problem? Please describe.
While this shims node, npm and npx to use the current project/global version. The binaries installed after an npm install are not shimmed. The correct bins are still accessible via npx, but that's not as intuitive as just running eslint directly.
Describe the solution you'd like
npm install eslintinstalls eslint using the current project version npmwhich eslintpoints to the eslint in the correct npm bin path- Launch a new shell
which eslintshould still be shimmed to the correct bin based on current project version
Describe alternatives you've considered
-
Shim all binaries post npm installation.
After the shimmed node binaries run, check the current versionnpm bin -gand add a shim for any new npm installed binaries that would handle redirecting to the correct version based on the current project.- Maybe include an environment variable
NVSHIM_AUTO_INSTALL_SHIM=1that controls if globally installed bins should have specific shims created - When a global shim does not exist for the current version of node what is the behaviour? Print warning and instructions?
Attempting to call global `eslint` but it is not installed for `node` v16.2.1. Run `npm -g install eslint` to install for your current version. Or switch your `nvm` config to a version that has it installed. Available local node versions are `18.9.0`, `16.2.1`, `14.7.1`.
- Maybe include an environment variable
-
Configure the PATH to include npm binaries.
Afternvshimis installed, configure the shell to set up dynamic environment PATH. Although at this point how is it different from the other solutions that modify the shell on directory change. -
Do nothing.
npxis sufficient, just document that this is not within the scope of the project.
Additional context