Lintervention

melos lints by lintervention

Effective lint rules used internally by whynotmake.it. Based on very_good_analysis, with some customizations, that make more sense for our workflows.

Installation 💻

❗ In order to start using Lintervention you must have the Dart SDK installed on your machine.

Install via dart pub add:

dart pub add dev:lintervention

or

flutter pub add dev:lintervention

Then, add an include in analysis_options.yaml:

include: package:lintervention/analysis_options.yaml

if you want to always use the latest version. If not, constrain the version:

include: package:lintervention/analysis_options.0.1.0.yaml

Why the changes? 🤔

We love the rules from very_good_analysis, but we wanted to make some changes to make it more suitable for our workflows. Here are the changes we made:

  • No prefer_single_quotes, since not all of our devs use US keyboard layouts, and it's not easier to type single quotes on most other layouts. Instead, we gain the benefit of never having to think about whether to use single or double quotes. We also don't have to worry about escaping quotes in strings.
  • Allow one_member_abstracts, since sometimes we need to define interfaces in the domain layer that need to be implemented in the data layer. They should be allowed even with one member. Top level functions don't work for this usecase.
  • We also exclude a bunch of generated file types from the lint rules.

Libraries

lintervention
Effective lint rules used internally by whynotmake.it. Based on very_good_analysis.