@@ -3,10 +3,10 @@ import type { BiomeLintrc, ESLintrc, ImportExtended, Options } from '../types'
33import { existsSync , promises as fs } from 'node:fs'
44import { dirname , isAbsolute , relative , resolve } from 'node:path'
55import process from 'node:process'
6- import { slash , throttle , toArray } from '@antfu/utils'
6+ import { isString , slash , throttle , toArray } from '@antfu/utils'
77import { isPackageExists } from 'local-pkg'
88import MagicString from 'magic-string'
9- import { createUnimport , resolvePreset } from 'unimport'
9+ import { createUnimport , normalizeScanDirs , resolvePreset } from 'unimport'
1010import { createFilter } from 'unplugin-utils'
1111import { presets } from '../presets'
1212import { generateBiomeLintConfigs } from './biomelintrc'
@@ -276,6 +276,22 @@ ${dts}`.trim()}\n`
276276 }
277277 }
278278
279+ const configFilePaths = [
280+ dts ,
281+ eslintrc . filepath ,
282+ biomelintrc . filepath ,
283+ dumpUnimportItems ,
284+ ]
285+ . filter ( isString )
286+ . map ( path => resolve ( root , path ) )
287+
288+ const normalizedDirPaths = dirs ?. length
289+ ? dirs . flatMap ( dir => normalizeScanDirs ( [ dir ] , {
290+ ...dirsScanOptions ,
291+ cwd : root ,
292+ } ) )
293+ : [ ]
294+
279295 return {
280296 root,
281297 dirs,
@@ -287,6 +303,8 @@ ${dts}`.trim()}\n`
287303 generateDTS,
288304 generateESLint,
289305 unimport,
306+ configFilePaths,
307+ normalizedDirPaths,
290308 }
291309}
292310
0 commit comments