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

feat(eslint-plugin): [prefer-readonly] private fields support #7686

Merged
merged 9 commits into from Oct 19, 2023
Merged

feat(eslint-plugin): [prefer-readonly] private fields support #7686

merged 9 commits into from Oct 19, 2023

Conversation

Jamesernator
Copy link
Contributor

PR Checklist

Overview

This adds private field support to prefer-readonly with the same behaviour as for classic TS private properties.

The tests are just duplicates of the existing tests, but with private name replaced with #name.

@typescript-eslint
Copy link
Contributor

Thanks for the PR, @Jamesernator!

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 Sep 21, 2023

Deploy Preview for typescript-eslint ready!

Name Link
🔨 Latest commit 7dd8f6b
🔍 Latest deploy log https://app.netlify.com/sites/typescript-eslint/deploys/653162b8c5dee4000810fee2
😎 Deploy Preview https://deploy-preview-7686--typescript-eslint.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
Lighthouse
Lighthouse
1 paths audited
Performance: 95 (no change from production)
Accessibility: 100 (no change from production)
Best Practices: 92 (no change from production)
SEO: 98 (no change from production)
PWA: 80 (no change from production)
View the detailed breakdown and full score reports

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

@Jamesernator Jamesernator changed the title [prefer-readonly] private fields support [feat] prefer-readonly - private fields support Sep 21, 2023
@Jamesernator Jamesernator changed the title [feat] prefer-readonly - private fields support feat: prefer-readonly - private fields support Sep 21, 2023
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.

+5/-1 in implementation
+907 in tests

Love it 😂. Super thorough tests - nicely done! 👏

Just requesting changes on a bit of docs too please. Thanks!

@JoshuaKGoldberg JoshuaKGoldberg added the awaiting response Issues waiting for a reply from the OP or another party label Sep 21, 2023
@JoshuaKGoldberg
Copy link
Member

👋 Hey @Jamesernator! Just checking in, is this still something you have time for? No worries if not - I just don't want to leave it hanging.

@JoshuaKGoldberg JoshuaKGoldberg added the stale PRs or Issues that are at risk of being or have been closed due to inactivity for a prolonged period label Oct 18, 2023
@Jamesernator
Copy link
Contributor Author

👋 Hey @Jamesernator! Just checking in, is this still something you have time for? No worries if not - I just don't want to leave it hanging.

I've added a small docs change to mention it now affects both typescript private modifiers and private fields.

@JoshuaKGoldberg
Copy link
Member

Great thanks! If you re-request review through the GitHub UI we'll be notified to take a look. Otherwise we don't always go back to PRs.

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.

Awesome, thanks! The tests are just as awesomely thorough as before. 🚀

packages/eslint-plugin/docs/rules/prefer-readonly.md Outdated Show resolved Hide resolved
@JoshuaKGoldberg JoshuaKGoldberg removed awaiting response Issues waiting for a reply from the OP or another party stale PRs or Issues that are at risk of being or have been closed due to inactivity for a prolonged period labels Oct 19, 2023
@JoshuaKGoldberg JoshuaKGoldberg changed the title feat: prefer-readonly - private fields support feat(eslint-plugin): [prefer-readonly] private fields support Oct 19, 2023
@JoshuaKGoldberg JoshuaKGoldberg merged commit 0e875bf into typescript-eslint:main Oct 19, 2023
46 checks passed
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Oct 27, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Enhancement: [prefer-readonly] check #private class fields
2 participants