ADR 0001: Do not adopt @eslint/plugin-kit for rule/runtime internals
- Status: Accepted
- Date: 2026-02-22
Context
The repository currently uses small, focused local utilities to build and maintain rule behavior:
src/util/rule.tsfor shared rule creation, canonical docs URLs, and typed node lookup.src/util/typeguard.tsandsrc/util/tree.tsfor reusable AST and traversal helpers.src/configs/*.tsplussrc/plugin.tsfor preset assembly and runtime export wiring.
@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 the current
rule/preset architecture in this repository.
Decision
Do not adopt @eslint/plugin-kit in this plugin at this time.
Rationale
- No direct capability overlap with this repository's highest-value local
utilities (
createRule(...), docs URL normalization, and narrow AST helper modules). - 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 local abstractions in
src/util/*,src/configs/*, andsrc/plugin.ts. - Continue targeted hardening/tests around rule logic and preset layering.
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.