hyiso / lint_staged

Run linters on git staged files for your Flutter and Dart projects. Inspired by JavaScript lint-staged library
https://pub.dev/packages/lint_staged
Apache License 2.0
6 stars 2 forks source link

Help with pubspec.yaml #16

Closed Bojan227 closed 2 months ago

Bojan227 commented 2 months ago
"lib/**.dart": dart format --fix && dart fix --apply && dart analyze --fatal-infos --fatal-warnings

Is it possible to auto-fix the staged files and don't receive any lint error from analyze? With the current line I'm still receiving failing lint step. Thank you!

hyiso commented 2 months ago

dart fix will auto fix issues that can be fixed. If you want to ignore lint error, you can either remove && dart analyze --fatal-infos --fatal-warnings or modify analysis_options.yaml to disable rules that you do not need.