Browse Source

feat(tool): Add husky for git hooks

pull/468/head
jld3103 1 year ago
parent
commit
0b98204e4a
No known key found for this signature in database
GPG Key ID: 9062417B9E8EB7B3
  1. 5
      .husky/commit-msg
  2. 1
      pubspec.yaml
  3. 1
      tool/setup.sh

5
.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

1
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

1
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

Loading…
Cancel
Save