Skip to content

Commit a0d47cf

Browse files
committed
Export an object with a single detect() function, removing the static class property
1 parent e3638ab commit a0d47cf

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

lib/util/Components.js

+5-6
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,6 @@ class Components {
1919
this._list = {};
2020
}
2121

22-
static detect(rule) {
23-
return componentRule.bind(this, rule); // eslint-disable-line no-use-before-define
24-
}
25-
26-
2722
_getId(node) {
2823
return node && node.range.join(':');
2924
}
@@ -662,4 +657,8 @@ function componentRule(rule, context) {
662657
return updatedRuleInstructions;
663658
}
664659

665-
module.exports = Components;
660+
module.exports = {
661+
detect(rule) {
662+
return componentRule.bind(this, rule);
663+
}
664+
};

0 commit comments

Comments
 (0)