import{k as r}from"../../../../../_virtual/index21.mjs";import{isRule as e,isAtRule as t}from"../../utils/typeGuards.mjs";import{isString as o,isRegExp as s,isBoolean as i}from"../../utils/validateTypes.mjs";import n from"../../utils/findNodeUpToRoot.mjs";import m from"../../utils/isCustomProperty.mjs";import u from"../../utils/isDescriptorDeclaration.mjs";import a from"../../utils/isStandardSyntaxDeclaration.mjs";import l from"../../utils/isStandardSyntaxProperty.mjs";import p from"../../utils/optionsMatches.mjs";import f from"../../utils/report.mjs";import c from"../../utils/ruleMessages.mjs";import d from"../../utils/validateOptions.mjs";import j from"../../utils/vendor.mjs";const g="property-no-unknown",y=c(g,{rejected:r=>`Unexpected unknown property "${r}"`}),x=(c,x)=>{const k=new Set(r.all);return(r,w)=>{if(!d(w,g,{actual:c},{actual:x,possible:{ignoreProperties:[o,s],checkPrefixed:[i],ignoreSelectors:[o,s],ignoreAtRules:[o,s]},optional:!0}))return;const S=x&&x.checkPrefixed,h=w.stylelint.config?.languageOptions?.syntax?.properties||{},P=new Set(Object.keys(h));r.walkDecls(function(r){const o=r.prop;if(!a(r))return;if(u(r))return;if(!l(o))return;if(m(o))return;if(!S&&j.prefix(o))return;if(P.has(o))return;if(p(x,"ignoreProperties",o))return;const s=r.parent;if(s&&e(s)&&p(x,"ignoreSelectors",s.selector))return;if(n(r,r=>t(r)&&p(x,"ignoreAtRules",r.name)))return;if(k.has(o.toLowerCase()))return;f({message:y.rejected,messageArgs:[o],node:r,result:w,ruleName:g,word:o})})}};x.ruleName=g,x.messages=y,x.meta={url:"https://stylelint.io/user-guide/rules/property-no-unknown"};export{x as default};