import{isConfigurationComment as e}from"../../utils/configurationComment.mjs";import t from"../../utils/report.mjs";import s from"../../utils/ruleMessages.mjs";import o from"../../utils/validateOptions.mjs";const r="no-empty-source",m=s(r,{rejected:"Unexpected empty source"}),i=(s,i,u)=>(i,n)=>{if(!o(n,r,{actual:s}))return;const a=u.fix?i.toString():i.source&&i.source.input.css||"";let l=Boolean(a.trim())&&i.nodes.some(t=>!e(t,u.configurationComment));l||0===i.nodes.length&&Boolean(i.raws.after?.trim())&&(l=!0),l||t({message:m.rejected,messageArgs:[],node:i,result:n,ruleName:r})};i.ruleName=r,i.messages=m,i.meta={url:"https://stylelint.io/user-guide/rules/no-empty-source"};export{i as default};