npm-run icon indicating copy to clipboard operation
npm-run copied to clipboard

Local eslint doesn't work

Open bernardoadc opened this issue 3 years ago • 2 comments

This happens because eslint doesnt get installed in node_modules/bin, but rather in node_modules/eslint/bin. (but if I add a script in package.json, npm will find it).

Is this in the scope of the project? Would you accept a PR?

bernardoadc avatar Sep 11 '20 19:09 bernardoadc

Hm, has the npm path lookup algorithm changed? Seems weird that it would pick that up.

If you are just using this from the command line, try using npx eslint instead of npm-run.

timoxley avatar Sep 11 '20 22:09 timoxley

Wouldn't know.. but in eslint's package there's a:

"bin": {
    "eslint": "bin/eslint.js"
  },

Maybe this should be checked too, if not yet.

I don't want to use npx because it installs the modules every single time, and that's just dumb. npm-run would be better for local packages and npx to a general/single-use situation

bernardoadc avatar Sep 14 '20 21:09 bernardoadc