Skip to content

Commit

Permalink
Export an object with a single detect() function, removing the static…
Browse files Browse the repository at this point in the history
… class property
  • Loading branch information
jseminck committed Nov 14, 2017
1 parent e3638ab commit a0d47cf
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions lib/util/Components.js
Expand Up @@ -19,11 +19,6 @@ 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 @@ -662,4 +657,8 @@ function componentRule(rule, context) {
return updatedRuleInstructions;
}

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

0 comments on commit a0d47cf

Please sign in to comment.