💼 This rule is enabled in the ✅ recommended
config.
When using meta.messages
and messageId
to report rule violations, it's possible to mistakenly use a messageId
that doesn't exist in meta.messages
.
Examples of incorrect code for this rule:
/* eslint eslint-plugin/no-missing-message-ids: error */
module.exports = {
meta: {
messages: {
foo: 'hello world',
},
},
create(context) {
return {
CallExpression(node) {
context.report({
node,
messageId: 'abc',
});
},
};
},
};
Examples of correct code for this rule:
/* eslint eslint-plugin/no-missing-message-ids: error */
module.exports = {
meta: {
messages: {
foo: 'hello world',
},
},
create(context) {
return {
CallExpression(node) {
context.report({
node,
messageId: 'foo',
});
},
};
},
};