lints
6.1.0, released 10 months ago by dart.dev
Official Dart team lint rules for core and recommended static analysis settings.
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.yamlAlternatives
Packages that do the same job and could replace lints.
- very_good_analysis
Lint rules for Dart and Flutter used internally at Very Good Ventures.
91Compare - mews_pedantic
Dart and Flutter static analysis and lint rules incorporated in Mews.
75Compare - netglade_analysis
Lint rules for Dart and Flutter used internally at netglade
69Compare - pedantic_mono
Recommended lints for Flutter apps, packages, and plugins to encourage good coding practices.
85Compare
Works with
Packages commonly used together with lints: ones it builds on, ones built on it, and its own family.
- flutter_lintsBuilt on lintsProvides the recommended set of Flutter lint rules for static analysis.
- panaBuilt on lintsProduce a report summarizing the health and quality of a Dart package
- dart_mcp_serverBuilt on lintsAn MCP server for Dart projects, exposing developer tools to AI models.
- kosher_dartBuilt on lintsDart library for calculating Jewish calendar dates and halachic times.
- serverpod_auth_clientBuilt on lintsClient authentication library for Serverpod backends.
- flame_lintBuilt on lintsA strict and satisfying lint package for Flame, Flutter, or Dart projects.
- rexios_lintsBuilt on lintsA collection of Dart and Flutter lint rules to enforce consistent, safe code.
- analysis_lintsBuilt on lintsUnified lint rules for Flutter and Dart projects