eslint-plugin-orbit-components
Collection of ESLint rules to enforce the best usage practices of @kiwicom/orbit-components
.
Installation
Assuming you already have ESLint installed, run:
# npmnpm install eslint-plugin-orbit-components --save-dev# yarnyarn add eslint-plugin-orbit-components --dev
Then add it to your ESLint configuration:
{"plugins": [// ..."orbit-components"],"rules": {// ..."orbit-components/button-has-title": "error","orbit-components/unnecessary-text": "error",}}
or via extending our recommended config:
{"extends": ["plugin:orbit-components/recommended",]}
Supported Rules
- button-has-title: Enforces that
Button
andButtonLink
do have eitherchildren
ortitle
property. - unnecessary-text: Enforces that children of
Button
orHeading
are not wrapped inText
component.
License
MIT