lint-and-style-config

Configures strict Dart analysis_options.yaml with promoted error rules and CI lint gates.

Updated Aug 22, 2026
One-click install
npx skills add https://github.com/zakariaf/NearlyStop --skill lint-and-style-config-zakariaf
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: lint-and-style-config
Source: https://github.com/zakariaf/NearlyStop/tree/main/.claude/skills/lint-and-style-config
Command: npx skills add https://github.com/zakariaf/NearlyStop --skill lint-and-style-config-zakariaf

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve? A misconfigured Dart analyzer can silently disable every lint rule while the build stays green, letting dropped Futures, swallowed exceptions, and resource leaks ship unnoticed. This Skill enforces a strict, verified analysis_options.yaml so silence-producing bug classes become build-failing errors. ## Core Features & Use Cases - Strict baseline config: Ships a ready-to-copy analysis_options.yaml built on a version-pinned very_good_analysis include, promoting rules like unawaited_futures, discarded_futures, use_build_context_synchronously, close_sinks, and exhaustive_cases to error. - Trap detection: Teaches the include-pin trap (a missing pinned file disables all rules), the errors-re-ranks-vs-linter-enables mechanic, and the sealed-switch analyze-vs-compile gap that demands CI builds rather than analyze-only gates. - Verification scripts: Provides verify-include-pin.sh to confirm the pinned include resolves in the pub cache and lint-gates.sh to run format, analyze, and grep bans before a PR. - Use Case: When bumping the Dart SDK or very_good_analysis version, use this Skill to update the pinned include in the same commit, verify a known violation still errors, and keep coverage excludes mirrored. ## Quick Start Ask the AI to review or generate a strict analysis_options.yaml for your Flutter package using the lint-and-style-config skill and verify the pinned include resolves.

Frequently Asked Questions about lint-and-style-config

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I set up a strict analysis_options.yaml for Flutter?

Include the version-numbered very_good_analysis file, then promote silence-producing rules like unawaited_futures, discarded_futures, and use_build_context_synchronously to error under analyzer: errors. Run dart analyze with --fatal-infos --fatal-warnings in CI.

Why does my Dart analyzer pass with zero lint findings?

A missing pinned include file triggers only an include_file_not_found warning, and analysis then runs with zero rules. Verify the referenced file exists in the pub cache and confirm a known violation still errors after any version bump.

What is the difference between analyzer errors and linter rules in Dart?

The errors block only re-ranks the severity of diagnostics the linter already produces; it cannot enable a rule that is off. To enable a rule the base ruleset omits, add it under linter: rules first, then optionally promote it.

Does riverpod_lint 3.x require custom_lint?

No. riverpod_lint 3.x runs on the first-party analysis_server_plugin system, so its diagnostics fire on a plain flutter analyze. Adding custom_lint is discouraged because the legacy plugin system is deprecation-bound.

Why is analyze-only CI not enough for Dart sealed classes?

A non-exhaustive switch over a sealed class is a compile error, not a lint, and an errors override cannot reliably suppress it. Code can pass dart analyze yet fail dart compile, so CI must build the project, not merely analyze it.

When should I use ignore_for_file in Dart?

Never on a promoted safety rule, because file scope leaves the next edit unprotected. Suppressions should be line-scoped with a written reason, and fixing the code is always preferred over silencing the lint.