Nothing's plumb meaningless
Have ideas to improve npm?Join in the discussion! »

eslint-plugin-class-methods-use-this-regex

0.1.3 • Public • Published

eslint-plugin-class-methods-use-this-regex

An enhanced version of the ESLint class-methods-use-this rule with RegExp exceptMethods option.

Installation

Install ESLint and eslint-plugin-class-methods-use-this-regex:

$ yarn add eslint eslint-plugin-class-methods-use-this-regex --dev

Usage

Add class-methods-use-this-regex to the plugins section of your .eslintrc configuration file, and
configure the rule under the rules section. Don't forget to disable the core rule class-methods-use-this:

{
    "plugins": [
        "class-methods-use-this-regex"
    ],
    "rules": {
        "class-methods-use-this": 0,
        "class-methods-use-this-regex/class-methods-use-this": [2, {
            "exceptMethods": ["render"]
        }]
    }
}

Install

npm i eslint-plugin-class-methods-use-this-regex

DownloadsWeekly Downloads

250

Version

0.1.3

License

MIT

Unpacked Size

3.85 kB

Total Files

6

Last publish

Collaborators

  • avatar