loading...

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... [Read Full]
markdown guide
 

What is wrong with normal git hooks? Why anybody sane would use a 3rd party to mimic the existing functionality?

 

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.

 

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

Sloan, the sloth mascot Comment marked as low quality/non-constructive by the community View code of conduct

being able to manage the hooks from your project.json

I have a gut feeling hooks were made repo-local on purpose. I might come up with a dozen examples why, but it would be too large to fit in the margin.

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

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.

 

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

 

Yes.

I am not a nanny in a kindergarten, I work with professionals. If the developer fails to follow the procedure, bloated 3rd party software would hardly solve the issue.

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.

I guess your arrogant attitude never has got you into a position of having to manage others

Very true. Ad hominem always works better than reasoning.

 

It doesn't mimic it

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

 

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 :)

 

I'm not sure I understand, what circumstances?

 

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".

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

Me neither. Maybe someday!

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

code of conduct - report abuse