Skip to content

Fix: Support ENOTDIR error code in the folder existence checking utility#13973

Merged
mdjermanovic merged 2 commits intoeslint:masterfrom
constgen:patch-2
Feb 10, 2021
Merged

Fix: Support ENOTDIR error code in the folder existence checking utility#13973
mdjermanovic merged 2 commits intoeslint:masterfrom
constgen:patch-2

Conversation

@constgen
Copy link
Copy Markdown
Contributor

@constgen constgen commented Jan 1, 2021

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 in directoryExists function if Node API returns ENOTDIR error

Is there anything you'd like reviewers to focus on?

Reproduced when special custom parsers were used: jsonc-eslint-parser together with eslint-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

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

Labels

accepted There is consensus among the team that this change meets the criteria for inclusion archived due to age This issue has been archived; please open a new issue for any further discussion bug ESLint is working incorrectly core Relates to ESLint's core APIs and features

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants