Skip to content

docs(eslint-plugin): [class-methods-use-this] refresh options docs #10728

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

Conversation

JoshuaKGoldberg
Copy link
Member

PR Checklist

Overview

Aligns the rule's options' descriptions with how most other ignore* ones are described.

💖

@typescript-eslint
Copy link
Contributor

Thanks for the PR, @JoshuaKGoldberg!

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.

Copy link

netlify bot commented Jan 28, 2025

Deploy Preview for typescript-eslint ready!

Name Link
🔨 Latest commit fc45117
🔍 Latest deploy log https://app.netlify.com/sites/typescript-eslint/deploys/67a0da2bbfd8f60008f035a0
😎 Deploy Preview https://deploy-preview-10728--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: 99 (🟢 up 1 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.

Copy link

nx-cloud bot commented Jan 28, 2025

View your CI Pipeline Execution ↗ for commit fc45117.

Command Status Duration Result
nx test eslint-plugin ✅ Succeeded 6m 10s View ↗
nx test eslint-plugin --coverage=false ✅ Succeeded 6m 16s View ↗
nx run integration-tests:test ✅ Succeeded 2m 22s View ↗
nx test visitor-keys ✅ Succeeded <1s View ↗
nx run types:build ✅ Succeeded <1s View ↗
nx run-many --target=build --exclude website --... ✅ Succeeded 24s View ↗
nx test typescript-eslint ✅ Succeeded 5s View ↗
nx test utils ✅ Succeeded <1s View ↗
Additional runs (24) ✅ Succeeded ... View ↗

☁️ Nx Cloud last updated this comment at 2025-02-03 15:26:57 UTC

@JoshuaKGoldberg
Copy link
Member Author

JoshuaKGoldberg commented Jan 28, 2025

Will fix up the unit tests soon, I don't they block review...

ronami
ronami previously approved these changes Jan 30, 2025
Copy link
Member

@ronami ronami left a comment

Choose a reason for hiding this comment

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

This is such a big improvement, thank you 🎉

@@ -33,8 +33,6 @@ const defaultOptions: Options = {

{/* insert option description */}

Makes the rule ignore any class member explicitly marked with `override`.
Copy link
Member

@ronami ronami Jan 30, 2025

Choose a reason for hiding this comment

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

Intersting!

I just noticed the resulting documentation page had more-or-less the same option description but twice, as the /* insert option description */ comments add the original option description.

I've checked if there are other rules that have this issue which led me to #10748. Some rules have options with exactly the same description which seems rather confusing (for example: https://typescript-eslint.io/rules/no-confusing-void-expression/#ignorearrowshorthand).

I wonder if/how this can be prevented.

Copy link
Member Author

Choose a reason for hiding this comment

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

Yeah we could probably add a lint rule or test to check that there isn't a strict duplicate. Or loose duplication if we remove spaces, lowercase, or even check something like the Levenshtein distance and/or are-docs-informative-style distance. But there are so many that are very differently phrased -and we aren't adding new violations- I don't think it'd catch much long-term. +1 to #10748 from me as a one-time thing.

@ronami ronami added the 1 approval >=1 team member has approved this PR; we're now leaving it open for more reviews before we merge label Jan 30, 2025
@JoshuaKGoldberg JoshuaKGoldberg merged commit cd15629 into typescript-eslint:main Feb 3, 2025
57 of 58 checks passed
Copy link

codecov bot commented Feb 3, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 87.27%. Comparing base (94e8098) to head (fc45117).
Report is 19 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main   #10728   +/-   ##
=======================================
  Coverage   87.26%   87.27%           
=======================================
  Files         450      450           
  Lines       15712    15719    +7     
  Branches     4600     4601    +1     
=======================================
+ Hits        13711    13718    +7     
  Misses       1645     1645           
  Partials      356      356           
Flag Coverage Δ
unittest 87.27% <ø> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
.../eslint-plugin/src/rules/class-methods-use-this.ts 95.65% <ø> (ø)

... and 5 files with indirect coverage changes

@JoshuaKGoldberg JoshuaKGoldberg deleted the class-methods-use-this-options-refresh branch February 3, 2025 16:23
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 11, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
1 approval >=1 team member has approved this PR; we're now leaving it open for more reviews before we merge
Projects
None yet
2 participants