-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
fix(utils): add new properties since eslint 8.40.0 #7460
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(utils): add new properties since eslint 8.40.0 #7460
Conversation
Thanks for the PR, @so1ve! typescript-eslint is a 100% community driven project, and we are incredibly grateful that you are contributing to that community. The core maintainers work on this in their personal time, so please understand that it may not be possible for them to review your work immediately. Thanks again! 🙏 Please, if you or your company is finding typescript-eslint valuable, help us sustain the project by sponsoring it transparently on https://opencollective.com/typescript-eslint. |
✅ Deploy Preview for typescript-eslint ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
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.
LGTM, thanks! ✨
Just the one suggestion on adding a notice to the deprecation, what do you think?
Co-authored-by: Josh Goldberg ✨ <[email protected]>
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.
💯 thanks!
@@ -220,20 +220,42 @@ interface RuleContext< | |||
* Returns the current working directory passed to Linter. | |||
* It is a path to a directory that should be considered as the current working directory. | |||
* @since 6.6.0 | |||
* @deprecated Use {@link `cwd`} instead. |
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.
we probably want to remove these @deprecated
tags.
most plugins will support ESLint v7 and v8 - they're not limited to 8.40.0
this means that trying to direct consumers to use these new APIs is an impossible state as they have to do things like context.cwd ?? context.getCwd()
- which is just worse code than context.getCwd()
.
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.
You are 100% right - shall I open a new PR?
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.
Hmm, that makes sense.
@so1ve if you want to get another PR to typescript-eslint under your belt 😄 we can merge it any time before Monday midday EST. I'll set a reminder to send one in if one hasn't yet been by then.
PR Checklist
context.sourceCode
does not exist in type definition #7453Overview
Add type definition for new eslint context properties