// Copyright (c) 2026 Lark Technologies Pte. Ltd. // SPDX-License-Identifier: MIT package lint import "strings" // Rule IDs surfaced through Finding.RuleID. UPPER_SNAKE_CASE naming is the // contract for the stdout envelope. New rules MUST keep this naming convention // so AI / test consumers can pattern-match reliably. const ( // Tag-level rules. RuleTagFontToSpan = "TAG_FONT_TO_SPAN" RuleTagCenterToDiv = "TAG_CENTER_TO_DIV" RuleTagMarqueeToText = "TAG_MARQUEE_TO_TEXT" RuleTagBlinkToText = "TAG_BLINK_TO_TEXT" RuleTagScriptBlocked = "TAG_SCRIPT_BLOCKED" RuleTagIframeBlocked = "TAG_IFRAME_BLOCKED" RuleTagObjectBlocked = "TAG_OBJECT_BLOCKED" RuleTagEmbedBlocked = "TAG_EMBED_BLOCKED" RuleTagFormBlocked = "TAG_FORM_BLOCKED" RuleTagInputBlocked = "TAG_INPUT_BLOCKED" RuleTagLinkBlocked = "TAG_LINK_BLOCKED" RuleTagMetaBlocked = "TAG_META_BLOCKED" RuleTagBaseBlocked = "TAG_BASE_BLOCKED" RuleTagUnknownStripped = "TAG_UNKNOWN_STRIPPED" // Attribute-level rules. RuleAttrEventHandlerBlocked = "ATTR_EVENT_HANDLER_BLOCKED" RuleAttrJSURLBlocked = "ATTR_JS_URL_BLOCKED" RuleAttrUnsafeSchemeBlocked = "ATTR_UNSAFE_SCHEME_BLOCKED" // Style-level rules. RuleStylePropertyDropped = "STYLE_PROPERTY_DROPPED" // Feishu-native autofix rules. These autofix the inline style / // class / nesting shape of common elements so AI-authored HTML // matches what Feishu mail-editor itself emits, fixing the visual // "extra blank line between blocks", "list bullets/numbers missing", // "link color wrong" etc. classes of issues. The rewrite is purely // additive — user-supplied inline styles take precedence; the lib // only fills the missing properties. RuleStyleListNative = "STYLE_LIST_NATIVE_INLINE_APPLIED" RuleStyleListItemNative = "STYLE_LIST_ITEM_NATIVE_INLINE_APPLIED" RuleStyleBlockquoteNative = "STYLE_BLOCKQUOTE_NATIVE_INLINE_APPLIED" RuleStyleLinkNative = "STYLE_LINK_NATIVE_INLINE_APPLIED" RuleStyleParaWrapper = "STYLE_PARA_WRAPPER_REWRITTEN" // RuleListDirectChildNonLI fires when a