DEV Community

Cover image for JS Project Setup: Code Quality is simple when you don't have to do anything

JS Project Setup: Code Quality is simple when you don't have to do anything

Sammy Israwi on February 08, 2019

The JavaScript, Web, and Node community is blessed these days by having easy-to-use (and not so easy-to-use) tools at our fingertips, along with do...
 
joelnet profile image
JavaScript Joel

Uh, another leftpad, got it, thanks.

This is an unfair jab and also unnecessarily condescending.

Husky provides many benefits over plain git hooks. One, being able to manage the hooks from your project.json. This makes them visible to anyone viewing the source. They are also source controlled.

Hooks are local to any given Git repository, and they are not copied over to the new repository when you run git clone

This has an important impact when configuring hooks for a team of developers. First, you need to find a way to make sure hooks stay up-to-date amongst your team members

Collapse
 
sammyisa profile image
Sammy Israwi

There's nothing wrong with normal git hooks if you prefer to set them up the original way, or if you find it easier to do it that way. Husky just helps you make it a but easier to work with, and sets them up in a familiar way with a json file.

Collapse
 
designalchemy profile image
Luke

Have you ever tired to get a team of 10+ Devs to manually install and update git hooks?

 
designalchemy profile image
Luke

Bloat ? who cares about a build tool being bloated, it dosnt ship to production. Also this tool literally literally solves the issue by blocking pushes until its correct.

If you have ever had to managed a project or maintain consistencies between the juniors you would know this is a life saver. But i guess your arrogant attitude never has got you into a position of having to manage others.

Collapse
 
hrmny profile image
Leah

It doesn't mimic it

It's using git hooks in the background, automatically adding them when you run npm install

 
joelnet profile image
JavaScript Joel

This is perfect example of abusing the tool of choice (git) because we are too stupid to understand how to use it properly.

Agree to disagree.

Collapse
 
qm3ster profile image
Mihail Malo

However, today we're keeping it simple and clean with only Prettier and Husky

Please edit that sentence to say "tonight" instead, it's the least you can do given the circumstances :)

Collapse
 
sammyisa profile image
Sammy Israwi

I'm not sure I understand, what circumstances?

Collapse
 
qm3ster profile image
Mihail Malo • Edited

Using the turn of phrase "simple and clean". As in "Simple and Clean", the meme song from Kingdom Hearts game. The name drop sentence in the lyrics contains the word "tonight" but not "today".

Thread Thread
 
sammyisa profile image
Sammy Israwi

Oh! Sorry I don't play Kingdom Hearts. I feel I was too late for that train.

Thread Thread
 
qm3ster profile image
Mihail Malo • Edited

Me neither. Maybe someday!

There's also just been a new one after I imagine a decade. That's why I see it everywhere.