import{distance as n}from"../../fastest-levenshtein/esm/mod.mjs";import{SEVERITY_ERROR as e}from"./constants.mjs";import t from"./rules/index.mjs";const o=new Map;function r(r,s,i){const f=o.has(r)?o.get(r):function(e){const o=Array.from({length:6});for(let n=0;n<o.length;n++)o[n]=[];for(const r of Object.keys(t)){const t=n(r,e);t<=6&&o[t-1].push(r)}let r=[];for(const[n,e]of o.entries())if(e.length>0){if(n<3)return e.slice(0,3);r=r.concat(e)}return r.slice(0,3)}(r);o.set(r,f),i.warn(function(n,e=[]){return`Unknown rule ${n}.${e.length>0?` Did you mean ${e.join(", ")}?`:""}`}(r,f),{severity:e,rule:r,node:s,index:0})}export{r as default};