eslint-plugin-eslint-disable-enforce-comment-above

1.0.1 • Public • Published

eslint-plugin-eslint-disable-enforce-comment-above

Enforce adding comment above eslint-disable explaining why.

Installation

You'll first need to install ESLint:

npm i eslint --save-dev

Next, install eslint-plugin-eslint-disable-enforce-comment-above:

npm install eslint-plugin-eslint-disable-enforce-comment-above --save-dev

Usage

Add eslint-disable-enforce-comment-above to the plugins section of your .eslintrc configuration file. You can omit the eslint-plugin- prefix:

{
    "plugins": [
        "eslint-disable-enforce-comment-above"
    ]
}

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

{
    "rules": {
        "eslint-disable-enforce-comment-above/eslint-disable-enforce-comment-above": "warn"
    }
}

Example

Bad:

/* eslint-disable */

✔️ Good:

// Add some descriptive comment explaining why.
/* eslint-disable */

Package Sidebar

Install

npm i eslint-plugin-eslint-disable-enforce-comment-above

Weekly Downloads

2,216

Version

1.0.1

License

ISC

Unpacked Size

4.73 kB

Total Files

5

Last publish

Collaborators

  • ppetkov