Skip to content

Improve extract meta#3895

Open
T4rk1n wants to merge 2 commits into
devfrom
improve-extract-meta
Open

Improve extract meta#3895
T4rk1n wants to merge 2 commits into
devfrom
improve-extract-meta

Conversation

@T4rk1n

@T4rk1n T4rk1n commented Jul 10, 2026

Copy link
Copy Markdown
Contributor

Improve extract-meta errors by include file/propPath/line where the error originates.

Restart of #3364, fixes #3362

@sonarqubecloud

Copy link
Copy Markdown

@AnnMarieW

Copy link
Copy Markdown
Collaborator

This is a huge improvement! It's now possible to see which component/prop is generating the error:

Here's an example:

Error with path node_modules/@types/react/index.d.ts:2402:13

ERROR: "sections.dangerouslySetInnerHTML.__html" matches reserved word pattern: /^_.*$/

However, this isn't something I can fix in the component. In this case, the sections prop type is defined in Mantine:

export interface RingProgressSection extends React.ComponentProps<'circle'>, DataAttributes {
  value: number;
  color: MantineColor;
  tooltip?: React.ReactNode;
}

It looks like the parser is recursing into React.ComponentProps<'circle'>, eventually reaching dangerouslySetInnerHTML.__html.

Would it make sense to skip the React DOM types?

As a workaround, I can get the component to build by using prop type any, but I'd rather use the original type information if possible.

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

Successfully merging this pull request may close these issues.

Expose file path in errors for dash-generate-components

2 participants