Skip to content

feat(typescript-eslint): allow infinitely deep array nesting in config function and extends #10333

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

Merged
merged 3 commits into from
Nov 16, 2024

Conversation

bradzacher
Copy link
Member

PR Checklist

Overview

This has been a pet peeve of mine for a long while now and I've been meaning to action it as a big DevX improvement.

This PR simply allows users to infinitely nest arrays in the tseslint.config utility input AND in the extends key.

The docs updates are proof enough of how much this simplifies things.

Note that ESLint upstream is planning on allowing nested arrays which is what spurred me to build it right now.

@typescript-eslint
Copy link
Contributor

Thanks for the PR, @bradzacher!

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.

@bradzacher bradzacher added the enhancement New feature or request label Nov 15, 2024
Copy link

nx-cloud bot commented Nov 15, 2024

Copy link

netlify bot commented Nov 15, 2024

Deploy Preview for typescript-eslint ready!

Name Link
🔨 Latest commit 17eb11a
🔍 Latest deploy log https://app.netlify.com/sites/typescript-eslint/deploys/6738101e6f59ef00086f3bfc
😎 Deploy Preview https://deploy-preview-10333--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: 92 (🔴 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.

@kirkwaiblinger
Copy link
Member

Oh, hell yes ❤️

@Josh-Cena
Copy link
Member

You would need to add this to the config reference docs otherwise LGTM 👍

Copy link

codecov bot commented Nov 15, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 86.63%. Comparing base (00a3a84) to head (17eb11a).
Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main   #10333   +/-   ##
=======================================
  Coverage   86.63%   86.63%           
=======================================
  Files         433      433           
  Lines       15202    15204    +2     
  Branches     4439     4439           
=======================================
+ Hits        13170    13172    +2     
  Misses       1675     1675           
  Partials      357      357           
Flag Coverage Δ
unittest 86.63% <100.00%> (+<0.01%) ⬆️

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

Files with missing lines Coverage Δ
packages/typescript-eslint/src/config-helper.ts 100.00% <100.00%> (ø)

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.

Hell yeah!!

@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 Nov 15, 2024
@bradzacher
Copy link
Member Author

You would need to add this to the config reference docs otherwise LGTM

@Josh-Cena what docs are you referring to, sorry?
I searched for all spreads and cleaned them up.

I didn't explicitly mention this behaviour in the docs - but we could do if we wanted.

@bradzacher
Copy link
Member Author

I'm going to merge this as is -- we can always follow-up to add more docs later.

@bradzacher bradzacher merged commit b351703 into main Nov 16, 2024
6 checks passed
@bradzacher bradzacher deleted the bjz/infinite-array-nesting branch November 16, 2024 03:23
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 26, 2024
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 enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants