total_lints 2.17.4 total_lints: ^2.17.4 copied to clipboard
A very strict set of lints.
A very strict set of lints for Dart and Flutter apps.
Concept #
Dart and Flutter come with an analysis tool that points some possible errors and bad styling that can lead to problems. More on this: https://dart.dev/guides/language/analysis-options
However, a lot of beneficial rules are disabled by default. This leads to either coding errors or long linter config that enables individual rules that you copy between projects.
This package is my opinionated choice of rules. Unlike lints and flutter_lints packages that enable specific rules, this package aims to enable all but specific rules. So every rule is enabled unless it was considered and deliberately rejected.
You may use this set a baseline and enable or disable specific rules.
Usage #
-
Add this package under
dev_dependencies
in yourpubspec.yaml
. -
In your
analysis_options.yaml
, replace the default inclusion with a file from this package.
For applications:
include: package:total_lints/app.yaml
For packages:
include: package:total_lints/package.yaml
-
See https://dart.dev/guides/language/analysis-options to disable or enable specific rules.
-
Run analysis with
flutter analyze
.