Skip to content

Conversation

@antitoxic
Copy link
Contributor

👋 Hi there. Thank you for creating the library. It's super useful!

One problem I noticed happening in our GitHub CI process is that it crashed sometimes and the error was:

Error while loading rule 'json-schema-validator/no-invalid': EEXIST: file already exists, mkdir 'node_modules/eslint-plugin-json-schema-validator/.cached_schemastore'

Which was caused by fs.mkdirSync throwing an error when a directory already exists.

I swapped this with fs.mkdirSync('<path to dir>', { recursive: true }) which will not throw if the directory exists AND has the added benefit that it automatically creates any missing parent directory which means you don't need the makeDirs helper function.

@changeset-bot
Copy link

changeset-bot bot commented Dec 6, 2024

🦋 Changeset detected

Latest commit: 20ca574

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
eslint-plugin-json-schema-validator Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

Copy link
Owner

@ota-meshi ota-meshi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Thank you!

@ota-meshi ota-meshi merged commit 0830dcb into ota-meshi:main Dec 6, 2024
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.

2 participants