Skip to content

Commit

Permalink
Setup git hooks
Browse files Browse the repository at this point in the history
  • Loading branch information
dhafinrayhan committed Nov 8, 2023
1 parent d478114 commit 8a4ba7a
Show file tree
Hide file tree
Showing 3 changed files with 49 additions and 0 deletions.
4 changes: 4 additions & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"

dart run lint_staged
40 changes: 40 additions & 0 deletions pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,22 @@ packages:
url: "https://pub.dev"
source: hosted
version: "0.11.3"
ansi:
dependency: transitive
description:
name: ansi
sha256: "070af96189f9da6f996cee46049682bdcd1d191b483e13f9d2a2600729d8b2a1"
url: "https://pub.dev"
source: hosted
version: "0.4.2"
ansi_escapes:
dependency: transitive
description:
name: ansi_escapes
sha256: e2a111254904ff663b8d4be744073f7e327157c895a0ad57ad8de7938297bc8c
url: "https://pub.dev"
source: hosted
version: "1.1.0"
archive:
dependency: transitive
description:
Expand Down Expand Up @@ -408,6 +424,14 @@ packages:
url: "https://pub.dev"
source: hosted
version: "4.0.2"
husky:
dependency: "direct dev"
description:
name: husky
sha256: "69a52b079786cb5d21da0e985d57016c3e3d7876cb62df40cf4dd5fc51212df5"
url: "https://pub.dev"
source: hosted
version: "0.1.6"
image:
dependency: transitive
description:
Expand Down Expand Up @@ -448,6 +472,14 @@ packages:
url: "https://pub.dev"
source: hosted
version: "6.7.1"
lint_staged:
dependency: "direct dev"
description:
name: lint_staged
sha256: "6d3bd039cd8b02fe739027369d89286216a964ba9e398fa55f2cd81e6d94a48b"
url: "https://pub.dev"
source: hosted
version: "0.4.2"
lints:
dependency: transitive
description:
Expand Down Expand Up @@ -749,6 +781,14 @@ packages:
url: "https://pub.dev"
source: hosted
version: "2.1.4"
verbose:
dependency: transitive
description:
name: verbose
sha256: "8e63580e35d58a15e4fca702fe91766430b1d28738c160c466e5cb10c373002a"
url: "https://pub.dev"
source: hosted
version: "0.1.1"
vm_service:
dependency: transitive
description:
Expand Down
5 changes: 5 additions & 0 deletions pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,9 @@ dev_dependencies:
flutter_test:
sdk: flutter
freezed: ^2.4.5
husky: ^0.1.6
json_serializable: ^6.7.1
lint_staged: ^0.4.2
riverpod_generator: ^2.3.5
riverpod_lint: ^2.3.3

Expand All @@ -46,3 +48,6 @@ flutter_launcher_icons:
image_path: assets/images/launcher.png
adaptive_icon_background: "#FFFFFF"
adaptive_icon_foreground: assets/images/launcher-fg.png

lint_staged:
'lib/**.dart': dart format --fix

0 comments on commit 8a4ba7a

Please sign in to comment.