import { AttributeVisitorMixin } from "./rule-utils.js";
class AttributeValuesRequireQuotesVisitor extends AttributeVisitorMixin {
    checkAttribute(attributeName, _attributeValue, attributeNode) {
        if (attributeNode.value?.type !== "AST_HTML_ATTRIBUTE_VALUE_NODE")
            return;
        const valueNode = attributeNode.value;
        if (valueNode.quoted)
            return;
        this.addOffense(
        // TODO: print actual attribute value in message
        `Attribute value should be quoted: \`${attributeName}="value"\`. Always wrap attribute values in quotes.`, valueNode.location, "error");
    }
}
export class HTMLAttributeValuesRequireQuotesRule {
    name = "html-attribute-values-require-quotes";
    check(node) {
        const visitor = new AttributeValuesRequireQuotesVisitor(this.name);
        visitor.visit(node);
        return visitor.offenses;
    }
}
//# sourceMappingURL=html-attribute-values-require-quotes.js.map