TIL: Creating a Rustywind pre-commit hook
Thanks to Adam Johnson’s pre-commit: How to create hooks for unsupported tools. I created a pre-commit hook for rustywind, which is a CLI tool that organizes, lints, and sorts Tailwind CSS classes.
If you are comfortable with pre-commit, this should be a copy and paste for you to have nicely formatted Tailwind CSS linting/auto-formatting.
# .pre-commit-config.yaml repos: - repo: local hooks: - id: rustywind name: rustywind Tailwind CSS class linter language: node additional_dependencies: - [email protected] entry: rustywind args: [--write, templates] types_or: [html]