Closed ndelangen closed 4 months ago
LGTM, I am curious what @yannbf thinks about this!
Can one plugin turn off a rule from another plugin? And are we sure hooks always keep working? Or only if they use storybook hooks?
Can one plugin turn off a rule from another plugin?
@kasperpeulen I think this answers your question: https://github.com/storybookjs/eslint-plugin-storybook/pull/149/files#diff-ded734a061dba2176af9593a93a97d7e478a8aa10774724c78ade7977e783832R13
This very plugin is already doing that.
And are we sure hooks always keep working?
This does not impact runtime of hooks. There's no difference in react's hooks vs custom hooks for the eslint plugin, you can't disable 1, and not the other.
:rocket: PR was released in v0.7.0
:rocket:
To resolve this issue, please use the official storybook eslint plugin. the latest version should resolve this issue, see: https://github.com/storybookjs/eslint-plugin-storybook/releases/tag/v0.7.0
Closes: https://github.com/storybookjs/storybook/issues/21115
What Changed
I chatted with @valentinpalkovic and we concluded that instead of writing an automigration adding code that in neither case looks "quite right", we considered maybe adding an exception to the config exposed by the plugin, which turns off the problems reported from
react-hooks
eslint plugin.Checklist
Check the ones applicable to your change:
yarn update-all
Change Type
Indicate the type of change your pull request is:
maintenance
documentation
patch
minor
major
📦 Published PR as canary version:
0.7.0--canary.149.b9dd4e1.0
:sparkles: Test out this PR locally via: ```bash npm install eslint-plugin-storybook@0.7.0--canary.149.b9dd4e1.0 # or yarn add eslint-plugin-storybook@0.7.0--canary.149.b9dd4e1.0 ```