vscode-linter icon indicating copy to clipboard operation
vscode-linter copied to clipboard

Feature - Support node_modules/.bin

Open mcm-ham opened this issue 2 years ago • 4 comments
trafficstars

Since a number of linters are npm packages it would be great to support node_modules/.bin in addition to $PATH so that we can add the various linters as devDependencies of the current project avoiding the need for developers to install them globally and we can control the version to avoid issues where different developers can be using different versions.

mcm-ham avatar Jun 02 '23 10:06 mcm-ham

Just add ./node_modules/.bin to your $PATH

oojacoboo avatar Jun 24 '23 06:06 oojacoboo

That only works for a single project, not if you're dealing with multiple projects or repositories.

mcm-ham avatar Sep 08 '23 00:09 mcm-ham

@mcm-ham That's not true, it works for any directory where you have a node_modules directory located.

oojacoboo avatar Sep 08 '23 00:09 oojacoboo

Ah missed that you were suggesting relative paths, it's a good thought. Unfortunately it didn't work for me, when I try adding process.cwd() to the extension it outputs / rather than the project folder which could explain why it doesn't work.

mcm-ham avatar Sep 08 '23 02:09 mcm-ham