Skip to content

Commit b0b170e

Browse files
authored
Chore: Fully adopt messageId in require-meta-docs-description rule (#161)
1 parent c10afb8 commit b0b170e

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

lib/rules/require-meta-docs-description.js

+3-2
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,10 @@ module.exports = {
3030
},
3131
],
3232
messages: {
33+
extraWhitespace: '`meta.docs.description` must not have leading nor trailing whitespace.',
34+
mismatch: '`meta.docs.description` must match the regexp {{pattern}}.',
3335
missing: '`meta.docs.description` is required.',
3436
wrongType: '`meta.docs.description` must be a non-empty string.',
35-
extraWhitespace: '`meta.docs.description` must not have leading nor trailing whitespace.',
3637
},
3738
},
3839

@@ -77,7 +78,7 @@ module.exports = {
7778
} else if (!pattern.test(staticValue.value)) {
7879
context.report({
7980
node: descriptionNode.value,
80-
message: '`meta.docs.description` must match the regexp {{pattern}}.',
81+
messageId: 'mismatch',
8182
data: { pattern },
8283
});
8384
}

0 commit comments

Comments
 (0)