-
-
Notifications
You must be signed in to change notification settings - Fork 23
feat(react-x): add 'no-unused-props' rule #1161
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
base: 2.0.0-beta
Are you sure you want to change the base?
Conversation
@ulrichstark is attempting to deploy a commit to the Rel1cx's projects Team on Vercel. A member of the Team first needs to authorize it. |
Hey @Rel1cx, I'm already making better progress than expected on this rule. As you can see, four basic invalid and four basic valid tests are already passing. Before continuing I wanted to confirm that the direction I'm going matches your expectation of this rule. The most important question right now is if I should count prop keys as used if they are destructered/accessed from the props object, but NOT used after that (in JSX for example). I would decide for no, because that case is already covered by https://eslint.org/docs/latest/rules/no-unused-vars. See my valid tests for reference. They currently pass because destructuring from the props object is enough to be counted as used. Some other decisions I made so far:
If you notice anything incorrect in my current changes, feel free to point that out or change it to your desire. |
You are right. This aligns with our philosophy: Each rule should have a single purpose. Make multiple rules work together to achieve more complex behaviors. So far so good, Thanks for the amazing work! |
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
Signed-off-by: Ulrich Stark <github@ustark.de>
Signed-off-by: REL1CX <dokimondex@gmail.com>
Signed-off-by: REL1CX <dokimondex@gmail.com>
What kind of change does this PR introduce?
Does this PR introduce a breaking change?
Checklist
fix: remove a typo, closes #___, #___
)Other information