For AI agents: the complete documentation index is available at /annealer/llms.txt, the full documentation bundle is available at /annealer/llms-full.txt, and this page is available as Markdown at /annealer/api/profile.md.
  • English
  • Profile reference

    A profile is a YAML file that defines attribute order, layout rules and stylesheet options. The built-in profiles are in crates/annealer/profiles/.

    # yaml-language-server: $schema=https://github.com/logue/annealer/raw/refs/heads/main/crates/annealer/schema/profile.schema.json
    schemaVersion: 1
    name: my-profile
    description: My attribute order.
    
    normalize:
      directiveShorthand: true
    
    layout:
      closingBracketNewline: true
      oneAttributePerLine: true
      selfClosing:
        void: always
      contentNewline: {}
    
    groups:
      - name: global
        match: [id]
      - name: class
        match: [class]
      - name: other
        fallback: true
      - name: events
        match: [on*]
    
    stylesheet:
      declarationOrder: smacss
      vendorPrefix: start
    Editor support

    The JSON Schema (draft-07) is at crates/annealer/schema/profile.schema.json. With the modeline above and the YAML extension, VS Code validates and completes profiles.

    Unknown keys are errors everywhere in a profile, so typos never go unnoticed.

    Top level

    KeyTypeRequiredDescription
    schemaVersion1yesProfile format version.
    namestringyesProfile name.
    descriptionstringHuman-readable summary.
    normalizeobjectAttribute name rewrites.
    layoutobjectStart-tag layout rules.
    groupsarrayyesAttribute groups in output order.
    stylesheetobjectStylesheet formatting. Omit it to leave stylesheets untouched.
    classOrderstring | objectClass order for static class attributes. Omit it to keep classes in their order.

    normalize

    Rewrites applied before classification.

    KeyTypeDefaultDescription
    directiveShorthandbooleanfalsev-bind:foo → :foo, v-on:click → @click.
    hyphenateComponentPropsbooleanfalsecamelCase attribute names on component tags → kebab-case. Native SVG/MathML elements are excluded.

    layout

    See Layout for details.

    KeyTypeDefaultDescription
    closingBracketNewlinebooleanfalsePut the closing bracket of a multiline start tag on its own line.
    oneAttributePerLinebooleanfalseOne attribute per line in a multiline start tag.
    selfClosing.voidalways | never | preservepreserveVoid elements: <br /> or <br>.
    selfClosing.normalalways | never | preservepreserveEmpty non-void elements (<div />). Vue templates only.
    selfClosing.componentalways | never | preservepreserveEmpty components (<MyComp />). Vue templates only.
    contentNewlineobjectoffPut the content of a multiline element on lines of its own. {} turns it on with the defaults.
    contentNewline.ignorestring[]pre, textarea, inline elementsElements left alone, with everything inside them. Element names match case-insensitively; component names match exactly.
    contentNewline.allowEmptyLinesbooleanfalseKeep blank lines before and after the content.

    groups

    Groups are listed in output order. Exactly one group must be the fallback, and group names must be unique.

    KeyTypeDefaultDescription
    namestring–Unique group name. Required.
    matchstring[]–Patterns: an exact name or a prefix ending in *. Required unless fallback: true.
    sortsource | alphabetical | listedsourceOrder within the group: as written, by key, or by the order of match.
    fallbackbooleanfalseReceives every attribute that matches no pattern.
    spreadSafebooleanfalseAttributes in this group may move across a v-bind="object" spread. Only for compile-time directives.

    Patterns are matched against normalized, lowercased keys: foo for foo/:foo/v-bind:foo, v-on:click for @click, v-slot:name for #name, with modifiers stripped. An exact name beats any prefix, and a longer prefix beats a shorter one. See Attribute order.

    stylesheet

    See Stylesheets for details.

    KeyTypeDefaultDescription
    declarationOrdersmacss | concentric | alphabetical–Property order. Without it, declarations are not reordered.
    declarationOrderGroupBynon-declaration | non-declaration-and-empty-linenon-declaration-and-empty-lineHow declarations are split into runs that are sorted separately. By default a blank line ends a run; non-declaration sorts across blank lines, which stay in place.
    vendorPrefixalongside | startalongsidestart puts vendor-prefixed declarations first in each run, alphabetically.
    styleAttributebooleanfalseAlso order declarations in static style attributes.

    Only the order of declarations changes; whitespace, quotes and other formatting are left to a formatter. malva's formatting options are therefore not accepted.

    classOrder

    The order of the classes in static class attributes (see Class order): a built-in class order name (tailwind), or a class order profile written inline. The CLI's --class-order and the JavaScript classOrder option override it.

    classOrder: tailwind

    Class order profiles

    A class order profile is a YAML file of its own, passed with --class-order or classOrder, or written inline under a profile's classOrder. The JSON Schema is crates/annealer/schema/class-order.schema.json; the built-in one is crates/annealer/class-orders/tailwind.yaml.

    KeyTypeDefaultDescription
    schemaVersion1–Required. Format version.
    namestring–Required. Class order name.
    descriptionstring–Human-readable summary.
    unknownstart | endstartWhere classes no rule matches go, in source order.
    removeDuplicatesbooleanfalseDrop repeated classes, keeping the first.
    importantstring–Marker stripped from the start or end of a utility before matching (!).
    arbitraryPropertiesbooleanfalseClasses of the form [property:value] set property.
    variantsobject–separator (e.g. :) and order: variant patterns by rank, lowest first. A list entry gives its patterns the same rank.
    propertyOrderstring[]–Required. CSS properties in output order.
    valuesmap of pattern list–Value sets for {name} in patterns. number is built in.
    rulesarray–Required. match (patterns), properties (from propertyOrder) and optional count (number of declarations, if different).

    A class with a variant that no pattern matches is unknown. Rules may only name properties listed in propertyOrder; anything else is an error.