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
fix(linter): improve handling of barrel entry point files #12543
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎ 1 Ignored Deployment
|
tsConfigBase.compilerOptions.paths[entry].map((x) => ({ | ||
path: x, | ||
paths[entry].map((x) => ({ | ||
path: [x, `${x}.ts`, `${x}.js`].find(existsSync) || x, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
alternatively, do a readdir
on the parent directory, and check extensions there.
Debugging now on WebStorm, I don't think this solves the issue. It actually hides it and the result is an invalid message being returned by the linter. The file exists, but readFileSync does not find it, meaning we need to ensure the path is correct and full. |
Please check #12953 for the solution to the given problem. |
This pull request has already been merged/closed. If you experience issues related to these changes, please open a new issue referencing this pull request. |
Current Behavior
ENOENT or other file reading errors when tsconfig paths are configured in some ways, such as in #12067
Expected Behavior
ESLint should not crash and should gracefully continue
Related Issue(s)
Fixes #12067