diff --git a/.husky/commit-msg b/.husky/commit-msg new file mode 100755 index 00000000..0f679104 --- /dev/null +++ b/.husky/commit-msg @@ -0,0 +1,5 @@ +#!/usr/bin/env sh +. "$(dirname -- "$0")/_/husky.sh" + +# https://github.com/hyiso/commitlint/issues/6 +sed "s/^fixup! //" < "$1" | dart run commitlint_cli diff --git a/pubspec.yaml b/pubspec.yaml index cb4afeff..0d88afb6 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -6,4 +6,5 @@ environment: dev_dependencies: commitlint_cli: ^0.4.1 fvm: ^2.4.1 + husky: ^0.1.6 melos: ^3.1.0 diff --git a/tool/setup.sh b/tool/setup.sh index c092d266..f92e2636 100755 --- a/tool/setup.sh +++ b/tool/setup.sh @@ -6,3 +6,4 @@ dart pub global activate melos 3.1.0 dart pub global activate fvm 2.4.1 echo "y" | fvm install melos exec --concurrency=1 flutter pub get +dart run husky install