function checkMetaMessages(context, exportsNode) {
    if (exportsNode.type !== "ObjectExpression") {

        // if the exported node is not the correct format, "internal-no-invalid-meta" will already report this.
        return;
    }

    const metaProperty = getPropertyFromObject("meta", exportsNode);
    const messages = metaProperty && getPropertyFromObject("messages", metaProperty.value);

    if (!messages) {
        context.report({
            node: metaProperty,
            messageId: "expectedMessages"
        });
    }
}
function checkMetaMessages(context, exportsNode) {
    if (exportsNode.type !== "ObjectExpression") {

        // if the exported node is not the correct format, "internal-no-invalid-meta" will already report this.
        return;
    }

    const metaProperty = getPropertyFromObject("meta", exportsNode);
    const messages = metaProperty && getPropertyFromObject("messages", metaProperty.value);

    if (!messages) {
        context.report({
            node: metaProperty,
            messageId: "expectedMessages"
        });
    }
}
function checkMetaMessages ( context , exportsNode ) { if ( exportsNode . type !== "ObjectExpression" ) { // if the exported node is not the correct format, "internal-no-invalid-meta" will already report this. return ; } const metaProperty = getPropertyFromObject ( "meta" , exportsNode ) ; const messages = metaProperty && getPropertyFromObject ( "messages" , metaProperty . value ) ; if ( ! messages ) { context . report ( { node : metaProperty , messageId : "expectedMessages" } ) ; } }
Verifies that the meta.messages property is present.
TODO: check it has the correct value
@param {RuleContext} context The ESLint rule context.
@param {ASTNode} exportsNode ObjectExpression node that the rule exports.
@returns {void}
Verifies that the meta . messages property is present . TODO : check it has the correct value
Checks if the exported node has a messages property