fix: update @eslint/core to v1.0.0 and adjust tests#190
Conversation
@eslint/core to v1 and add legacy-peer-deps to .npmrc
|
Hi @lumirlumir!, thanks for the Pull Request The pull request title isn't properly formatted. We ask that you update the pull request title to match this format, as we use it to generate changelogs and automate releases.
To Fix: You can fix this problem by clicking 'Edit' next to the pull request title at the top of this page. Read more about contributing to ESLint here |
@eslint/core to v1 and add legacy-peer-deps to .npmrc@eslint/core to v1 and add legacy-peer-deps
@eslint/core to v1 and add legacy-peer-deps@eslint/core, add legacy-peer-deps, and use ESLint v10 prerelease
|
Hi @lumirlumir!, thanks for the Pull Request The pull request title isn't properly formatted. We ask that you update the pull request title to match this format, as we use it to generate changelogs and automate releases.
To Fix: You can fix this problem by clicking 'Edit' next to the pull request title at the top of this page. Read more about contributing to ESLint here |
@eslint/core, add legacy-peer-deps, and use ESLint v10 prerelease@eslint/core, add legacy-peer-deps, and use ESLint v10
There was a problem hiding this comment.
From ESLint v10, errors property in valid test case throws error, so I've removed it.
Ref: https://eslint.org/docs/next/use/migrate-to-10.0.0#stricter-rule-tester
|
Counterpart PR in eslint/css: eslint/css#337 |
| "license": "Apache-2.0", | ||
| "dependencies": { | ||
| "@eslint/core": "^0.17.0", | ||
| "@eslint/core": "^1.0.0", |
There was a problem hiding this comment.
Since this is a dependency, will this affect end users who are still using ESLint v9?
There was a problem hiding this comment.
The next release will be a major one, so I think it's okay.
nzakas
left a comment
There was a problem hiding this comment.
I'm wondering -- can we just update the types test to use Plugin from @eslint/core instead of ESLint.Plugin?
| "license": "Apache-2.0", | ||
| "dependencies": { | ||
| "@eslint/core": "^0.17.0", | ||
| "@eslint/core": "^1.0.0", |
There was a problem hiding this comment.
The next release will be a major one, so I think it's okay.
|
When I look at the history of the Below is the git blame for the related PRs in chronological order:
Personally, I think it would be fine to replace the Would anyone from @eslint/eslint-tsc have any further thoughts on this? |
Yes, the
I think that's fine. |
|
Per the suggestions, I've updated |
There was a problem hiding this comment.
Pull request overview
This PR updates the repository to work with ESLint v10 pre-release versions and @eslint/core v1.0.0, addressing type compatibility issues between these packages. The changes align with the pattern established in eslint/eslint#20281 for adopting ESLint v10 pre-releases.
- Updated
@eslint/corefrom ^0.17.0 to ^1.0.0 to include ESLint v10 type information - Added
legacy-peer-deps = trueto.npmrcto bypass peer dependency conflicts during the pre-release period - Updated ESLint dependency to use the version range
>=10.0.0-alpha.0 <10.0.0 || ^10.0.1to support v10 pre-releases
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| package.json | Updated @eslint/core to v1.0.0 and ESLint to v10 pre-release version range |
| .npmrc | Added legacy-peer-deps flag with TODO comment for removal after ESLint v10 stable release |
| tests/types/types.test.ts | Updated type imports to use Plugin from @eslint/core instead of ESLint.Plugin |
| tests/rules/sort-keys.test.js | Removed erroneous errors array from valid test case (fix for ESLint v10 compatibility) |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
Do we still need |
|
I think it's still needed, since sub-dependencies of the Line 95 in a0c552d
When I run
Per the comments above and the discussion at eslint/js#709 (comment), I added a commit 466cdc6 to clarify the description in |
|
Right, but if we keep this using ESLint v9 for linting, then I don't think we need legacy-peer-deps. There doesn't appear to be any reason to have a direct dependency on ESLint v10? |
I have missed that it switched to the Also, I've marked the PR prefix as I've reverted the changes in 1cb0fa8. |
@eslint/core, add legacy-peer-deps, and use ESLint v10@eslint/core and update tests
@eslint/core and update tests@eslint/core to v1.0.0
@eslint/core to v1.0.0@eslint/core to v1.0.0 and adjust tests
|
Question: Would there be a plan to remove I opened an issue with more details: #196 |
nzakas
left a comment
There was a problem hiding this comment.
LGTM. Would like @mdjermanovic to review before merging.


Prerequisites checklist
What is the purpose of this pull request?
This PR was motivated by #187 (comment).
Currently, when updating
@eslint/coreto v1.0.0, CI fails because@eslint/core@1.0.0does not match ESLint v9@eslint/core@1.0.0includes type information for ESLint v10, which causes the type mismatch.So, I've updated ESLint to
>=10.0.0-alpha.0 <10.0.0 || ^10.0.1. (Ref: https://github.com/eslint/eslint/blob/main/packages/eslint-config-eslint/package.json#L66)When I update ESLint to
>=10.0.0-alpha.0 <10.0.0 || ^10.0.1, the following error occurs, so I added thelegacy-peer-depsoption to.npmrc.This change follows the approach in eslint/eslint#20281
What changes did you make? (Give an overview)
In this PR, I've updated
@eslint/core, addlegacy-peer-deps, and use ESLint v10 pre-release.Related Issues
Ref: #187, #187 (comment), eslint/eslint#20281
Is there anything you'd like reviewers to focus on?
N/A