0.1.0 • Published 8 years ago
eslint-plugin-class-methods-use-this-regexp v0.1.0
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-regexpUsage
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:
{
"plugins": [
"class-methods-use-this-regexp"
],
"rules": {
"class-methods-use-this": 0,
"class-methods-use-this-regexp/class-methods-use-this": [2, {"exceptMethods": ["render"]}]
}
}Alternatively you may use the plugin's recommended configuration, which applies the above configuration:
{
"extends": ["plugin:class-methods-use-this-regexp/recommended"]
}