diff --git a/.husky/commit-msg b/.husky/commit-msg new file mode 100644 index 0000000..48ebb93 --- /dev/null +++ b/.husky/commit-msg @@ -0,0 +1,4 @@ +#!/usr/bin/env sh +. "$(dirname -- "$0")/_/husky.sh" + +dart run commitlint_cli --edit "$1" diff --git a/commitlint.yaml b/commitlint.yaml new file mode 100644 index 0000000..0305f52 --- /dev/null +++ b/commitlint.yaml @@ -0,0 +1,18 @@ +include: package:commitlint_cli/commitlint.yaml + +rules: + type-case: + - 2 + - 'always' + - 'lower-case' + type-enum: + - 2 + - 'always' + - [ + 'feat', + 'fix', + 'docs', + 'refactor', + 'test', + 'chore' + ] \ No newline at end of file diff --git a/pubspec.yaml b/pubspec.yaml index 9175393..f421ca3 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -11,5 +11,7 @@ dependencies: # path: ^1.8.0 dev_dependencies: + commitlint_cli: ^0.7.1 + husky: ^0.1.7 lints: ^4.0.0 test: ^1.24.0