eslint-plugin-class-methods-use-this-regex
v1.0.0
Published
An enhanced version of the ESLint class-methods-use-this rule with RegExp exceptMethods option
Downloads
1,121
Maintainers
Readme
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": ["off"],
"class-methods-use-this-regex/class-methods-use-this": ["error", {
"exceptMethods": ["^render.*$"]
}]
}
}