/** Adapter for HTML ESLint AST nodes to work with capo.js */ export class HtmlEslintAdapter { /** * Check if node is an Element (Tag, ScriptTag, or StyleTag) * * @param {AnyNode} node - The node to check * @returns {node is Tag | ScriptTag | StyleTag} */ isElement(node: AnyNode): node is Tag | ScriptTag | StyleTag; /** * Get the tag name of an element (lowercase) * * @param {Tag | StyleTag | ScriptTag} node - Element node * @returns {string} - Tag name like 'meta', 'link', 'script' */ getTagName(node: Tag | StyleTag | ScriptTag): string; /** * Get attribute value from element * * @param {Tag | StyleTag | ScriptTag} node - Element node * @param {string} attrName - Attribute name (case-insensitive) * @returns {string | null} - Attribute value or null if not found */ getAttribute(node: Tag | StyleTag | ScriptTag, attrName: string): string | null; /** * Check if element has a specific attribute * * @param {Tag | StyleTag | ScriptTag} node - Element node * @param {string} attrName - Attribute name (case-insensitive) * @returns {boolean} - True if attribute exists */ hasAttribute(node: Tag | StyleTag | ScriptTag, attrName: string): boolean; /** * @param {Tag | StyleTag | ScriptTag} node - Element node * @returns {string[]} - Array of attribute names */ getAttributeNames(node: Tag | StyleTag | ScriptTag): string[]; /** * @param {Tag | StyleTag | ScriptTag} node - Element node * @returns {string} - Text content */ getTextContent(node: Tag | StyleTag | ScriptTag): string; /** * Get child elements of a node * * @param {Tag | StyleTag | ScriptTag} node - Parent node * @returns {Tag["children"]} - Array of child element nodes (excluding * text/comment nodes) */ getChildren(node: Tag | StyleTag | ScriptTag): Tag["children"]; /** * Get parent element of a node * * @param {AnyNode} node - Child node * @returns {any | null} - Parent element node, or null if no parent */ getParent(node: AnyNode): any | null; /** * Get sibling elements of a node * * @param {AnyNode} node - Element node * @returns {AnyNode[]} - Array of sibling element nodes (excluding the node * itself) */ getSiblings(node: AnyNode): AnyNode[]; /** * Get source location for a node * * @param {any} node - Element node * @returns {{ * line: number; * column: number; * endLine?: number; * endColumn?: number; * } | null} */ getLocation(node: any): { line: number; column: number; endLine?: number; endColumn?: number; } | null; /** * Stringify element for logging/debugging * * @param {AnyNode} node - Element node * @returns {string} - String representation like "" */ stringify(node: AnyNode): string; } import type { AnyNode } from "@html-eslint/types"; import type { Tag } from "@html-eslint/types"; import type { ScriptTag } from "@html-eslint/types"; import type { StyleTag } from "@html-eslint/types"; //# sourceMappingURL=capo-adapter.d.ts.map