-
Notifications
You must be signed in to change notification settings - Fork 0
Fix: Add missing eslint-plugin-storybook dependency #256
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -22,5 +22,7 @@ export const SchemaRenderer = ({ schema }: { schema: any }) => { | |||||||||||||||||
| return <div className="p-2 text-xs text-red-500 border border-red-200 bg-red-50 rounded">Unknown: {type}</div>; | ||||||||||||||||||
| } | ||||||||||||||||||
|
|
||||||||||||||||||
| // False positive: Component is retrieved from registry, not created during render | ||||||||||||||||||
| // eslint-disable-next-line react-hooks/rules-of-hooks | ||||||||||||||||||
|
Comment on lines
+25
to
+26
|
||||||||||||||||||
| // False positive: Component is retrieved from registry, not created during render | |
| // eslint-disable-next-line react-hooks/rules-of-hooks | |
| // Component is retrieved from registry, not created during render |
Copilot
AI
Jan 29, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This renderer spreads the entire schema object into the resolved component ({...schema}), which passes keys like type, hidden, props, etc. down into renderers and can leak invalid attributes to DOM elements (e.g., div renderer spreads remaining props). Prefer the same pattern used in packages/react/src/SchemaRenderer.tsx: pass schema plus schema.props/className and any data attributes explicitly, rather than spreading the schema object.
| // False positive: Component is retrieved from registry, not created during render | |
| // eslint-disable-next-line react-hooks/rules-of-hooks | |
| return <Component schema={schema} {...schema} />; | |
| const { props, className } = schema; | |
| // False positive: Component is retrieved from registry, not created during render | |
| // eslint-disable-next-line react-hooks/rules-of-hooks | |
| return <Component schema={schema} className={className} {...props} />; |
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -36,6 +36,8 @@ const StatisticRenderer = ({ schema }: { schema: StatisticSchema }) => { | |||||
| {schema.label} | ||||||
| </p> | ||||||
| )} | ||||||
| {/* False positive: Icon is a component reference from getIcon(), not a hook call */} | ||||||
| {/* eslint-disable-next-line react-hooks/rules-of-hooks */} | ||||||
|
Comment on lines
+39
to
+40
|
||||||
| {/* False positive: Icon is a component reference from getIcon(), not a hook call */} | |
| {/* eslint-disable-next-line react-hooks/rules-of-hooks */} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
eslint-plugin-storybook@^10.2.1declares a peer dependency onstorybook@^10.2.1, but this repo pinsstorybook@^8.6.15(and related@storybook/*packages). With pnpm, this can produce peer dependency errors/warnings and may fail CI installs depending on settings. Align the plugin version with the installed Storybook major (or upgrade Storybook to satisfy the plugin’s peer range).