Skip to content

Feature request: Allow the first attribute to stay on the same line as the tag #918

@HymanZHAN

Description

@HymanZHAN

bracketSameLine

true

printWidth

No response

singleAttributePerLine

true

tabWidth

4

xmlWhitespaceSensitivity

strict

xmlSelfClosingSpace

true

Input XML

<Button id="idCancelCommentBtn" press=".cancelComment" text="{i18n>cancelBtn}" />

Current output XML

<Button
    id="idCancelCommentBtn"
    press=".cancelComment"
    text="{i18n>cancelBtn}" />

Expected output XML

<Button id="CancelCommentBtn"
        press=".cancelComment"
        text="{i18n>cancelBtn}" />

First of all, thank you for creating and maintaining this plugin. It's very helpful for our CI pipeline and pre-commit hook. And I understand that as a prettier plugin, it has the right to be opinionated, so I am not sure if it's a huge ask...
Anyways, I am trying to migrate a project that's formatted with Red Hat's XML VS Code plugin, and the current XML format is the same as the "Expected out XML". So I am hoping maybe the prettier plugin can offer such a configuration option. Thank you!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions