Skip to content

Commit

Permalink
Fix CLI issue
Browse files Browse the repository at this point in the history
  • Loading branch information
anubra266 committed Jan 25, 2024
1 parent 13c0458 commit 6950bc1
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion plugin/src/utils/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@ export const createRule: ReturnType<(typeof ESLintUtils)['RuleCreator']> = ESLin

export type Rule<A extends readonly unknown[] = any, B extends string = any> = ReturnType<typeof createRule<A, B>>

export const distDir = fileURLToPath(new URL(process.env.MODE === 'test' ? '../../dist' : './', import.meta.url))
const isBase = process.env.NODE_ENV !== 'test' || import.meta.url.endsWith('dist/index.js')
export const distDir = fileURLToPath(new URL(isBase ? './' : '../../dist', import.meta.url))

export const syncAction = createSyncFn(join(distDir, 'utils/worker.mjs')) as typeof run

Expand Down

0 comments on commit 6950bc1

Please sign in to comment.