Skip to content

Update to eslint v9, typescript-eslint v8 #59518

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

Merged
merged 13 commits into from
Aug 13, 2024
Merged

Conversation

jakebailey
Copy link
Member

@jakebailey jakebailey commented Aug 2, 2024

Blocked on:

@typescript-bot typescript-bot added Author: Team For Uncommitted Bug PR for untriaged, rejected, closed or missing bug labels Aug 2, 2024
@jakebailey
Copy link
Member Author

@webpro Do you happen to know why knip would be complaining about @typescript-eslint/rule-tester being unused, even though debug logs seem to imply that scripts/eslint/tests/support/RuleTester.cjs is analyzed?

@webpro
Copy link
Contributor

webpro commented Aug 5, 2024

@webpro Do you happen to know why knip would be complaining about @typescript-eslint/rule-tester being unused, even though debug logs seem to imply that scripts/eslint/tests/support/RuleTester.cjs is analyzed?

Not entirely sure, but some relevant bits include:

  • Knip does not automatically split projects based on tsconfig.json files. This repo is a single workspace to Knip and all files are in a single ts.Program with a single custom module resolver function.
  • No root tsconfig.json means no value for compilerOptions.moduleResolution when ts.resolveModuleName() is invoked. That could explain why @typescript-eslint/utils was resolved (by @import in JSDoc tag) but not @typescript-eslint/rule-tester (by require call).
  • In that custom function Knip uses an additional module resolver (prior to ts.resolveModuleName). Coincidentally last week the resolve package that this is based on has been replaced with enhanced-resolve and that seems to do the trick here. Not exactly sure why, though. I expect this fix to be released this week.

@jakebailey
Copy link
Member Author

Updated knip and yeah, that works, thanks!

@jakebailey jakebailey marked this pull request as ready for review August 8, 2024 18:41
@jakebailey jakebailey merged commit 01a874a into microsoft:main Aug 13, 2024
32 checks passed
@jakebailey jakebailey deleted the eslint-9 branch August 13, 2024 00:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Author: Team For Uncommitted Bug PR for untriaged, rejected, closed or missing bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants