GeistHaus
log in · sign up

Husky

typicode.github.io

Git hooks made easy

28 pages link to this URL
Defensive Commits

Defensive Commits are a strategy for pushing commit to upstream repos that runs part of the ci/cd pipeline locally using git hooks. It fails the hook fails. This allows you to catch integration errors and get feedback quickly. This strategy works best with trunk-based development and ci/cd teams, because it helps avoid breaking the build and reduces dumb mistakes from even being pushed up to main. At Coqui Health, we’ve implemented this strategy successfully and this is now the default way we work. We use a monorepo strategy coupled with ci/cd and trunk-based development, which means we work close to or in trunk and so having a robust ci/cd pipeline is paramount. Defensive commits allows us to catch bugs early and get feedback that our code will work or break things. It’s allowed us to move faster and not break things.

0 inbound links en bloghomepagetechnologygotechgolangopiniongitcicontinuous delivery
Getting Started with Git Hooks and Husky

In this fun tutorial, let's see how Git hooks work by creating 5 different hooks with Husky, a popular JavaScript package.

1 inbound link article en gitmacclientguigit clientgit appgit guivcsversion control
Applying accessibility fixes with stealth for the greater good

This is not an article that Steve, the author, thinks should exist in a healthy industry, but the shape of our industry — especially right now — makes this sort of article very necessary and hopefully helpful to you in your job.

2 inbound links website en
HowToTestFrontEnd

Here are some tools and libraries that are really useful for your frontend app. You should at least be aware of them so when you need them, you know what tool to look for.

How to set up Prettier On a Laravel App, Linting Tailwind Class Order and More

It may seem silly, but it's important to me that my Tailwind classes are orderedly consistently, and I don't want to have to manage that manually. Frustratingly, I've never found a solution that gives me exactly what I want—until now. Here's my must-have list: Works in CLI/Continuous Integration (Rustywind would work here, but not Headwind) Works in all IDEs (so Headwind doesn't cut it, and Rustywind would require work to adapt) Uses Tailwind's official ordering specifications (again, Headwind/Rustywind would require work to get here) Works on Laravel Blade files I've asked on Twitter multiple times, and the most recent time I asked, I got a response from my friend Jason Beggs suggesting I should look into prettier-plugin-blade. So I set out, with Jason's help, to get it working on a new Laravel app, later receiving some help from the tools' creator, John. What I found is that the ideal solution to my wish list above is using prettier-plugin-blade together with Tailwind's official Prettier plugin. It works on CI and the CLI, has IDE integrations, works in Blade files, and uses Tailwind's official class ordering. Let's dig in! The installation Install prettier, prettier-plugin-tailwindcss, and prettier-plugin-blade with npm install npm install --save-dev prettier-plugin-blade@^2 prettier prettier-plugin-tailwindcss Add a .prettierrc config file to your project root Here is the most basic file you'll start with, before you start actually configuring Prettier: { "plugins": ["prettier-plugin-blade", "prettier-plugin-tailwindcss"], "overrides": [ { "files": [ "*.blade.php" ], "options": { "parser": "blade" } } ] } On top of this, you can add your own lines to configure Prettier; here are those I've added, but you can find more here. { "printWidth": 120, "semi": true, "singleQuote": true, "tabWidth": 4, "trailingComma": "all", "plugins": ["prettier-plugin-blade", "prettier-plugin-tailwindcss"], "overrides": [ { "files": [ "*.blade.php" ], "options": { "parser": "blade" }

0 inbound links article en
📝 Web Development Technologies

I'm a webdeveloper and I have found that I use a lot of different technologies. To put it into perspective, I thought I would make a list of all the technologies, tools, frameworks, libraries, languages, stacks, services, etc., that I've personally used at some point in my career. 🔣 Languages & Protocols

0 inbound links article en
Setting up pre-commit hook with Lefthook

I was looking into setting up Husky + lint-staged for a new Deno library that I recently open-sourced, when I came across a project called Lefthook. Unlike the duo, this is a single Go binary which can manage git hooks and run commands against staged files. Also unlike the duo, this is agnostic of the project language and doesn’t require having a package.json file. This intrigued me—two birds with one stone and all that.

0 inbound links article en notes denolefthookgit
One Decade Later: Revisiting Five Front-End Kung Fu Moves

Exactly ten years ago, I gave a talk at the SF JavaScript meetup titled 5 Kung Fu Moves for Front-End Heroes. A full decade later, I found myself wondering: are these techniques still the secret sauce for modern front-end engineering, or have they been rendered obsolete by time?

0 inbound links article en