Skip to content
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

fix: replace use of deprecated methods #1453

Merged
merged 6 commits into from
Jan 12, 2024
Merged

fix: replace use of deprecated methods #1453

merged 6 commits into from
Jan 12, 2024

Conversation

G-Rath
Copy link
Collaborator

@G-Rath G-Rath commented Oct 20, 2023

Per https://eslint.org/blog/2023/09/preparing-custom-rules-eslint-v9/

Marking as a draft for now since there isn't an immediate need to land this and I want to dig a bit deeper into ESLint v9 etc in case there are other deprecations that might be upcoming.

@@ -19,6 +19,32 @@ declare module '@typescript-eslint/utils/dist/ts-eslint/Rule' {
}
}

declare module '@typescript-eslint/utils/dist/ts-eslint/SourceCode' {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can we avoid this by upgrading to v6?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah I implemented the types in typescript-eslint/typescript-eslint#7812

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sweet! we should probably do that in a major

@@ -229,3 +229,63 @@ export const getFirstMatcherArg = (

return followTypeAssertionChain(firstArg);
};

/* istanbul ignore next */
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why do we need to ignore coverage?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

because only one branch in each function should ever get used depending on what ESLint version you're using, and coverage is only collected against a single ESLint version at a time (technically we could merge reports for CI but that'd still be a pain locally)

Copy link
Member

@SimenB SimenB left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

woo!

should we set up CI to test against v9?

@G-Rath
Copy link
Collaborator Author

G-Rath commented Jan 4, 2024

should we set up CI to test against v9?

Yup, though I'll do that in a follow-up PR

@G-Rath G-Rath merged commit 9204a51 into main Jan 12, 2024
37 checks passed
@G-Rath G-Rath deleted the update-context-usage branch January 12, 2024 17:32
github-actions bot pushed a commit that referenced this pull request Jan 12, 2024
## [27.6.3](v27.6.2...v27.6.3) (2024-01-12)

### Bug Fixes

* replace use of deprecated methods ([#1453](#1453)) ([9204a51](9204a51))
Copy link

🎉 This PR is included in version 27.6.3 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment