These hooks use the built in formatting and linting tools provided by the Dart SDK.
Add the following to your .pre-commit-config.yaml
file:
repos:
- repo: https://github.com/jkerola/dart-precommit-hooks
rev: v1.0.0
hooks:
- id: dart-analyze
- id: dart-format
Including and excluding files is supported:
repos:
- repo: https://github.com/jkerola/dart-precommit-hooks
rev: v1.0.0
hooks:
- id: dart-analyze
files: lib/* # defaults to all .dart files
exclude: bin/* # nothing is excluded by default