@theforeman/eslint-plugin-rules

13.0.1 • Public • Published

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.

Readme

Keywords

none

Package Sidebar

Install

npm i @theforeman/eslint-plugin-rules

Weekly Downloads

835

Version

13.0.1

License

MIT

Unpacked Size

7.27 kB

Total Files

6

Last publish

Collaborators

  • sharvita
  • amirfefer