Skip to content

Commit

Permalink
Fix declaration-nested-properties-no-divided-groups end positions (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
ybiquitous committed Dec 20, 2023
1 parent 884e401 commit 00c0cc5
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -124,11 +124,15 @@ testRule({
{
line: 3,
column: 9,
endLine: 3,
endColumn: 19,
message: messages.expected("background")
},
{
line: 6,
column: 9,
endLine: 6,
endColumn: 19,
message: messages.expected("background")
}
]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,18 +54,19 @@ function rule(expectation) {
}
});

Object.keys(nestedGroups).forEach(namespace => {
Object.entries(nestedGroups).forEach(([namespace, groups]) => {
// Only warn if there are more than one nested groups with equal namespaces
if (nestedGroups[namespace].length === 1) {
if (groups.length === 1) {
return;
}

nestedGroups[namespace].forEach(group => {
groups.forEach(group => {
utils.report({
message: messages.expected(namespace),
node: group,
result,
ruleName
ruleName,
word: namespace
});
});
});
Expand Down

0 comments on commit 00c0cc5

Please sign in to comment.