Skip to content

Conversation

@swjcpy
Copy link

@swjcpy swjcpy commented Feb 10, 2026

Summary

  • Normalize the working directory using realpath to ensure correct filesystem casing
  • Prevent false case-sensitivity errors on case-insensitive filesystems

Issue

Fixes #220

@sindresorhus
Copy link
Member

Can you explain how that fixes the issue exactly? And it needs a test.

@swjcpy
Copy link
Author

swjcpy commented Feb 10, 2026

Thanks for the review! This change normalizes the cwd with realpathSync() in the XO constructor, so a symlinked or case-variant path resolves to the filesystem’s canonical path. That keeps ESLint’s internal cwd aligned with how it reports file paths, which avoids import/no-unresolved false positives on case-insensitive filesystems when the user’s path casing doesn’t match the actual path casing. I’ve also added a test that creates a symlink to the fixture project, instantiates XO with the symlink path, and asserts that linterOptions.cwd is the realpath.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

case sensitive pwd causes weird issue on case insensitive file system

2 participants