Skip to content

Bug: exactOptionalPropertyTypes causes type errors when using plugins that were not built with this option #402

Open
@sebastian-altamirano

Description

@sebastian-altamirano

Environment

Node version: v22.15.0
npm version: v11.3.0
Local ESLint version: v9.27.0 (Currently used)
Global ESLint version: Not found
Operating System: linux 5.15.167.4-microsoft-standard-WSL2

What parser are you using?

Default (Espree)

What did you do?

I have installed some plugins and configured ESLint to use them. ESLint works fine, but TypeScript throws some type errors related to exactOptionalPropertyTypes, which I have set to true in my tsconfig.json since I'm extending from @tsconfig/strictest.

What did you expect to happen?

There should be no type errors when using exactOptionalPropertyTypes.

What actually happened?

Type errors occurred.

Link to Minimal Reproducible Example

https://stackblitz.com/edit/vitejs-vite-gantpukn?file=eslint.config.mjs,tsconfig.json&view=editor

Participation

  • I am willing to submit a pull request for this issue.

Additional comments

I have 2 reproductions:

According to @nzakas: "The Plugin type exported from eslint is the thing that needs updating to address this." (#391 (comment))

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugrepro:yesIssues with a reproducible example

    Type

    No type

    Projects

    Status

    Feedback Needed

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions