saropa_lints 0.1.0
saropa_lints: ^0.1.0 copied to clipboard
1,000+ custom lint rules for Flutter and Dart. The most comprehensive lint package available. Free and open source. 5 tiers from Essential to Insanity.
saropa_lints #
1,000+ lint rules for Flutter and Dart. Free. Open source. No catch.
DCM wants $10/month per developer. We're giving you 5x the rules for FREE. Forever.
Why Saropa Lints? #
| Package | Rules | Cost |
|---|---|---|
| flutter_lints | ~30 | Free |
| very_good_analysis | ~100 | Free |
| DCM | ~200 | $10/dev/month |
| saropa_lints | 1,000+ | Free |
Quick Start #
1. Add dependencies #
# pubspec.yaml
dev_dependencies:
custom_lint: ^0.8.0
saropa_lints: ^0.1.0
2. Enable custom_lint #
# analysis_options.yaml
analyzer:
plugins:
- custom_lint
3. Choose your tier #
# analysis_options.yaml
include: package:saropa_lints/tiers/recommended.yaml
4. Run the linter #
dart run custom_lint
The 5 Tiers #
Pick the tier that matches your team:
| Tier | Rules | Best For |
|---|---|---|
| Essential | ~50 | Every project. Prevents crashes, memory leaks, security holes. |
| Recommended | ~150 | Most teams. Adds performance, accessibility, testing basics. |
| Professional | ~350 | Enterprise. Adds architecture, documentation, comprehensive testing. |
| Comprehensive | ~700 | Quality obsessed. Best practices everywhere. |
| Insanity | ~1000 | Greenfield projects. Every single rule. |
Using a tier #
# analysis_options.yaml
# Pick ONE of these:
include: package:saropa_lints/tiers/essential.yaml
include: package:saropa_lints/tiers/recommended.yaml # Most teams start here
include: package:saropa_lints/tiers/professional.yaml
include: package:saropa_lints/tiers/comprehensive.yaml
include: package:saropa_lints/tiers/insanity.yaml
Customizing rules #
After including a tier, you can enable or disable specific rules:
include: package:saropa_lints/tiers/recommended.yaml
custom_lint:
rules:
# Disable a rule from the tier
avoid_hardcoded_strings_in_ui: false
# Enable a rule from a higher tier
require_public_api_documentation: true
Rule Categories #
| Category | Description |
|---|---|
| Flutter Widgets | Lifecycle, setState, keys, performance |
| State Management | Provider, Riverpod, Bloc patterns |
| Performance | Build optimization, memory, caching |
| Security | Credentials, encryption, input validation |
| Accessibility | Screen readers, touch targets, semantics |
| Testing | Assertions, mocking, flaky test prevention |
| Architecture | Clean architecture, DI, SOLID principles |
| Error Handling | Exceptions, logging, recovery |
| Async | Futures, Streams, cancellation |
| API & Network | Timeouts, retries, caching |
| Internationalization | Localization, RTL, plurals |
| Documentation | Public API, examples, deprecation |
Performance Warning #
Running all 1000 rules can use significant RAM.
The tiers are designed to manage this:
- Rules set to
falseare not loaded - Start with
essentialorrecommendedtier - Upgrade gradually as you fix warnings
# GOOD: Start with recommended tier
include: package:saropa_lints/tiers/recommended.yaml
# BAD: Enabling everything at once on a legacy codebase
include: package:saropa_lints/tiers/insanity.yaml # May show 50,000+ warnings
Adoption Strategy #
New Projects #
Start with professional or comprehensive tier. Fix issues as you write code.
Existing Projects #
- Week 1: Enable
essentialtier. Fix critical issues (~50-200 warnings). - Weeks 2-4: Enable
recommendedtier. Fix as you touch files. - Month 2+: Enable
professionaltier. Fix opportunistically.
Suppressing Warnings #
When a rule doesn't apply to specific code:
// ignore: avoid_hardcoded_strings_in_ui
const debugText = 'DEBUG MODE';
// For entire files:
// ignore_for_file: avoid_print_in_production
Always add a comment explaining why you're suppressing.
IDE Integration #
Works automatically in:
- VS Code with Dart extension
- Android Studio / IntelliJ with Dart plugin
- Command line via
dart run custom_lint
Issues appear as you type with quick-fix suggestions.
Contributing #
We welcome contributions! See CONTRIBUTING.md for guidelines.
Adding a new rule #
- Create rule in appropriate
lib/src/rules/*.dartfile - Add to the appropriate tier(s) in
lib/tiers/*.yaml - Add tests in
test/rules/*_test.dart - Update CHANGELOG.md
Professional Services #
The rules are free. We offer paid services for teams that need help:
| Service | Description |
|---|---|
| Reports | Full codebase analysis with prioritized findings |
| Remediation | We fix the issues for you |
| Custom Rules | Rules specific to your codebase |
| Training | Team workshops on code quality |
Contact: saropa.com
License #
MIT License - see LICENSE for details.
Free to use, modify, and distribute. No attribution required.