ADR 0010: Keep autofix governance conservative and rule-local
- Status: Accepted
- Date: 2026-02-28
Contextβ
This plugin includes a mix of report-only rules, suggestion-backed migrations, and a smaller set of safe local autofixes.
The current implementation does not expose custom settings.immutable
runtime toggles, nor does it perform import insertion or other cross-file
rewrite orchestration. Fix policy is decided inside each rule through ordinary
context.report({ fix }) or context.report({ suggest }) behavior.
Decisionβ
Adopt a formal autofix governance model with these constraints:
- Rules should only emit
fixwhen safety is deterministic. - Rules should emit
suggestfor behavior-sensitive migrations. - The plugin should not advertise plugin-wide runtime autofix toggles until a real implementation need exists.
Rationaleβ
- Operational safety: todayβs fixers are small, local text rewrites that can be governed accurately at rule level.
- Predictable rollout: teams can already stage adoption through preset
choice, severity changes, and
--fixusage in CI. - Honest documentation: exposing nonexistent runtime toggles would make setup docs actively misleading.
Consequencesβ
- Fix behavior is intentionally conservative, but implemented rule-by-rule.
- Rule authors must classify fixes as deterministic (
fix) vs contextual (suggest). - Public docs should describe preset choice, rule options, and
--fixusage as the current rollout controls.
Revisit Triggersβ
Re-evaluate if:
- the plugin adds broader rewrite classes that need shared orchestration,
- ESLint introduces stronger first-class fix governance primitives,
- or contributors report a concrete need for plugin-level suppression beyond normal config/severity workflows.