Skip to content

Types broken in latest release #631

@mrmckeb

Description

@mrmckeb

Hi there, thanks for all of the hard work here.

The change here (in the last release) seems to have broken types:
https://github.com/vitest-dev/eslint-plugin-vitest/pull/618/files#diff-a2a171449d862fe29692ce031981047d7ab755ae7f84c707aef80701b3ea0c80R169

Previously, vitestPlugin.configs.recommended was correctly typed:
image

The configs object is now possibly undefined, and the recommended config is now typed as any.

For now, the workaround is cast the type back, i.e.

const config = [vitestPlugin.configs?.recommended as Config];

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions