import{isRegExp as e,isString as t}from"../../utils/validateTypes.mjs";import s from"../../utils/report.mjs";import m from"../../utils/ruleMessages.mjs";import r from"../../utils/validateOptions.mjs";const o="comment-pattern",a=m(o,{expected:e=>`Expected comment to match pattern "${e}"`}),l=m=>(l,p)=>{if(!r(p,o,{actual:m,possible:[e,t]}))return;const i=t(m)?new RegExp(m):m;l.walkComments(e=>{const t=e.text;i.test(t)||s({message:a.expected,messageArgs:[m],node:e,result:p,ruleName:o})})};l.ruleName=o,l.messages=a,l.meta={url:"https://stylelint.io/user-guide/rules/comment-pattern"};export{l as default};