This package provides a set of lint rules for Dart and Flutter projects from Sua Música; providing a standard for code style, quality and consistent rules between internal and external projects.
All rules can be found in the Linter rules section from Dart documentation; in this case, we use a part of them.
Add this package to your dev_dependencies
in your pubspec.yaml
:
dev_dependencies:
sm_linter: ^1.0.0
Or run the following command:
# flutter
flutter pub add --dev sm_linter
# dart
dart pub add --dev sm_linter
And the following to your analysis_options.yaml
:
include: package:sm_linter/analysis_options.yaml
To suppress a rule, add the following comment to the line you want to suppress:
// ignore: rule_name - to suppress a single line
// ignore_for_file: rule_name - to suppress a whole file