0

There is a tool called pre-commit (see pre-commit.com) that allows managing pre-commit hooks. When I installed the eslint hook using these instructions, and I run the hook, it complains eslint has no configuration file. However, when I run eslint it's not in my path.

So, where is pre-commit running eslint from?

I tried using -v to see verbose output, but I still see no hook repository path. I also tried reading the website.

dfrankow
  • 20,191
  • 41
  • 152
  • 214
  • I've linked a canonical duplicate. Generally you shouldn't poke around inside the cache as it's implementation detail -- you probably want to run `pre-commit run eslint ...` if you're looking to execute an individual hook – anthony sottile Mar 15 '21 at 21:59
  • But I'm not looking to execute a hook. I'm looking to execute a utility installed alongside the hook. If I execute the eslint hook, it just gives the error message to run eslint itself. – dfrankow Mar 15 '21 at 22:05
  • ah, you may want `npx run eslint` directly then – anthony sottile Mar 15 '21 at 23:58
  • thanks for the advice. i know so little about npm, npx, etc. – dfrankow Mar 16 '21 at 02:25

0 Answers0