We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6eaccb8 commit 66ab408Copy full SHA for 66ab408
1 file changed
lib/rules/yield-star-spacing.js
@@ -76,8 +76,13 @@ module.exports = {
76
const after = leftToken.value === "*";
77
const spaceRequired = mode[side];
78
const node = after ? leftToken : rightToken;
79
- const type = spaceRequired ? "missing" : "unexpected";
80
- const messageId = `${type}${side[0].toUpperCase()}${side.slice(1)}`;
+ let messageId = "";
+
81
+ if (spaceRequired) {
82
+ messageId = side === "before" ? "missingBefore" : "missingAfter";
83
+ } else {
84
+ messageId = side === "before" ? "unexpectedBefore" : "unexpectedAfter";
85
+ }
86
87
context.report({
88
node,
0 commit comments