-
Notifications
You must be signed in to change notification settings - Fork 25
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
feat(eslint-plugin-rules): checking for ouiaId in pf4 components only #470
Conversation
@lfu @jeremylenz Can you take a look? |
Added |
@MariaAga How do I recreate the eslint rule failure? |
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.
Tested with the katello PR to add ouia-Ids to tabs. Able to get missing ouia_id warnings with this PR when ouia-Id is missing. Ack based on my testing👍🏼
@lfu, have a React component named Text, and import it import React from 'react';
export const Text = props = <div {...props)>Text</div>
import React from 'react';
import { Text } from './Text'
const Component = <Text /> |
@MariaAga I can't reproduce the eslint failure.
|
@lfu looks like youre testing in foreman, foreman doesn't use the ouiaId rule yet, I want to add it to Foreman after this pr so when we add it we'll only add ids where needed. I pasted your example in Katello and got |
@MariaAga |
@lfu from the Readme file, I see that we only want to add ouiaid to pf4 ouiaid complied components. So from what I understand we shouldn't add the ouiaid to other components, so the lint rule should not "make" us add the ouiaid |
Soo, is this good to go? |
🎉 This PR is included in version The release is available on:
Thank you for your contribution, your foreman-js bot 🤖 |
This eslint rule failed in foreman core for components with the same name, that were imported from somewhere else, like from
patternfly-react
or just, for exampleimport Text from '../Text';
.