Skip to content

[Bug]: ESLint plugin recommends deprecated package #34422

@jeremywiebe

Description

@jeremywiebe

Describe the bug

Using the latest version of eslint-plugin-storybook I get a recommendation to use @storybook/test, but that package seems to deprecated in Storybook v10 (this documentation uses storybook/test, also see https://github.com/storybookjs/storybook/tree/v10.3.1/code/core/src/test)

2:1  error  Do not use `@testing-library/react` directly in the story. You should import the functions from `@storybook/test` (preferrably) or `@storybook/testing-library` instead  storybook/use-storybook-testing-library

Referenced code:

'Do not use `{{library}}` directly in the story. You should import the functions from `@storybook/test` (preferrably) or `@storybook/testing-library` instead.',

Reproduction link

https://stackblitz.com/sorry-but-the-cloned-repo-crashed-when-linting

Reproduction steps

  1. Add the following line to a Storybook file: import {within} from "@testing-library/react";
  2. Ensure eslint-plugin-storybook is installed and enabled in the ESLint config
  3. Run ESLint and note the suggestion to use the deprecated @storybook/test package

System

│  
│  Storybook Environment Info:
│

│  System:
│  OS: macOS 26.3.1
│  CPU: (10) arm64 Apple M1 Pro
│  Shell: 4.5.0 - /opt/homebrew/bin/fish
│  Binaries:
│  Node: 24.13.1 - /Users/jeremy/.local/share/mise/installs/node/24.13.1/bin/node
│  Yarn: 1.22.22 - /Users/jeremy/.local/share/mise/installs/node/24.13.1/bin/yarn
│  npm: 11.8.0 - /Users/jeremy/.local/share/mise/installs/node/24.13.1/bin/npm
│  pnpm: 10.32.1 - /Users/jeremy/.local/share/mise/installs/node/24.13.1/bin/pnpm
│  <----- active
│  Browsers:
│  Chrome: 146.0.7680.165
│  Firefox: 148.0.2
│  Safari: 26.3.1
│  npmPackages:
│  @storybook/addon-a11y: 10.3.1 => 10.3.1
│  @storybook/addon-docs: 10.3.1 => 10.3.1
│  @storybook/addon-links: 10.3.1 => 10.3.1
│  @storybook/react-vite: 10.3.1 => 10.3.1
│  eslint-plugin-storybook: 10.3.1 => 10.3.1
│  storybook: 10.3.1 => 10.3.1
│  storybook-multilevel-sort: ^2.1.0 => 2.1.0

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions