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

docs: [no-unnecessary-type-parameters] add FAQ section #9975

Merged
merged 12 commits into from
Sep 23, 2024

Conversation

kirkwaiblinger
Copy link
Member

PR Checklist

Overview

Add FAQ section to rule's doc page.

Tried to mention all/most of the issues linked to #9680 in some capacity.

@typescript-eslint
Copy link
Contributor

Thanks for the PR, @kirkwaiblinger!

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 Sep 12, 2024

Deploy Preview for typescript-eslint ready!

Name Link
🔨 Latest commit 88aa43f
🔍 Latest deploy log https://app.netlify.com/sites/typescript-eslint/deploys/66ec7917c8f5850008060070
😎 Deploy Preview https://deploy-preview-9975--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: 90 (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 Sep 12, 2024

☁️ Nx Cloud Report

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

📂 See all runs for this CI Pipeline Execution


✅ Successfully ran 2 targets

Sent with 💌 from NxCloud.

Copy link

codecov bot commented Sep 12, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 88.71%. Comparing base (a2bca88) to head (88aa43f).
Report is 36 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #9975      +/-   ##
==========================================
+ Coverage   88.69%   88.71%   +0.02%     
==========================================
  Files         425      426       +1     
  Lines       14810    14829      +19     
  Branches     4308     4313       +5     
==========================================
+ Hits        13135    13155      +20     
  Misses       1531     1531              
+ Partials      144      143       -1     
Flag Coverage Δ
unittest 88.71% <ø> (+0.02%) ⬆️

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

see 23 files with indirect coverage changes

@kirkwaiblinger kirkwaiblinger marked this pull request as ready for review September 12, 2024 18:11
You might be surprised to that the rule reports on a function like this:

```ts
function f<T extends string>(string1: T): void {
Copy link
Member Author

Choose a reason for hiding this comment

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

I would love if someone has a better example for this. I didn't just copy the example from #9828 since it didn't seem very organic, but I'm not sure this is any better 🤔

Copy link
Member

Choose a reason for hiding this comment

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

Yeah I normally just go with log or identity. 🤷

function log<T extends string>(string1: T): void {
  const string2: T = string1;
  console.log(string2);
}

@kirkwaiblinger kirkwaiblinger requested a review from a team September 12, 2024 18:16
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 so far! Just waiting on the todo note.

@kirkwaiblinger kirkwaiblinger added the documentation Documentation ("docs") that needs adding/updating label Sep 18, 2024
@kirkwaiblinger
Copy link
Member Author

Just waiting on the todo note.

I was thinking to defer that to a followup once the linked conversation is fully resolved. Thoughts?

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.

Makes sense to me. Let's do it!

@JoshuaKGoldberg JoshuaKGoldberg merged commit dc1c6d3 into typescript-eslint:main Sep 23, 2024
63 checks passed
@kirkwaiblinger kirkwaiblinger deleted the NUTP-FAQ branch September 23, 2024 16:25
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Oct 1, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
documentation Documentation ("docs") that needs adding/updating
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Docs: [no-unnecessary-type-parameters] add FAQ for some tricky cases
2 participants