Skip to content

docs(eslint-plugin): remove duplicate option descriptions on various rules #10748

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

ronami
Copy link
Member

@ronami ronami commented Jan 30, 2025

PR Checklist

Overview

This PR removes duplicated (or very similar) option descriptions some rules have, which makes the documentation of these options confusing: https://typescript-eslint.io/rules/no-confusing-void-expression/#ignorearrowshorthand.

@typescript-eslint
Copy link
Contributor

Thanks for the PR, @ronami!

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 30, 2025

Deploy Preview for typescript-eslint ready!

Name Link
🔨 Latest commit 34e98bc
🔍 Latest deploy log https://app.netlify.com/sites/typescript-eslint/deploys/679bcf2a53e2d70008a4805d
😎 Deploy Preview https://deploy-preview-10748--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: 91 (🔴 down 7 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 30, 2025

View your CI Pipeline Execution ↗ for commit 34e98bc.

Command Status Duration Result
nx run-many --target=build --exclude website --... ✅ Succeeded 2s View ↗
nx run-many --target=clean ✅ Succeeded 10s View ↗

☁️ Nx Cloud last updated this comment at 2025-01-31 13:53:58 UTC

@@ -119,7 +119,7 @@ const foo = <Foo props={{ bar: 1 } as Bar} />;

{/* insert option description */}

Always prefer `const x: T[] = [ ... ];` to `const x = [ ... ] as T[];` (or similar with angle brackets).
For example, this would prefer `const x: T[] = [ ... ];` to `const x = [ ... ] as T[];` (or similar with angle brackets).
Copy link
Member Author

@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.

Matching the description of objectLiteralTypeAssertions, as the option description is very similar: Whether to always prefer type declarations for array literals used as variable initializers, rather than type assertions.

@@ -148,8 +148,6 @@ const msg1 = `arg = ${arg}`;

{/* insert option description */}

Whether to allow additional types in template expressions.
Copy link
Member Author

Choose a reason for hiding this comment

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

Option's description is slightly different: Types to allow in template expressions..

@@ -181,8 +181,6 @@ Also, if you would like to ignore all primitives types, you can set `ignorePrimi

{/* insert option description */}

Whether to ignore expressions that coerce a value into a boolean: `Boolean(...)`.
Copy link
Member Author

@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.

Option's description is slightly different: Whether to ignore arguments to the `Boolean` constructor.

@ronami ronami changed the title chore(docs): remove duplicate option descriptions on various rules docs(eslint-plugin): remove duplicate option descriptions on various rules Jan 30, 2025
@ronami ronami marked this pull request as ready for review January 30, 2025 19:30
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.

Nice! 👏

@JoshuaKGoldberg JoshuaKGoldberg 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 31, 2025
@JoshuaKGoldberg JoshuaKGoldberg merged commit 345e82e into typescript-eslint:main Feb 3, 2025
66 of 67 checks passed
@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
Development

Successfully merging this pull request may close these issues.

2 participants
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy