diff --git a/.changeset/silly-mayflies-chew.md b/.changeset/silly-mayflies-chew.md new file mode 100644 index 0000000..0722ea2 --- /dev/null +++ b/.changeset/silly-mayflies-chew.md @@ -0,0 +1,5 @@ +--- +"@pandacss/eslint-plugin": patch +--- + +Normalize paths diff --git a/plugin/src/utils/worker.ts b/plugin/src/utils/worker.ts index 895d726..02366a4 100644 --- a/plugin/src/utils/worker.ts +++ b/plugin/src/utils/worker.ts @@ -74,10 +74,10 @@ async function isColorAttribute(ctx: PandaContext, _attr: string): Promise { - const stats1 = fs.statSync(path1) - const stats2 = fs.statSync(path2) + const normalizedPath1 = path.resolve(path1) + const normalizedPath2 = path.resolve(path2) - return stats1.dev === stats2.dev && stats1.ino === stats2.ino + return normalizedPath1 === normalizedPath2 } async function isConfigFile(fileName: string): Promise { @@ -85,11 +85,10 @@ async function isConfigFile(fileName: string): Promise { } async function isValidFile(ctx: PandaContext, fileName: string): Promise { - return ctx.getFiles().includes(fileName) + return ctx.getFiles().some((file) => arePathsEqual(file, fileName)) } async function resolveShorthands(ctx: PandaContext, name: string): Promise { - console.log('name', name, ctx.utility.getPropShorthandsMap().get(name)) return ctx.utility.getPropShorthandsMap().get(name) }