Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

storybook/no-uninstalled-addons false positives for submodule #148

Open
guilhermetod opened this issue Jan 31, 2024 · 0 comments
Open

storybook/no-uninstalled-addons false positives for submodule #148

guilhermetod opened this issue Jan 31, 2024 · 0 comments

Comments

@guilhermetod
Copy link

Describe the bug
Potentially unwanted error report when using a submodule from a dependency.

Ie, if package.json had these packages:

{
    "@nx/react": "17.2.8",
    "@storybook/addon-essentials": "^7.5.3",
    "@storybook/addon-interactions": "^7.5.3",
}

We get a false positive as described below:

  addons: [
    '@storybook/addon-essentials',
    '@storybook/addon-interactions',
    '@nx/react/plugins/storybook', // This has an error
    '@nx/react', // This will not have an error, but it's incorrect path
  ],

Keep in mind that it's not possible to install @nx/react/plugins/storybook, so my suggestion if to check for partial dep match instead of full path.

To Reproduce
Steps to reproduce the behavior:

  1. Start nx monorepo
  2. Add react application
  3. Set up storybook with nx generator
  4. Configure eslint-plugin-storybook with mentioned rule
  5. Check error on main.ts

Expected behavior
A clear and concise description of what you expected to happen.

Screenshots
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant