import{isAbsolute as i,join as o,normalize as t}from"node:path";import e from"node:process";import r from"./createStylelint.mjs";import n from"./getConfigForFile.mjs";async function c(c,{cwd:f=e.cwd(),config:a,configBasedir:s,configFile:m}={}){if(!c)return;const d=r({config:a,configFile:m,configBasedir:s,cwd:f}),g=i(c)?t(c):o(f,c),l=await n({stylelint:d,searchPath:g,filePath:g});return l?l.config:void 0}export{c as default};