Skip to content

Commit af5c632

Browse files
committed
refactor(plugin-eslint): remove unnecessary Set wrapper
1 parent ffd4afe commit af5c632

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

packages/plugin-eslint/src/lib/meta/groups.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -136,15 +136,13 @@ export function resolveGroupRefs(
136136
groupRules: Record<string, number>,
137137
rulesMap: Record<string, RuleData[]>,
138138
): { refs: Group['refs']; invalidRules: string[] } {
139-
const uniqueRuleIds = [...new Set(Object.keys(rulesMap))];
140-
141139
return Object.entries(groupRules).reduce<{
142140
refs: Group['refs'];
143141
invalidRules: string[];
144142
}>(
145143
(acc, [rule, weight]) => {
146144
const matchedRuleIds = rule.endsWith('*')
147-
? expandWildcardRules(rule, uniqueRuleIds)
145+
? expandWildcardRules(rule, Object.keys(rulesMap))
148146
: [rule];
149147

150148
const matchedRefs = matchedRuleIds.flatMap(ruleId => {

0 commit comments

Comments
 (0)