DEV Community

Discussion on: Git hook is the excellent alternative to Husky

Collapse
 
tcarrio profile image
Tom

This is great as it brings awareness of the native git functionality around commit hooks. Love it 🤓

It might be worth checking this: it looks like you aren't checking for extensions, just end of strings with your TS and SCSS file grep (/ts$ vs /\.ts$/). Thus you could have commit hooks failing because a file called "starts" or "boots" for example would be linted and likely fail if there's any non-JS code in there.

Collapse
 
krzysztofkaczy9 profile image
Krzysztof Kaczyński

I am glad to hear that 😃.

You are right I should look for .ts$ (For grep you do not have to escape the . character 😉)