typicode / husky

Git hooks made easy 🐶 woof!
https://typicode.github.io/husky
MIT License
32.58k stars 1.03k forks source link

Why "lint-staged" log is different when is triggered by husky (v6)? #968

Open luquera opened 3 years ago

luquera commented 3 years ago

Everything is set up correctly, according to the documentation. I'm using Windows 10.

by husky: image

by npm script (running lint-staged): image

Thanks!

Geczy commented 1 year ago

https://github.com/typicode/husky/issues/968#issuecomment-1455110738

this comment fixed the original issue for me. i reverted my pre-commit file

webbertakken commented 1 year ago

Documented a combination of fixes in https://gist.github.com/webbertakken/c2b457d39224baf701c8de1589b61555.

Works for:

Tested with WebStorm IDE and latest git versions.

@Geczy @akmaldira @MrFlyHouse @loriswit this should solve your problems as well.

sbiliaiev commented 11 months ago

@webbertakken Thank you! Your script is exactly what I was looking for! I've tried settings manually FORCE_COLORto 0 and 1 as it's written in other guides but it didn't help me. Cheers!

mreduar commented 9 months ago

Documented a combination of fixes in https://gist.github.com/webbertakken/c2b457d39224baf701c8de1589b61555.

Works for:

  • 🍎 MacOS using Zsh (cli) or IDE (no tty)
  • 💻 Ubuntu using Zsh (cli) or IDE (no tty)
  • 🪟 Windows using Git Bash or PowerShell or IDE (no tty)

Tested with WebStorm IDE and latest git versions.

@Geczy @akmaldira @MrFlyHouse @loriswit this should solve your problems as well.

Unfortunately it does not work with Windows Terminal WSL under a docker container. For example using Laravel Sail.

its-monotype commented 9 months ago

@typicode It's not fixed in v9? I'm facing the same issue...