import{isAbsolute as t,join as s}from"node:path";import e from"node:process";import o from"./createStylelint.mjs";import{isString as i}from"./utils/validateTypes.mjs";import r from"./lintSource.mjs";function n(n={}){const[c,l]=function(t){return"rules"in t}(n)?[e.cwd(),{config:n}]:["cwd"in n&&i(n.cwd)&&n.cwd||e.cwd(),n],u=o(l);return{postcssPlugin:"stylelint",async Once(e,{result:o}){let i=e.source&&e.source.input.file;i&&!t(i)&&(i=s(c,i)),await r(u,{filePath:i,existingPostcssResult:o})}}}n.postcss=!0;export{n as default};