Skip to content

Commit dfe70bf

Browse files
committed
chore: use lint_staged
1 parent 2699252 commit dfe70bf

File tree

3 files changed

+10
-4
lines changed

3 files changed

+10
-4
lines changed

.husky/pre-commit

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
11
#!/usr/bin/env sh
22
. "$(dirname -- "$0")/_/husky.sh"
33

4-
melos analyze
5-
melos format-check
6-
melos test --no-select
4+
DEBUG=true dart run lint_staged

.husky/pre-push

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
#!/usr/bin/env sh
2+
. "$(dirname -- "$0")/_/husky.sh"
3+
4+
melos test --no-select

pubspec.yaml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,11 @@ dev_dependencies:
1111
melos: ^3.0.0
1212
path: ^1.8.0
1313
yaml: ^3.1.0
14+
lint_staged: ^0.2.0
1415

1516
# This allows us to use flutterw on itself during development.
1617
executables:
17-
flutterw: flutterw_local
18+
flutterw: flutterw_local
19+
20+
lint_staged:
21+
'**.dart': dart fix --apply && dart format --fix

0 commit comments

Comments
 (0)