Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

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

オープン
#918 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
35/100
issue の種類
機能追加
明瞭さ
おおむね明確
活発さ
停滞
技術スタック
javascript
領域
tooling

調査の方向性

ファイル、テスト、エントリーポイントのいずれも指定されていません。まず、記載されたオプションを使って提供された XML を再現し、次に、折り返された属性に対する plugin のフォーマット動作を追跡します。最初の属性がタグの横に残り、残りの属性が示されたインデントを維持すれば完了です。

索引モデルが issue の本文から書いたものです。

説明

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!

主要言語
JavaScript
スター
278
フォーク
46
平均マージ
1分
マージ済み PR(30日)
13

コントリビューションガイド

このリポジトリのコントリビューションガイドは索引されていません

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

prettier/plugin-xml のほかの issue

prettier/plugin-xml の issue をすべて見る

似ている issue

JavaScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。