You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
This caused some confusion for me because my imports were updated to use @storybook/testing-library, which was not installed. When I installed @storybook/testing-library, I got a deprecation warning telling me to use @storybook/test instead. It'd be nice to have an option to configure which npm package should be used for this and ideally it should default to @storybook/test going forwards.
To Reproduce
Steps to reproduce the behavior:
Write an import like import {/* ... */} from '@testing-library/react'
Run eslint --fix
Observe that the import has been updated to import { /* ... */} from '@storybook/testing-library
Expected behavior
The import should be updated to @storybook/test but ideally should be configurable to use either @storybook/test or @storybook/testing-library.
Screenshots
N/A
Additional context
As a temporary workaround to this, you can add the following rule to your ESLint config to disallow the use of @testing-library/react:
but ideally the rule should detect whether the user has the @storybook/test package and use it instead. It's a little tricky as the rule should still respect when the user is using the legacy packages (@storybook/testing-library, @storybook/jest). I'll try to come up with a fix for this!
Describe the bug
This caused some confusion for me because my imports were updated to use
@storybook/testing-library
, which was not installed. When I installed@storybook/testing-library
, I got a deprecation warning telling me to use@storybook/test
instead. It'd be nice to have an option to configure which npm package should be used for this and ideally it should default to@storybook/test
going forwards.To Reproduce
Steps to reproduce the behavior:
import {/* ... */} from '@testing-library/react'
eslint --fix
import { /* ... */} from '@storybook/testing-library
Expected behavior
The import should be updated to
@storybook/test
but ideally should be configurable to use either@storybook/test
or@storybook/testing-library
.Screenshots
N/A
Additional context
As a temporary workaround to this, you can add the following rule to your ESLint config to disallow the use of
@testing-library/react
:The text was updated successfully, but these errors were encountered: