Skip to content

Commit

Permalink
Move detect to a static class property
Browse files Browse the repository at this point in the history
  • Loading branch information
jseminck committed Nov 14, 2017
1 parent 8d66521 commit c379156
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions lib/util/Components.js
Expand Up @@ -20,6 +20,11 @@ class Components {
this._list = {};
}

static detect(rule) {
return componentRule.bind(this, rule); // eslint-disable-line no-use-before-define
}


_getId(node) {
return node && node.range.join(':');
}
Expand Down Expand Up @@ -656,8 +661,4 @@ function componentRule(rule, context) {
return updatedRuleInstructions;
}

Components.detect = function(rule) {
return componentRule.bind(this, rule);
};

module.exports = Components;

0 comments on commit c379156

Please sign in to comment.