Skip to content

Commit fa25630

Browse files
committed
plural message fix
1 parent e9137ae commit fa25630

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

src/report.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ export function reportParentNode(
3131
loc,
3232
messageId,
3333
data: {
34+
plural: unsortedCount > 1 ? 's' : '',
3435
unsortedCount,
3536
notice: getDeprecationMessage(context.id.split('/').at(-1)!),
3637
},

src/types/error.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
export enum ErrorMessage {
2-
InterfaceParentInvalidOrder = `Found {{ unsortedCount }} keys out of order.`,
3-
EnumParentInvalidOrder = `Found {{ unsortedCount }} members out of order.{{ notice }}`,
2+
InterfaceParentInvalidOrder = `Found {{ unsortedCount }} key{{plural}} out of order.`,
3+
EnumParentInvalidOrder = `Found {{ unsortedCount }} member{{plural}} out of order.{{ notice }}`,
44
InterfaceInvalidOrder = `Expected interface keys to be in {{ order }}ending {{ options }}order. '{{ nodeName }}' should be {{ messageShouldBeWhere }}. Run autofix to sort entire body.`,
55
EnumInvalidOrder = `Expected enum members to be in {{ order }}ending {{ options }}order. '{{ nodeName }}' should be {{ messageShouldBeWhere }}. Run autofix to sort entire body.{{ notice }}`,
66
}

0 commit comments

Comments
 (0)