import{isString as e,isRegExp as t}from"../../utils/validateTypes.mjs";import{atKeywords as s}from"../../reference/atKeywords.mjs";import r from"../../utils/isStandardSyntaxAtRule.mjs";import o from"../../utils/optionsMatches.mjs";import n from"../../utils/report.mjs";import a from"../../utils/ruleMessages.mjs";import i from"../../utils/validateOptions.mjs";import u from"../../utils/vendor.mjs";const l="at-rule-no-unknown",m=a(l,{rejected:e=>`Unexpected unknown at-rule "${e}"`}),p=(a,p)=>(f,c)=>{if(!i(c,l,{actual:a},{actual:p,possible:{ignoreAtRules:[e,t]},optional:!0}))return;const d=c.stylelint.config?.languageOptions?.syntax?.atRules||{},g=new Set(Object.keys(d));f.walkAtRules(e=>{if(!r(e))return;const t=e.name;if(g.has(t))return;if(o(p,"ignoreAtRules",e.name))return;if(u.prefix(t)||s.has(t.toLowerCase()))return;const a=`@${t}`;n({message:m.rejected,messageArgs:[a],node:e,ruleName:l,result:c,word:a})})};p.ruleName=l,p.messages=m,p.meta={url:"https://stylelint.io/user-guide/rules/at-rule-no-unknown"};export{p as default};