-
-
Notifications
You must be signed in to change notification settings - Fork 42
[feat] New rule no-explict-spread-props #503
Copy link
Copy link
Closed
Labels
Status: ReleasedThe issue has been releasedThe issue has been releasedType: New RecipeIntroduce a new recipeIntroduce a new recipe
Description
Describe the problem
<a
className={styles.link}
{...{
href: props.href,
rel: 'noopener noreferrer',
target: '_blank',
}}
{...props}
>
{label}
</a>Describe the solution you'd like
This kind of code should be forbidden and should be auto fixed to
<a
className={styles.link}
href={props.href}
rel="noopener noreferrer"
target="_blank"
{...props}
>
{label}
</a>Alternatives considered
No response
Additional context
This should be allowed:
<Comp
{...(
props.a ? { b: 'c' } : {}
)}
{...props}
/>Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
Status: ReleasedThe issue has been releasedThe issue has been releasedType: New RecipeIntroduce a new recipeIntroduce a new recipe