| name | update-dart-lints |
| description | Update Dart/Flutter lints to the latest Dart version, adjust lib/analysis_options.yaml, update CHANGELOG.md, and release the package using the release-pub skill. Use when a new Dart/Flutter version is released or when requested to update lints and publish a release. |
update-dart-lints Skill
This skill automates the process of updating pedantic_mono to support the latest Dart/Flutter release, updating linter rules in lib/analysis_options.yaml, logging updates in CHANGELOG.md, and triggering the release-pub skill to publish a new release.
Reference Links
Workflow Steps
Follow these steps sequentially to perform a lint update and release:
1. Information Gathering & Diff Analysis
-
Check Official Changelogs:
-
Run Linter Diff Tool:
2. Rule Impact Evaluation & User Review (MANDATORY)
Do NOT automatically enable all newly discovered linter rules without evaluation. You must evaluate each new rule for potential drawbacks and consult the user before editing lib/analysis_options.yaml:
-
Analyze Impact & Drawbacks:
- Experimental Rules: Identify if a rule is marked as experimental (e.g.,
use_primary_constructors). Experimental rules often introduce excessive noise or unexpected warnings.
- Strict Mode Rules: Identify if a rule duplicates analyzer options (e.g.,
no_dynamic_casts vs strict-casts: true) or creates excessive friction in day-to-day coding.
- Style & DX Impact: Assess if a rule forces rigid code style changes (e.g.,
empty_container_bodies, use_declaring_parameters) or creates friction with interface implementations (e.g., async_return_with_no_await).
-
Present Table & Consult User:
- Present a clear evaluation table for the user showing each candidate rule, its purpose, impact level (High / Medium / Low / Experimental), and potential drawbacks.
- Ask the user which rules to enable, omit, or keep commented out.
- Wait for explicit user approval on the selected set of rules before updating
lib/analysis_options.yaml.
3. Update Configurations & Code
-
Update pubspec.yaml:
-
Update lib/analysis_options.yaml:
- Add new lints: Add new linter rules under
linter.rules in alphabetical order.
- Remove duplicates: Comment out or remove rules that are already included in
flutter_lints.
- Remove deprecated/deleted lints: Comment out or remove rules that have been removed or deprecated in the new Dart version.
-
Verify Code Quality:
- Run static analysis:
dart analyze
Ensure all errors, warnings, and info-level lints are resolved.
- Run tests:
dart test
Ensure all tests pass.
4. Update CHANGELOG.md
Add a new version entry at the top of CHANGELOG.md following pedantic_mono's conventions:
5. Trigger Release Workflow (release-pub)
Once changes and CHANGELOG.md are prepared and verified:
- Trigger the
release-pub skill workflow to handle release publishing.
- Ensure pre-release dry-run passes:
dart pub publish --dry-run
- Request confirmation from the user before tagging and committing.
- Execute release git operations and GitHub release creation as defined in
release-pub.