File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ ---
2+ " @objectstack/lint " : patch
3+ ---
4+
5+ fix(lint): consolidate the four hand-copied "Did you mean?" helpers into ` object-graph.ts ` 's shared ` nearestName ` /` suggestName ` (#14268 )
6+
7+ ` validate-object-references.ts ` , ` validate-sortable-fields.ts ` and
8+ ` validate-widget-bindings.ts ` each carried a private ` suggest ` /` distance ` (or
9+ ` didYouMean ` /` levenshtein ` ) pair, byte-for-byte re-deriving the same
10+ edit-distance budget ` object-graph.ts ` already exported on the package barrel
11+ as ` nearestName ` /` suggestName ` — the same drift #4330 fixed one constant over
12+ for ` SYSTEM_FIELDS ` . All three now import ` suggestName ` (and ` nearestName `
13+ where a rule needs the bare name) from ` ./object-graph ` and their private
14+ copies are deleted.
15+
16+ The one decision the consolidation forced: ` validate-widget-bindings.ts `
17+ scored a containment match (e.g. ` amount ` → ` sum_amount ` , the ADR-0021
18+ base-column → prefixed-measure-name drift) ahead of edit distance; the other
19+ two rules had no such pre-pass and suggested nothing for the same class of
20+ typo. That containment pre-pass is now ` nearestName ` 's behaviour for every
21+ caller — it only ever * adds* a suggestion where the edit-distance budget
22+ previously returned none, so a "Did you mean?" hint may now appear where one
23+ was previously absent. The full ` @objectstack/lint ` suite (93 files / 2812
24+ tests) was run against the pre-change and post-change trees and produced
25+ identical results, so no existing suggestion assertion was affected in
26+ practice.
You can’t perform that action at this time.
0 commit comments