ADR 0001: Do not adopt @eslint/plugin-kit for rule/runtime internals
- Status: Accepted
- Date: 2026-02-22
Context
The repository currently uses custom internal utilities to build and maintain rule behavior:
src/_internal/typed-rule.tsfor typed rule creation and parser service/type-checker access.src/_internal/scope-variable.tsandsrc/_internal/member-call.tsfor rule-local scope and call-expression analysis.src/_internal/value-rewrite-autofix-safety.tsandsrc/_internal/type-predicate-autofix-safety.tsfor guarded rewrite decisions.
@eslint/plugin-kit (per package README) provides utilities focused on:
ConfigCommentParserDirectiveVisitNodeStep/CallMethodStepTextSourceCodeBase
These are primarily for implementing custom language/source-code plumbing (directive parsing, traversal, SourceCode-like behavior), not for rule-level cleanup analysis or safe rewrite orchestration.
Decision
Do not adopt @eslint/plugin-kit in this plugin at this time.
Rationale
- No direct capability overlap with this repository's highest-complexity internals (typed rule services, lifecycle matcher helpers, and cleanup-safe rewrite decisions).
- Would not reduce maintenance burden in currently hand-rolled areas.
- Would add dependency and migration surface without meaningful DX/perf/correctness gains.
Consequences
- Keep existing internal abstractions in
src/_internal/*. - Continue targeted hardening/tests around cleanup matcher and autofix-safety behavior.
Revisit Triggers
Re-evaluate adoption if we add custom language support requiring:
- custom
SourceCode#traverse()step modeling, - custom disable directive parsing/representation,
- or other infrastructure directly using
Directiveand traversal step abstractions.