Thanks to visit codestin.com
Credit goes to github.com

Skip to content

fix(types): add 2026/17 to EcmaVersion #11304

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 1 commit into from
Jun 13, 2025

Conversation

DavidArchibald
Copy link
Contributor

@DavidArchibald DavidArchibald commented Jun 13, 2025

PR Checklist

Overview

I didn't open an issue because it's just for updating a single type for 2026.

I was happening to be manually updating my dependencies and was very confused when I suddenly started getting this error:

Argument of type 'Config<RulesRecord>' is not assignable to parameter of type 'InfiniteDepthConfigWithExtends'.
  Type 'Config<RulesRecord>' is not assignable to type 'ConfigWithExtends'.
    Types of property 'languageOptions' are incompatible.
      Type 'import("/home/david/Projects/My Price Health/mono/node_modules/eslint/lib/types/index").Linter.LanguageOptions | undefined' is not assignable to type 'import("/home/david/Projects/My Price Health/mono/node_modules/@typescript-eslint/utils/dist/ts-eslint/Config").FlatConfig.LanguageOptions | undefined'.
        Type 'import("/home/david/Projects/My Price Health/mono/node_modules/eslint/lib/types/index").Linter.LanguageOptions' is not assignable to type 'import("/home/david/Projects/My Price Health/mono/node_modules/@typescript-eslint/utils/dist/ts-eslint/Config").FlatConfig.LanguageOptions'.
          Types of property 'ecmaVersion' are incompatible.
            Type 'EcmaVersion | undefined' is not assignable to type 'EcmaVersion'.
              Type '17' is not assignable to type 'EcmaVersion'.

This happened because I was writing this:

export default ts.config(
    [...],
    ...compat.extends("old-config")
    [...]
);

Playground
Note to future readers: if you enter this playground after this PR has been merged the error will have been fixed because I don't know how to pin dependency version in the TypeScript playground

And due to compat.extends simply returning Config<RulesRecord>, the update in v9.29.0 to add support for 2026 broke this.

I also considered switching form manually defining export type EcmaVersion = ... independently to being export type EcmaVersion = eslint.Linter.EcmaVersion; as that'd solve the issue in the future but I figured there must be a reason for manually defining EcmaVersion. Perhaps peer dependency issues?

@typescript-eslint
Copy link
Contributor

Thanks for the PR, @DavidArchibald!

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 Jun 13, 2025

Deploy Preview for typescript-eslint ready!

Name Link
🔨 Latest commit f6411ab
🔍 Latest deploy log https://app.netlify.com/projects/typescript-eslint/deploys/684c875fb0b02f0008e357ed
😎 Deploy Preview https://deploy-preview-11304--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: 64 (🔴 down 35 from production)
Accessibility: 100 (no change from production)
Best Practices: 100 (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 project configuration.

Copy link

nx-cloud bot commented Jun 13, 2025

View your CI Pipeline Execution ↗ for commit f6411ab.

Command Status Duration Result
nx test eslint-plugin --coverage=false ✅ Succeeded 5m 5s View ↗
nx run-many -t typecheck ✅ Succeeded 1m 58s View ↗
nx test typescript-estree --coverage=false ✅ Succeeded 19s View ↗
nx run-many -t lint ✅ Succeeded 13s View ↗
nx test eslint-plugin-internal --coverage=false ✅ Succeeded 7s View ↗
nx run generate-configs ✅ Succeeded 10s View ↗
nx run integration-tests:test ✅ Succeeded <1s View ↗
nx run types:build ✅ Succeeded 1s View ↗
Additional runs (27) ✅ Succeeded ... View ↗

☁️ Nx Cloud last updated this comment at 2025-06-13 20:29:57 UTC

@DavidArchibald DavidArchibald changed the title Add 2026/17 to EcmaVersion fix: add 2026/17 to EcmaVersion Jun 13, 2025
@bradzacher bradzacher changed the title fix: add 2026/17 to EcmaVersion fix(types): add 2026/17 to EcmaVersion Jun 13, 2025
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.

Thanks!

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.

2 participants