Made some notes on auto-formatting YAML files using yamlfmt (the YAML equivalent of Black and Prettier)

https://til.simonwillison.net/yaml/yamlfmt

Auto-formatting YAML files with yamlfmt

I decided to see if there was an equivalent of Black or Prettier for YAML files. I found yamlfmt from Google.

@simon Looks like something worth trying in pre-commit, though I’ve also found prettier’s YAML formatting perfectly acceptable.

@adamchainz @simon I came here to say this too.

pre-commit is 100% worth learning. A nice bonus is that it'll manage installing/updating/upgrading ruff, black, and others so that you don't have to anymore.

Plus, you get auto-formatting for free(ish).

I would put it on my "stop what you are doing and learn it today" list if you were asking 😄

@webology @adamchainz @simon anything else to add to the "stop what you are doing and learn it today" list?

Asking for a friend

@mucio @adamchainz @simon I would put just/justfiles on that list too because it's the best parts of Make (that I like), but it works anywhere. https://github.com/casey/just

Several years ago, I standardized my project workflows so getting back up to speed or making quite fixes is easy peasy with it.

GitHub - casey/just: 🤖 Just a command runner

🤖 Just a command runner. Contribute to casey/just development by creating an account on GitHub.

GitHub

@mucio (- letting Adam and Simon off at that last stop)

I would consider TailwindCSS's typography aka "prose" plugin to be one hell of a life hack too. https://tailwindcss.com/docs/typography-plugin

It's one CSS class you add and it totally transforms your page. I use it with markdown on a ton of projects.

I struggled with it until I realized I could undo/customize it too. Now I use it everywhere.

https://tailwindcss.com/docs/typography-plugin#undoing-typography-styles

@tailwindcss/typography - Tailwind CSS

Beautiful typographic defaults for HTML you don't control.