storybookjs / eslint-plugin-storybook

🎗Official ESLint plugin for Storybook
MIT License
245 stars 52 forks source link

unused const warning #144

Open landsman opened 11 months ago

landsman commented 11 months ago

Describe the bug

I can see warnings in my stories about unused constants. I think that this should be covered by this package, plugin.

Screenshot 2023-11-03 at 11 54 06

my .eslintrc.json

{
  "extends": [
    "next/core-web-vitals",
    "plugin:storybook/recommended"
  ]
}

workaround is to put above ignore: // @ts-ignore unused but it's ugly. Please suggest the correct way. I'm using next.js 13+ and app router, but most of mine stories are in directory: ./src/components.

Related question: https://github.com/storybookjs/storybook/issues/11093

beckettart commented 4 months ago

This would be a helpful feature for me too. I'm using PhpStorm's "Inspect Code" feature, and this causes my results to be cluttered.

AJ198081 commented 2 months ago

This issue is the only blemish on an otherwise perfect 'storybook' setup, will be highly appreciated if it can be fixed, or otherwise if there is a work-around recommended for it...