@aligent/eslint-plugin-no-disabled-buttons

1.0.0 • Public • Published

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
    }
}

Package Sidebar

Install

npm i @aligent/eslint-plugin-no-disabled-buttons

Weekly Downloads

3

Version

1.0.0

License

MIT

Unpacked Size

6.95 kB

Total Files

8

Last publish

Collaborators

  • sam.tyler
  • torbjorn.vanheeswijck
  • aligent-bot
  • aligent-danielvanderploeg
  • jarrod.swift