Skip to content

docs: refreshed typescript-eslint package docs, especially tseslint.config #10725

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

Primarily applies two refactors on the page:

  • Moves config(...) docs much higher, so people are more likely to see them
    • The eslintrc migration section is moved to the very end - there are still folks who need it but it's not quite as commonplace as it was half a year ago
  • Rewords the description of extends to what's suggested in the issue, rather than the now-no-longer-technically-true variadic function concept

Also touches up on some other phrasings:

  • Slightly longer descriptions introductory table, to explain more about the exports
  • // ... instead of the 2nd+ rule in rules: { ... }s, for brevity
    • Switched from no-unsafe-* to no-floating-promises since it's more commonly known on its own

💖

@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 0d225dc
🔍 Latest deploy log https://app.netlify.com/sites/typescript-eslint/deploys/67b38a474c79cc00078ef284
😎 Deploy Preview https://deploy-preview-10725--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: 89 (🟢 up 16 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 0d225dc.

Command Status Duration Result
nx test visitor-keys --coverage=false ✅ Succeeded <1s View ↗
nx run types:build ✅ Succeeded <1s View ↗
nx test typescript-eslint --coverage=false ✅ Succeeded <1s View ↗
nx run-many --target=build --exclude website --... ✅ Succeeded 5s View ↗
nx test type-utils --coverage=false ✅ Succeeded <1s View ↗
nx test utils --coverage=false ✅ Succeeded <1s View ↗
nx test typescript-estree --coverage=false ✅ Succeeded <1s View ↗
nx test rule-tester --coverage=false ✅ Succeeded <1s View ↗
Additional runs (24) ✅ Succeeded ... View ↗

☁️ Nx Cloud last updated this comment at 2025-02-17 19:19:54 UTC

@@ -204,12 +99,15 @@ export default [
</Tabs>

:::note
We _**strongly**_ recommend using this utility to improve the config authoring experience — however it is entirely optional. By choosing not to use it you lose editor autocomplete and type checking for config files but otherwise it _will not_ impact your ability to use our tooling.
We _**strongly**_ recommend using this utility to improve the config authoring experience — however it is entirely optional.
By choosing not to use it you lose editor autocomplete and type checking for config files.
Copy link
Member

Choose a reason for hiding this comment

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

and also the extends key 🤷

Copy link
Member Author

Choose a reason for hiding this comment

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

For now. eslint/rfcs#126 was accepted and eslint/eslint#19116 is in Implementing status. I think mentioning extends won't be accurate for very long.

Copy link
Member

Choose a reason for hiding this comment

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

hmm, but what's scary to me about not mentioning it at all is that eslint/eslint#19116 will have extends with different semantics. Is there a way to preempt that? I'm ok with whatever you think is best here

Copy link
Member Author

Choose a reason for hiding this comment

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

Hmm, true... proposal: can we split this out as a followup issue? I don't have a strong gut feeling on the right way to preempt this.

Copy link
Member Author

Choose a reason for hiding this comment

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

Copy link

codecov bot commented Feb 17, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 87.30%. Comparing base (94e8098) to head (0d225dc).
Report is 59 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #10725      +/-   ##
==========================================
+ Coverage   87.26%   87.30%   +0.03%     
==========================================
  Files         450      450              
  Lines       15712    15758      +46     
  Branches     4600     4614      +14     
==========================================
+ Hits        13711    13757      +46     
  Misses       1645     1645              
  Partials      356      356              
Flag Coverage Δ
unittest 87.30% <ø> (+0.03%) ⬆️

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

see 21 files with indirect coverage changes

Co-authored-by: Kirk Waiblinger <53019676+kirkwaiblinger@users.noreply.github.com>
Copy link
Member

@bradzacher bradzacher left a comment

Choose a reason for hiding this comment

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

lgtm15

Copy link
Member

@kirkwaiblinger kirkwaiblinger left a comment

Choose a reason for hiding this comment

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

Oh - the other thing that I think might be good to mention would be the .flat(Infinity) call that makes the ...spread unnecessary. Same convo as #10725 (comment) I suppose

Copy link
Member

@kirkwaiblinger kirkwaiblinger left a comment

Choose a reason for hiding this comment

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

Approving since my feedback isn't necessarily requesting changes but curious for your thoughts

@JoshuaKGoldberg JoshuaKGoldberg merged commit 662e62b into typescript-eslint:main Feb 20, 2025
61 of 62 checks passed
@JoshuaKGoldberg JoshuaKGoldberg deleted the tseslint-config-extends-cleanup branch February 20, 2025 15:19
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 28, 2025
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.

Docs: Clarity issue on Flat config extends description
3 participants