@theforeman/eslint-plugin-rules
v13.1.0
Published
Eslint custom rules for the foreman
Downloads
5,122
Readme
Eslint Plugin Rules
About
Place for eslint custom rules for Foreman and plugins
Usage
Create an eslintrc file
{
"plugins": ["@theforeman/rules"],
"rules": {
"@theforeman/rules/require-ouiaid": "warn",
}
}
ouiaId
prop is used in automation tests. An example can be found here.
If not specified in the eslintrc file, these components will be checked for an ouiaId
prop:
"Alert",
"Breadcrumb",
"Button",
"Card",
"Checkbox",
"Chip",
"ChipGroup",
"ContextSelector",
"Dropdown",
"DropdownItem",
"DropdownSeparator",
"DropdownToggle",
"DropdownToggleCheckbox",
"FormSelect",
"Menu",
"Modal",
"ModalBoxCloseButton",
"ModalContent",
"Nav",
"NavExpandable",
"NavItem",
"OptionsMenu",
"Pagination",
"Radio",
"RowWrapper",
"Select",
"Switch",
"TabButton",
"TabContent",
"Tabs",
"Text",
"TextInput",
"Title",
"Toolbar",
"Table",
"TableComposable",
"Tr"
You can specify what components you want to check against.
{
"plugins": ["@theforeman/rules"],
"rules": {
"@theforeman/rules/require-ouiaid": [
"warn",
"Button",
"Table",
]
}
Here is the list of OUIA-compliant PatternFly 4 components.