ESLint plugin

eslint-plugin-orbit-components

Installation

# npm
npm install eslint-plugin-orbit-components --save-dev
# yarn
yarn add eslint-plugin-orbit-components --dev
{
"plugins": [
// ...
"orbit-components"
],
"rules": {
// ...
"orbit-components/button-has-title": "error",
"orbit-components/unnecessary-text": "error",
}
}
{
"extends": [
"plugin:orbit-components/recommended",
]
}

Supported Rules

  • button-has-title: Enforces that Button and ButtonLink do have either children or title property.
  • unnecessary-text: Enforces that children of Button or Heading are not wrapped in Text component.

License