-
-
Notifications
You must be signed in to change notification settings - Fork 6
refactor: use actively maintained json-schema-migrate-x
instead
#378
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
Conversation
🦋 Changeset detectedLatest commit: 94e44c2 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
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 |
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.
Pull Request Overview
This PR refactors the code to use the actively maintained "@unts/json-schema-migrate" package for JSON schema migration while incorporating a cleanup process for package.json using clean‑pkg‑json. Key changes include:
- Removing unnecessary @ts‑expect‑error comments from test files.
- Updating import statements in validator‑factory.ts and schema.ts to reference the new migration package.
- Tidying up import ordering and eliminating duplicate or outdated code.
Reviewed Changes
Copilot reviewed 4 out of 5 changed files in this pull request and generated no comments.
File | Description |
---|---|
tests/src/rules/no-invalid.ts | Removed redundant @ts‑expect‑error comments to reflect updated types. |
tests/src/eslint-plugin.ts | Removed outdated @ts‑expect‑error comments related to ESLint typing bugs. |
src/utils/validator-factory.ts | Updated imports to use "@unts/json-schema-migrate" and removed duplicates. |
src/utils/schema.ts | Reordered and updated imports, adopting the new JSON schema migration. |
Files not reviewed (1)
- package.json: Language not supported
@ota-meshi I recommend you to try https://coderabbit.ai |
edadf7d
to
87a9fbc
Compare
WalkthroughThe changes update configuration files, code imports, scripts, and dependency references. A new changeset entry documents a minor version bump and a migration from Changes
Poem
Warning There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure. 🔧 ESLint
src/utils/schema.tsOops! Something went wrong! :( ESLint: 9.23.0 ESLint couldn't find the plugin "eslint-plugin-json-schema-validator". (The package "eslint-plugin-json-schema-validator" was not found when loaded as a Node module from the directory "".) It's likely that the plugin isn't installed correctly. Try reinstalling by running the following:
The plugin "eslint-plugin-json-schema-validator" was referenced from the config file in " » plugin:@ota-meshi/recommended#overrides[0] » /node_modules/@ota-meshi/eslint-plugin/lib/configs/json-schema/config.js". If you still can't figure out the problem, please see https://eslint.org/docs/latest/use/troubleshooting. src/utils/validator-factory.tsOops! Something went wrong! :( ESLint: 9.23.0 ESLint couldn't find the plugin "eslint-plugin-json-schema-validator". (The package "eslint-plugin-json-schema-validator" was not found when loaded as a Node module from the directory "".) It's likely that the plugin isn't installed correctly. Try reinstalling by running the following:
The plugin "eslint-plugin-json-schema-validator" was referenced from the config file in " » plugin:@ota-meshi/recommended#overrides[0] » /node_modules/@ota-meshi/eslint-plugin/lib/configs/json-schema/config.js". If you still can't figure out the problem, please see https://eslint.org/docs/latest/use/troubleshooting. 📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (4)
🚧 Files skipped from review as they are similar to previous changes (4)
🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
@unts/json-schema-migrate
insteadjson-schema-migrate-x
instead
@coderabbitai This repository use |
Tip For best results, initiate chat on the files or code changes. @JounQin Thank you for the clarification. You're absolutely right - using 🐰✨✏️ Learnings added
|
375ae28
to
94e44c2
Compare
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.
Thank you!
See https://github.com/un-ts/json-schema-migrate-x
The fork started because I discovered ajv-validator/json-schema-migrate#9 in current repo, which is annoying in VSCode.
I also added
clean-pkg-json
for cleaning uppackage.json
before publish.eslint-compat-utils
is also bumped, some types errors are gone thanks to ota-meshi/eslint-compat-utils#65.Summary by CodeRabbit
Chores
eslint-plugin-json-schema-validator
.Refactor