eslint-plugin-prefer-bind-operator

v0.0.4
Suggest using the bind operator over Function methods or Reflect.apply.
eslint eslintplugin eslint-plugin

eslint-plugin-prefer-bind-operator Build Status

Suggest using the bind operator over Function methods or Reflect.apply.

Warns for the following:

// with at least one argument
var foo = bar.bind(/* ... */);
foo.call(/* ... */);
foo.apply(/* ... */);
Reflect.apply(foo);

Usage

npm i --save-dev eslint-plugin-prefer-bind-operator

{
  "plugins": [
    "prefer-bind-operator"
  ],
  "rules": {
    "prefer-bind-operator/prefer-bind-operator": 2
  }
}
npm i eslint-plugin-prefer-bind-operator

Metadata

  • MIT
  • Whatever
  • Erik Desjardins
  • released 3/7/2016

Downloads

Maintainers