Skip to content
pubscout

lints

6.1.0, released 10 months ago by dart.dev

Official Dart team lint rules for core and recommended static analysis settings.

WASM-readyRock solid
$ flutter pub add lints
Source repository

What it does

Defines static analyzer rules for identifying potential bugs, typing issues, and formatting problems in Dart source code. It includes two distinct lint sets: core lints and recommended lints.

AI-written summary of version 6.1.0, based on the package's README and metadata. Report an inaccuracy

Use it when

  • You are starting a new Dart project and want standard team-recommended lints enabled.
  • You want to ensure your package meets community standards for pub.dev points.
  • You want to enforce consistent coding style and catch code issues early via static analysis.

Skip it when

  • You require custom or strict rule sets beyond the standard core and recommended options.
  • You are using Flutter-specific rule sets where package:flutter_lints might be preferred.

Strengths

  • Official rules maintained directly by the Dart team.
  • Enabled by default in new projects created via 'dart create'.
  • Helps improve pub.dev scoring based on passing core lints.

Weaknesses

  • Limited to core and recommended sets without a strict rule set option from the authors.
  • Requires manual configuration in an analysis_options.yaml file for existing projects.

Setup

Kind
Pure Dart
Effort
Low
Code generation
No
Direct dependencies
0

Add to dev_dependencies and include the lint set in an analysis_options.yaml file.

include: package:lints/recommended.yaml

Alternatives

Packages that do the same job and could replace lints.

Works with

Packages commonly used together with lints: ones it builds on, ones built on it, and its own family.