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(utils): add new properties since eslint 8.40.0 #7460

Merged
merged 3 commits into from Aug 13, 2023
Merged

fix(utils): add new properties since eslint 8.40.0 #7460

merged 3 commits into from Aug 13, 2023

Conversation

so1ve
Copy link
Contributor

@so1ve so1ve commented Aug 12, 2023

PR Checklist

Overview

Add type definition for new eslint context properties

@typescript-eslint
Copy link
Contributor

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.

@netlify
Copy link

netlify bot commented Aug 12, 2023

Deploy Preview for typescript-eslint ready!

Name Link
🔨 Latest commit 69f7f09
🔍 Latest deploy log https://app.netlify.com/sites/typescript-eslint/deploys/64d82555ca9e33000836d8a5
😎 Deploy Preview https://deploy-preview-7460--typescript-eslint.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@nx-cloud
Copy link

nx-cloud bot commented Aug 12, 2023

☁️ Nx Cloud Report

CI is running/has finished running commands for commit 69f7f09. As they complete they will appear below. Click to see the status, the terminal output, and the build insights.

📂 See all runs for this branch


✅ Successfully ran 37 targets

Sent with 💌 from NxCloud.

Copy link
Member

@JoshuaKGoldberg JoshuaKGoldberg left a 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?

packages/utils/src/ts-eslint/Rule.ts Outdated Show resolved Hide resolved
@JoshuaKGoldberg JoshuaKGoldberg added the awaiting response Issues waiting for a reply from the OP or another party label Aug 12, 2023
@JoshuaKGoldberg JoshuaKGoldberg changed the title fix: add new properties since eslint 8.40.0 fix(utils): add new properties since eslint 8.40.0 Aug 12, 2023
so1ve and others added 2 commits August 13, 2023 08:33
Co-authored-by: Josh Goldberg ✨ <git@joshuakgoldberg.com>
Copy link
Member

@JoshuaKGoldberg JoshuaKGoldberg left a comment

Choose a reason for hiding this comment

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

💯 thanks!

@JoshuaKGoldberg JoshuaKGoldberg merged commit 660aff7 into typescript-eslint:main Aug 13, 2023
50 checks passed
@@ -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.
Copy link
Member

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().

Copy link
Contributor Author

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?

Copy link
Member

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.

JoshuaKGoldberg pushed a commit that referenced this pull request Aug 13, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 21, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
awaiting response Issues waiting for a reply from the OP or another party
Projects
None yet
Development

Successfully merging this pull request may close these issues.

context.sourceCode does not exist in type definition
3 participants