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: Support ENOTDIR error code in the folder existence checking utility #13973
Conversation
GitLab CI throws ENOTDIR instead of ENOENT. Add checking for this condition.
I thought the issue can be reproduced only in GitLab CI. But recently found that it fails also in Travis CI. Here is a build log https://travis-ci.com/github/constgen/constgen-eslint |
Hi @constgen, thanks for the PR! This is reproducible on our CI, too: https://github.com/eslint/eslint/pull/13997/checks?check_run_id=1675329847 Can be also manually reproduced when a virtual file path under an existing file is given to Can you add tests from #13997 to this PR? |
@constgen are you still working on this? |
I can help with the PR @constgen if you dont have bandwidth to work on it anymore. Just let me know 😀 |
Hi @constgen!, thanks for the Pull Request The pull request title isn't properly formatted. We ask that you update the message to match this format, as we use it to generate changelogs and automate releases.
Read more about contributing to ESLint here |
Hi @constgen!, thanks for the Pull Request The pull request title isn't properly formatted. We ask that you update the message to match this format, as we use it to generate changelogs and automate releases.
Read more about contributing to ESLint here |
Hi @constgen!, thanks for the Pull Request The pull request title isn't properly formatted. We ask that you update the message to match this format, as we use it to generate changelogs and automate releases.
Read more about contributing to ESLint here |
I have copy-pasted tests proposed by @mdjermanovic . Need a review. |
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.
🚀
Just fixed a typo |
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.
LGTM, thanks!
Thanks for contributing! |
Prerequisites checklist
What is the purpose of this pull request? (put an "X" next to an item)
[ ] Documentation update
[x] Bug fix (template)
[ ] New rule (template)
[ ] Changes an existing rule (template)
[ ] Add autofixing to a rule
[ ] Add a CLI option
[ ] Add something to the core
[ ] Other, please explain:
What changes did you make? (Give an overview)
Add a condition to return
false
indirectoryExists
function if Node API returnsENOTDIR
errorIs there anything you'd like reviewers to focus on?
Reproduced when special custom parsers were used:
jsonc-eslint-parser
together witheslint-plugin-markdown
. Happened during linting of JSON code fragments in Markdown document when checking virtual file paths, e.g.directoryExists('C:\Projects\Projects_Compane\project_name\README.md\2_2.json')
More details can be found in this issue ota-meshi/eslint-plugin-jsonc#28