'use strict'; const require_runtime = require('../_virtual/_rolldown/runtime.js'); const require_index = require('../utils/index.js'); //#region lib/rules/no-empty-component-block.js /** * @author tyankatsu * See LICENSE file in root directory for full license. */ var require_no_empty_component_block = /* @__PURE__ */ require_runtime.__commonJSMin(((exports, module) => { const { isVElement } = require_index.default; /** * check whether has attribute `src` * @param {VElement} componentBlock */ function hasAttributeSrc(componentBlock) { const hasAttribute = componentBlock.startTag.attributes.length > 0; const hasSrc = componentBlock.startTag.attributes.some((attribute) => !attribute.directive && attribute.key.name === "src" && attribute.value && attribute.value.value !== ""); return hasAttribute && hasSrc; } /** * check whether value under the component block is only whitespaces or break lines * @param {VElement} componentBlock */ function isValueOnlyWhiteSpacesOrLineBreaks(componentBlock) { return componentBlock.children.length === 1 && componentBlock.children[0].type === "VText" && !componentBlock.children[0].value.trim(); } module.exports = { meta: { type: "suggestion", docs: { description: "disallow the `