Skip to content

Commit

Permalink
fix(eslint-plugin): throw when no config found
Browse files Browse the repository at this point in the history
  • Loading branch information
antfu committed Apr 11, 2023
1 parent ca89194 commit d761e5b
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion packages/eslint-plugin/src/worker-sort.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@ import { runAsWorker } from 'synckit'
import { sortRules } from '../../shared-integration/src/sort-rules'

async function getGenerator() {
const { config } = await loadConfig()
const { config, sources } = await loadConfig()
if (!sources.length)
throw new Error('[@unocss/eslint-plugin] No config file found, create a `uno.config.ts` file in your project root and try again.')
return createGenerator(config)
}

Expand Down

0 comments on commit d761e5b

Please sign in to comment.