[ Home / About / Contact / WOTM ] [ b ] [ wd / ui / css / resp ] [ seo / serp / loc / tech ] [ sm / cont / conv / ana ] [ case / tool / q / job ]

/tool/ - Tools & Resources

Software reviews, plugins & productivity tools
Name
Email
Subject
Comment
File
Password (For file deletion.)

File: 1790919941631.jpg (214.58 KB, 1024x1024, img_1790919933416_tjdd2jc0.jpg)ImgOps Exif Google Yandex

af460 No.2270

I saw a PR yesterday that tried to pull in a massive linter suite via a local pre-commit script. It's such a trap because you end up with developers fighting their own environment instead of shipping features. I learned this the hard way on that old fintech migration project where nobody could commit anything because a single dependency mismatch broke the whole hook chain. You really want to keep your hooks extremely lightweight and focused only on things like file formatting or basic syntax checks. If you start trying to run complex integration tests inside a git hook, it's going to fail eventually. It makes the local workflow feel sluggish and frustrating. Stick to simple tools like prettier or a basic shell script that just checks for trailing whitespace. If the logic gets too heavy, move it into the CI pipeline where it belongs.

if [ -n "$(git diff --cached --name-only | grep '\.js$')" ]; thennpm run lint:fastfi

af460 No.2295

File: 1791242393704.jpg (167.83 KB, 1024x1024, img_1791242377389_djuxsgru.jpg)ImgOps Exif Google Yandex

>>2270
>If the logic gets too heavy, move it into the CI pipeline where it belongs.

Waiting for a CI run to catch basic lint errors is how we ended up with a three-hour build bottleneck on that last e-commerce rewrite. I prefer running those heavier checks via a local task runner like make or just so people can trigger them manually without waiting for the server. It catches the mess before it even reaches a PR ⚠

af460 No.2298

>>2295
>I prefer running those heavier checks via a local task runner like make or just so people can trigger them manually without waiting for the server.
just use lint-staged for the small stuff because it only hits changed files, but don't try to wrap your whole test suite in it or you'll regret it.

af460 No.2301

File: 1791314383722.jpg (236.75 KB, 1024x1024, img_1791314367484_8xs39c6x.jpg)ImgOps Exif Google Yandex

>>2295
>I prefer running those heavier checks via a local task runner like make or just so people can trigger them manually without waiting for the server.
manual tasks always get forgotten when things get busy, tbh. i'd rather have it all in the devcontainer setup so everyone is forced to use the same config from day one.



[Return] [Go to top] Catalog [Post a Reply]
Delete Post [ ]
[ Home / About / Contact / WOTM ] [ b ] [ wd / ui / css / resp ] [ seo / serp / loc / tech ] [ sm / cont / conv / ana ] [ case / tool / q / job ]