Skip to content

fix(utils): allow an array for the values of SharedConfig #10217

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

Conversation

trygveaa
Copy link
Contributor

PR Checklist

Overview

According to the docs for ESLint an array should be allowed here, and the type used by ESLint in their ESLint.Plugin interface is:

Record<string, Linter.LegacyConfig | Linter.Config | Linter.Config[]> | undefined

So we should also allow an array. The helper function tseslint.config returns an array so without this you're not allowed to use a config returned by this function as a value in this record.

Fixes #10213

💖

According to the docs for ESLint an array should be allowed here, and
the type used by ESLint in their `ESLint.Plugin` interface is:

    Record<string, Linter.LegacyConfig | Linter.Config | Linter.Config[]> | undefined

So we should also allow an array. The helper function `tseslint.config`
returns an array so without this you're not allowed to use a config
returned by this function as a value in this record.

Fixes typescript-eslint#10213
@typescript-eslint
Copy link
Contributor

Thanks for the PR, @trygveaa!

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 Oct 27, 2024

Deploy Preview for typescript-eslint ready!

Name Link
🔨 Latest commit 013cc52
🔍 Latest deploy log https://app.netlify.com/sites/typescript-eslint/deploys/671e21b4a80f2600086aafde
😎 Deploy Preview https://deploy-preview-10217--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: 93 (🔴 down 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 Oct 27, 2024

☁️ Nx Cloud Report

CI is running/has finished running commands for commit 013cc52. 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.

@bradzacher bradzacher merged commit 3f34490 into typescript-eslint:main Nov 3, 2024
64 checks passed
@trygveaa trygveaa deleted the sharedconfigs-allow-array branch November 3, 2024 12:21
karlhorky added a commit to upleveled/eslint-config-upleveled that referenced this pull request Nov 8, 2024
renovate bot added a commit to upleveled/eslint-config-upleveled that referenced this pull request Nov 8, 2024
* Update dependency upgrades - non-major

* Fix type error with new typescript-eslint change

- typescript-eslint/typescript-eslint#10217

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Karl Horky <karl.horky@gmail.com>
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 11, 2024
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.

Bug: Type for values of SharedConfigs should allow an array
2 participants