Skip to content

Commit c379156

Browse files
committed
Move detect to a static class property
1 parent 8d66521 commit c379156

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

lib/util/Components.js

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,11 @@ class Components {
2020
this._list = {};
2121
}
2222

23+
static detect(rule) {
24+
return componentRule.bind(this, rule); // eslint-disable-line no-use-before-define
25+
}
26+
27+
2328
_getId(node) {
2429
return node && node.range.join(':');
2530
}
@@ -656,8 +661,4 @@ function componentRule(rule, context) {
656661
return updatedRuleInstructions;
657662
}
658663

659-
Components.detect = function(rule) {
660-
return componentRule.bind(this, rule);
661-
};
662-
663664
module.exports = Components;

0 commit comments

Comments
 (0)