eslint-plugin-class-methods-use-this-regexp
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-regexp
:
$ npm install --save-dev eslint eslint-plugin-class-methods-use-this-regexp
Usage
Add class-methods-use-this-regexp
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
:
Alternatively you may use the plugin's recommended configuration, which applies the above configuration: