husky
0.1.7, released 3 years ago by an unverified publisher
Manage git hooks easily for your Dart and Flutter projects.
What it does
Husky makes it easy to manage git hooks for Dart and Flutter projects, allowing you to run tests, lint code, or check commit messages upon commit or push. It uses the modern Git feature core.hooksPath and supports macOS, Linux, and Windows.
AI-written summary of version 0.1.7, based on the package's README and metadata. Report an inaccuracy
Use it when
- You want to enforce code linting or formatting before commits
- You want to automatically run tests before pushing code
Skip it when
- Your project does not use Git
- You prefer manual hook management inside .git/hooks
Strengths
- Easy installation and setup via Dart commands
- Cross-platform support for macOS, Linux, and Windows
- Supports monorepos and custom directories
Weaknesses
- Relies on shell scripts which require Git and a proper environment on Windows
Setup
- Kind
- Pure Dart
- Effort
- Low
- Code generation
- No
- Direct dependencies
- 2
Add husky to dev_dependencies and run `dart run husky install`.
dart pub add --dev husky
dart run husky install
dart run husky add .husky/pre-commit "dart test"Alternatives
Packages that do the same job and could replace husky.
- flutter_hooks_lint_plugin
A Dart analyzer plugin providing lint rules for flutter_hooks.
56Compare - git_hooks
Prevent bad git commit or push using Dart and Flutter, similar to Husky.
48Compare - lint_staged
Run linters and custom commands on git staged files for Flutter and Dart projects
44Compare - dlcov
A CLI tool to verify code coverage thresholds in CI/CD and git hooks.
43Compare
Works with
Packages commonly used together with husky: ones it builds on, ones built on it, and its own family.