feat(lint): Add ESLint rule to warn against spreading props
Created by: plibither8
This PR adds an ESLint rule to warn against spreading ambiguously-named props (props
and rest
) into components.
Bad code:
<MyComponent {...rest} />
~~~~~~~
OK code:
<MyComponent {...ariaAttributes} />
Bonus amazing code:
const { prop_one, prop_two } = props
<MyComponent prop_one={prop_one} prop_two={prop_two} />
Test plan
Tested on VS Code by implementing the unsafe patterns and observing eslint warning showing up.
App preview:
Check out the client app preview documentation to learn more.