chore: update TypeScript to v6#740
Conversation
|
Please hold off. There's already a bunch of "Update TypeScript to v6" PRs across the org and we're not even sure we want to upgrade immediately. |
|
@nzakas Sorry for the PRs! I opened these based on the discussion in my other PR (eslint/eslint#20547 (comment)), which suggested that once TypeScript 6 is officially released, we should update our tooling. |
|
Hi everyone, it looks like we lost track of this pull request. Please review and see what the next steps are. This pull request will auto-close in 7 days without an update. |
|
Hi everyone, it looks like we lost track of this pull request. Please review and see what the next steps are. This pull request will auto-close in 7 days without an update. |
|
Gotcha. @fasttime I'll leave it up to you to review. |
lumirlumir
left a comment
There was a problem hiding this comment.
Just a note that there are currently some CI failures related to this update.
|
The type tests are still failing. |
There was a problem hiding this comment.
Is there a reason why the named export test was removed?
This test verifies that the named export types exist correctly in the CJS export, so I think it need to be retained.
| getKeys, | ||
| unionWith, | ||
| VisitorKeys, | ||
| } from "../dist/eslint-visitor-keys.cjs"; |
There was a problem hiding this comment.
| } from "../dist/eslint-visitor-keys.cjs"; | |
| } from "eslint-visitor-keys"; |
I think simply using eslint-visitor-keys would be more accurate here, since the previous test using ../ resolved the type declaration file from the Module declaration surface rather than the CJS format. It was originally linked to lib/index.js and directed to dist/index.d.ts.
Additionally, using eslint-visitor-keys directly would be more beneficial, as it follows the same package-name type resolution path used by real consumers, since it is symlinked in node_modules and consumed like a real package.
Prerequisites checklist
AI acknowledgment
What is the purpose of this pull request?
This PR updates the repo’s TypeScript tooling to v6.
What changes did you make? (Give an overview)
typescriptto v6 inpackage.json.moduleResolution: "nodenext"andmodule: "nodenext"instead of the deprecatedmoduleResolution: "node"setup.rootDir: "lib"toeslint-visitor-keys.Related Issues
Is there anything you'd like reviewers to focus on?