docs: function validateBemJsonNode(bemJson, fileName) {
    let errors = [];
  
    const fieldTypes = {
      block: ['string'],
      elem: ['string'],
      mods: ['object'],
      elemMods: ['object'],
      content: ['object', 'string', 'number', 'boolean'],
      html: ['string'],
      mix: ['object', 'string'],
      js: ['boolean', 'object'],
      bem: ['boolean'],
      attrs: ['object'],
      cls: ['string'],
      tag: ['boolean', 'string'],
    };
  
    Object.keys(bemJson).forEach((bemJsonKey) => {
      if (!fieldTypes[bemJsonKey]) {
        return;
      }
  
      let validType = false;
      fieldTypes[bemJsonKey].forEach((fieldType) => {
        if (typeof bemJson[bemJsonKey] === fieldType) {
          validType = true;
        }
      });
      if (!validType) {
        errors.push(new Error('BemJson type mismatch. Value of "' + bemJsonKey +
          '" expected to be {' + fieldTypes[bemJsonKey].join('|') +
          '}. Got: {' + typeof bemJson[bemJsonKey] + '}. Node: '
          + extractBemJsonNode(bemJson) + '. File: ' + fileName));
      }
    });
  
    if (bemJson.html && Object.keys(bemJson).length > 1) {
      errors.push(new Error('BemJson node has "html" key. ' +
        'Other keys will be ignored. Node: ' + extractBemJsonNode(bemJson) +
        '. File: ' + fileName));
    }
  
    if (bemJson.mods && !(bemJson.elem || bemJson.block)) {
      errors.push(new Error('BemJson node has "mods" key, but miss "block" or '
        + '"elem". Key "mods" will be ignored. Node: '
        + extractBemJsonNode(bemJson) + '. File: ' + fileName));
    }
  
    if (bemJson.elemMods && !bemJson.elem) {
      errors.push(new Error('BemJson node has "elemMods" key, but miss "elem". '
        + 'Key "elemMods" will be ignored. Node: ' + extractBemJsonNode(bemJson) +
        '. File: ' + fileName));
    }
  
    return errors;
  }