Skip to content

5.0 causes eslint issue with TS vite config #691

@palfrey

Description

@palfrey

Related plugins

Describe the bug

In 5.0 with a TS vite.config.ts, I get error Unsafe call of a(n) error type typed value @typescript-eslint/no-unsafe-call that didn't appear in 4.4.1. This is on the react() line in the config.

Reproduction

https://stackblitz.com/edit/vitejs-vite-s2jvgte3?file=eslint.config.ts

Steps to reproduce

Have a vite.config.ts with the standard react() setup and @typescript-eslint/eslint-plugin installed for eslint.

The repo url demos it with eslint command.

System Info

System:
    OS: Linux 6.1 Debian GNU/Linux trixie/sid
    CPU: (12) x64 Intel(R) Core(TM) i7-10750H CPU @ 2.60GHz
    Memory: 21.48 GB / 31.10 GB
    Container: Yes
    Shell: 5.7.1 - /usr/bin/zsh
  Binaries:
    Node: 22.18.0 - ~/.asdf/installs/nodejs/22.18.0/bin/node
    npm: 10.9.3 - ~/.asdf/installs/nodejs/22.18.0/bin/npm
    pnpm: 10.14.0 - ~/.asdf/shims/pnpm
  Browsers:
    Chromium: 138.0.7204.92
  npmPackages:
    @vitejs/plugin-react: ^5.0.0 => 5.0.0
    vite: ^7.0.0 => 7.1.1

Used Package Manager

pnpm

Logs

No response

Validations

Metadata

Metadata

Assignees

No one assigned

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions