Rule Creation Checklist
If you're creating a new lint rule and lints are not appearing in the IDE of an example project, you can follow this checklist for requirements.
Description | Examples | Lints Available |
---|---|---|
Rule has a unique RuleCode ID in snake_case | LintCode('avoid_edge_insets_literal') | ✅ |
The Rule's ClassName is the PascalCase equivalent of the RuleCode ID | class AvoidEdgeInsetsLiteral extends LintRule {...} | ✅ |
The code.package value matches the name given to the rule package | LintCode(..., package: 'design_system_lints') | ✅ |
Lint Rule is exported from lib/<package_name>.dart | 🚧 |
It's recommended that you use the lints included in package:sidecar_lints
to enforce the above rules
on your Sidecar-based rule package.