Skip to content

Commit e4c4392

Browse files
authored
Fix dist/index check to support all build output formats (#276)
2 parents bb6a1fc + 65efe6e commit e4c4392

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

.changeset/fix-dist-index-check.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@pandacss/eslint-plugin": patch
3+
---
4+
5+
Fix dist/index check to support all build output formats (ESM and CJS)

plugin/src/utils/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ export const createRule = ESLintUtils.RuleCreator(
1313
export type Rule = ReturnType<typeof createRule>
1414

1515
// Determine the distribution directory
16-
const isBase = process.env.NODE_ENV !== 'test' || import.meta.url.endsWith('dist/index.js')
16+
const isBase = process.env.NODE_ENV !== 'test' || import.meta.url.includes('/dist/index')
1717
export const distDir = fileURLToPath(new URL(isBase ? './' : '../../dist', import.meta.url))
1818

1919
// Create synchronous function using synckit

0 commit comments

Comments
 (0)