1.0.0 • Published 3 years ago

@aligent/eslint-plugin-no-disabled-buttons v1.0.0

Weekly downloads
-
License
MIT
Repository
bitbucket
Last release
3 years ago

eslint-plugin-no-disabled-buttons

ESlint rule to enforce that buttons are never set to disabled, except when there is no better solution. Disabled buttons can lead to poor UX experience and negatively affects accessibility.

Articles about why using disabled buttons is usually bad practice:

Installation

You'll first need to install ESLint:

npm i eslint --save-dev
# or
yarn add --dev eslint

Next, install eslint-plugin-no-disabled-buttons:

npm install eslint-plugin-no-disabled-buttons --save-dev
# or
yarn add --dev @aligent/eslint-plugin-no-shared-talons

Usage

Add no-disabled-buttons to the plugins section of your .eslintrc configuration file. You can omit the eslint-plugin- prefix:

{
    "plugins": [
        "no-disabled-buttons"
    ]
}

Then configure the rules you want to use under the rules section.

{
    "rules": {
        "no-disabled-buttons/rule-name": 2
    }
}
1.0.0

3 years ago