code: function checkKey (context, vFor, element) {
    if (element.name === 'template') {
      for (const child of element.children) {
        if (child.type === 'VElement') {
          checkChildKey(context, vFor, child)
        }
      }
      return
    }
  
    const vBindKey = utils.getDirective(element, 'bind', 'key')
  
    if (utils.isCustomComponent(element) && vBindKey == null) {
      context.report({
        node: element.startTag,
        loc: element.startTag.loc,
        message: "Custom elements in iteration require 'v-bind:key' directives."
      })
    }
    if (vBindKey != null && !isUsingIterationVar(vFor, vBindKey)) {
      context.report({
        node: vBindKey,
        loc: vBindKey.loc,
        message: "Expected 'v-bind:key' directive to use the variables which are defined by the 'v-for' directive."
      })
    }
  }
docs: Check the given element about `v-bind:key` attributes.
  @param {RuleContext} context The rule context to report.
  @param {ASTNode} vFor The attribute node of `v-for` to check.
  @param {ASTNode} element The element node to check.