import{assertString as e}from"../../utils/validateTypes.mjs";import s from"../../utils/getRuleSelector.mjs";import t from"../../utils/report.mjs";import l from"../../utils/ruleMessages.mjs";import r from"../../utils/validateOptions.mjs";const o="no-invalid-double-slash-comments",i=l(o,{rejected:"Unexpected double-slash CSS comment"}),m=(l,m,n)=>(m,a)=>{r(a,o,{actual:l})&&(m.walkDecls(e=>{e.prop.startsWith("//")&&t({message:i.rejected,messageArgs:[],node:e,result:a,ruleName:o})}),m.walkRules(l=>{const r=s(l).split(",");let m,u=0;for(const s of r){const r=s.trimStart();if(r.startsWith("//")){m??=l.toString(),e(n.newline);const d=u+(s.length-r.length),c=d+(m.slice(d).split(n.newline)[0]??"").length;t({message:i.rejected,messageArgs:[],node:l,result:a,ruleName:o,index:d,endIndex:c})}u+=s.length+1}}))};m.ruleName=o,m.messages=i,m.meta={url:"https://stylelint.io/user-guide/rules/no-invalid-double-slash-comments"};export{m as default};