Skip to content

Configuration

Add many_lints to the top-level plugins section in your analysis_options.yaml file (NOT under analyzer:):

plugins:
many_lints: ^0.4.0

The analysis server will automatically download and resolve the plugin from pub.dev. There is no need to add it to your pubspec.yaml.

Requires Dart 3.10+ (Flutter 3.38+)

You can use the extended syntax to pin a version:

plugins:
many_lints:
version: ^0.4.0

For local development or when using many_lints from a cloned repository, use the path option:

Terminal window
git clone https://github.com/Nikoro/many_lints.git /path/to/many_lints
plugins:
many_lints:
path: /path/to/many_lints

All 100 rules are registered as warnings and enabled by default. You can enable or disable individual rules under the diagnostics key:

plugins:
many_lints:
version: ^0.4.0
diagnostics:
prefer_center_over_align: true
use_bloc_suffix: false

To suppress a specific lint, use comments:

// ignore: many_lints/prefer_center_over_align
const Align(...);
// ignore_for_file: many_lints/use_bloc_suffix

VS Code: Open the command palette (Cmd+Shift+P / Ctrl+Shift+P) and run Dart: Restart Analysis Server.

Android Studio / IntelliJ: Go to File → Invalidate Caches / Restart, or use the Dart Analysis panel to restart.