Content-Length: 296835 | pFad | http://github.com/typescript-eslint/typescript-eslint/pull/11419

4D fix: normalize tsconfigRootDir to handle trailing path separators in project: true by gingeekrishna · Pull Request #11419 · typescript-eslint/typescript-eslint · GitHub
Skip to content

fix: normalize tsconfigRootDir to handle trailing path separators in project: true #11419

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

gingeekrishna
Copy link

[…project: true](fix: normalize tsconfigRootDir to handle trailing path separators in project: true)

Fixes #11413

When using project: true, the search for tsconfig.json files would stop prematurely if sconfigRootDir contained a trailing path separator. This was due to an incorrect length comparison that included the trailing separator character.

The fix normalizes the tsconfigRootDir path and removes trailing separators before comparing lengths, ensuring consistent behavior regardless of whether the path ends with '/' or ''.

Changes:

  • Modified getProjectConfigFiles to normalize tsconfigRootDir path
  • Added test case to verify fix works with trailing separators
  • Maintains backward compatibility with existing functionality

PR Checklist

Overview

…project: true

Fixes typescript-eslint#11413

When using project: true, the search for tsconfig.json files would
stop prematurely if 	sconfigRootDir contained a trailing path
separator. This was due to an incorrect length comparison that
included the trailing separator character.

The fix normalizes the tsconfigRootDir path and removes trailing
separators before comparing lengths, ensuring consistent behavior
regardless of whether the path ends with '/' or '\'.

Changes:
- Modified getProjectConfigFiles to normalize tsconfigRootDir path
- Added test case to verify fix works with trailing separators
- Maintains backward compatibility with existing functionality
@typescript-eslint
Copy link
Contributor

Thanks for the PR, @gingeekrishna!

typescript-eslint is a 100% community driven project, and we are incredibly grateful that you are contributing to that community.

The core maintainers work on this in their personal time, so please understand that it may not be possible for them to review your work immediately.

Thanks again!


🙏 Please, if you or your company is finding typescript-eslint valuable, help us sustain the project by sponsoring it transparently on https://opencollective.com/typescript-eslint.

Copy link

netlify bot commented Jul 23, 2025

Deploy Preview for typescript-eslint ready!

Name Link
🔨 Latest commit eefbc4c
🔍 Latest deploy log https://app.netlify.com/projects/typescript-eslint/deploys/6880f3b568481a00083e36dc
😎 Deploy Preview https://deploy-preview-11419--typescript-eslint.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
Lighthouse
Lighthouse
1 paths audited
Performance: 97 (🔴 down 1 from production)
Accessibility: 97 (no change from production)
Best Practices: 100 (no change from production)
SEO: 92 (no change from production)
PWA: 80 (no change from production)
View the detailed breakdown and full score reports

To edit notification comments on pull requests, go to your Netlify project configuration.

Copy link

nx-cloud bot commented Jul 23, 2025

View your CI Pipeline Execution ↗ for commit eefbc4c

Command Status Duration Result
nx run integration-tests:test ❌ Failed 52s View ↗
nx test ast-spec ❌ Failed 10s View ↗
nx test eslint-plugin --coverage=false ✅ Succeeded 5m 17s View ↗
nx run-many -t lint ✅ Succeeded 3m 25s View ↗
nx run-many -t typecheck ✅ Succeeded 2m 5s View ↗
nx test typescript-estree --coverage=false ✅ Succeeded 21s View ↗
nx test eslint-plugin-internal --coverage=false ✅ Succeeded 12s View ↗
nx run types:build ✅ Succeeded 5s View ↗
Additional runs (12) ✅ Succeeded ... View ↗

☁️ Nx Cloud last updated this comment at 2025-07-23 14:45:39 UTC

- Use simpler regex-based approach instead of path.normalize
- Add safeguard for edge cases where path becomes empty
- Remove platform-specific test that might cause CI issues
- Maintain backward compatibility with minimal change
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.

Bug: project: true doesn't permit trailing pathsep in tsconfigRootDir
1 participant








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: http://github.com/typescript-eslint/typescript-eslint/pull/11419

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy