-
-
Notifications
You must be signed in to change notification settings - Fork 8.7k
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
chore: bump typescript-eslint to v7 #10271
base: main
Are you sure you want to change the base?
chore: bump typescript-eslint to v7 #10271
Conversation
@@ -379,7 +379,6 @@ module.exports = { | |||
// function placeholder params are always ignored, and any other unused | |||
// locals must be justified with a disable comment. | |||
'@typescript-eslint/no-unused-vars': [ERROR, {ignoreRestSiblings: true}], | |||
'@typescript-eslint/prefer-optional-chain': ERROR, |
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.
As much as I love this rule, it needs linting with type information to be bug-free. typescript-eslint/typescript-eslint#6397 changed the rule to require type info in typescript-eslint v6.
I briefly tried adding typed linting in this PR but:
parserOptions.project
resulted in out-of-memory exceptionsEXPERIMENTAL_useProjectService
resulted in 855 files complaining about not being included in the default project (i.e. fix(typescript-estree): don't add in-project files to defaultProjectMatchedFiles typescript-eslint/typescript-eslint#9097)
...so my suggestion would be to wait until v8 to use the stabilized parserOptions.projectService
.
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.
IIRC, we had a weird type checking setup (to make tests type checked), and I don't remember a good way to deal with it.
✅ [V2]Built without sensitive environment variables
To edit notification comments on pull requests, go to your Netlify site configuration. |
⚡️ Lighthouse report for the deploy preview of this PR
|
@@ -6,7 +6,7 @@ | |||
*/ | |||
|
|||
import {createRule} from '../util'; | |||
import type {TSESTree} from '@typescript-eslint/types/dist/ts-estree'; | |||
import type {TSESTree} from '@typescript-eslint/types'; |
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.
Package exports were cleaned up in typescript-eslint v6: https://typescript-eslint.io/blog/announcing-typescript-eslint-v6#package-exports
@@ -35,7 +35,6 @@ export default createRule<Options, MessageIds>({ | |||
type: 'problem', | |||
docs: { | |||
description: 'enforce using Docusaurus Link component instead of <a> tag', | |||
recommended: false, |
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.
These are no longer required in types for rules, and it looks to me that these weren't used anywhere in Docusaurus code.
Failing because tests run on Node 18, not Node 18.18. I asked in Discord: https://discord.com/channels/398180168688074762/584803742801723424/1258853596338847825 |
Thanks
Is this the only blocker to this PR? We still support Node 18.0, but we'll very likely upgrade to Node 20 in the next major |
Pre-flight checklist
[ ] If this is a code change: I have written unit tests and/or added dogfooding pages to fully verify the new behavior.[ ] If this is a new API or substantial change: the PR has an accompanying issue (closes #0000) and the maintainers have approved on my working plan.Motivation
👋 Hi! I'm coming over from typescript-eslint/typescript-eslint#9141: I'd like to try out the new typescript-eslint v8 version in beta now... but Docusaurus is still on v5. This PR gets you to the latest stable version, v7, without making any other substantial changes.
Test Plan
Test links
n/a - should be no functional code changes.
Related issues/PRs
None exist, but if you'd like I'm happy to file any issues you'd want! ❤️