-
Notifications
You must be signed in to change notification settings - Fork 842
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
ESLint rule to detect components contains prop href but not rel #3272
ESLint rule to detect components contains prop href but not rel #3272
Conversation
Since this is a community submitted pull request, a Jenkins build has not been kicked off automatically. Can an Elastic organization member please verify the contents of this patch and then kick off a build manually? |
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.
Nice! I think this is a good proxy for the issue, I couldn't find any affected components that this missed. Do you want to fix up the identified components as well? EuiLink and EuiButton are good examples.
For merging, we either need this PR to fix the components, or comment out the rule in .eslintplugin.js or make a follow up PR.
I want to fix up identified components 🤤 with help of your guidance. |
Sounds good! Your changes to EuiBadge look correct, which leaves
The first 3 should have src/components/side_nav/side_nav.test.tsx is a test file and can be ignored with a |
I couldn't figure out why |
@chandlerprall Can you please check this? |
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.
Changes look good to me; please re-enable the rule, and then there's one more change necessary:
src/components/side_nav/side_nav.test.tsx line 113 will need to disable the eslint rule:
// eslint-disable-next-line local/href-with-rel
const renderItem: RenderItem<{}> = ({ href, className, children }) => (
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.
Thanks for solving both sides of the issue!
I added (and fixed a conflict in) the changelog entry since I missed that on my earlier passes
jenkins test this |
Preview documentation changes for this PR: https://eui.elastic.co/pr_3272/ |
Summary
First step to solve #3258 .
audit components containing bug.
Assuming all EUI components are functional component.
Checklist
- [ ] Check against all themes for compatibility in both light and dark modes- [ ] Checked in mobile- [ ] Checked in IE11 and Firefox- [ ] Props have proper autodocs- [ ] Added documentation examples- [ ] Checked for breaking changes and labeled appropriately- [ ] Checked for accessibility including keyboard-only and screenreader modes- [ ] A changelog entry exists and is marked appropriately