1

I'm working on react project which has integrated eslint. It works great and if I try commit code that is not compatible with eslint i get errors and commit is stopped. Although when I don't have any errors I just get message "running eslint...". I tried waiting, but after an hour I decided to break by ctrl-c and commit with --no-verify flag. It happens both in vscode on Ubuntu as in Intellij on Windows. Has any encountered this problem before and know how to fix it?

Alisec
  • 63
  • 1
  • 4
  • 2
    Can you look in the `.git/hooks` directory and find the relevant hook (probably `pre-commit`) and include its contents as a code block in your question? – bk2204 May 29 '20 at 21:25
  • 4
    Try to add the `--debug` flag to the eslint command ran by the git hook. It should give you more info on what's going on. – Scalpweb May 29 '20 at 21:30

2 Answers2

4

Have encountered the same issue and the solution for me was to remove the build directory and it works

Dani
  • 745
  • 7
  • 12
2

It turns out that storybook_static build files will too make eslint hang forever :/ Just remove it too.

Felipe N Moura
  • 1,367
  • 11
  • 13
  • 1
    This one saves. Basically the answer was to remove build folder. But I missed this folder, and this comment saves me. – Adharsh M May 03 '23 at 02:58