eslint-plugin-disallow-property

0.1.1 • Public • Published

eslint-plugin-disallow-property

ESLint plugin for disallowing specified properties

Usage

This plugin requires ESLint to also be installed. With both ESLint and this plugin installed, you will need to enable the plugin and configure what methods are disallowed.

Installation

Install ESLint if you have not already:

npm install eslint --save-dev

Install the plugin:

npm install eslint-plugin-disallow-property --save-dev

Configuration

Configure the plugin and its rules in your .eslintrc file or your shareable config.

Sample .eslintrc:

{
  "plugins": [
    // other plugins would go here

    "disallow-property"
  ],

  rules: {
    // other rules here

    // disallow-property rules
    "disallow-property/disallow-property": [2, ["myDisallowedProperty"]]
  }
}

Configuring rule to 1 will set it to warn and configuring it to 2 will set it to error.

License

MIT

/eslint-plugin-disallow-property/

    Package Sidebar

    Install

    npm i eslint-plugin-disallow-property

    Weekly Downloads

    1

    Version

    0.1.1

    License

    MIT

    Last publish

    Collaborators

    • anders.ekdahl