Skip to content

Commit 876941d

Browse files
committed
fix: rule: case-pure-western bug
1 parent 7ee2113 commit 876941d

File tree

1 file changed

+9
-6
lines changed

1 file changed

+9
-6
lines changed

src/rules/case-pure-western.ts

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -33,16 +33,19 @@ const findNonWestern = (group: MutableGroupToken): boolean => {
3333
}
3434

3535
const resetValidation = (group: MutableGroupToken): void => {
36+
group.modifiedSpaceAfter = group.spaceAfter
37+
group.modifiedInnerSpaceBefore = group.innerSpaceBefore
38+
group.modifiedStartValue = group.startValue
39+
group.modifiedEndValue = group.endValue
40+
group.validations.length = 0
3641
group.forEach((token) => {
37-
for (const target in ValidationTarget) {
38-
removeValidationOnTarget(token, target as ValidationTarget)
39-
}
42+
token.validations.length = 0
4043
token.modifiedSpaceAfter = token.spaceAfter
41-
token.modifiedType = token.type
42-
token.modifiedValue = token.value
4344
if (token.type === GroupTokenType.GROUP) {
44-
token.modifiedInnerSpaceBefore = token.innerSpaceBefore
4545
resetValidation(token)
46+
} else {
47+
token.modifiedType = token.type
48+
token.modifiedValue = token.value
4649
}
4750
})
4851
}

0 commit comments

Comments
 (0)