prettier / prettier/prettier

Prettier prints 1 attribute per line

Open
#5,751 30 comments 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

lang:html status:needs discussion
Dominant language
JavaScript
Stars
52.3k
Forks
5k
Avg merge
19h 2m
Merged PRs (30d)
117

Description

Input:

<div class="main__image-list main-image-list--margin main__image-list-one"></div>

Output:

<div
      class="main__image-list main-image-list--margin main__image-list-one"
    ></div>

Another example
Input:

   <link
      rel="stylesheet"href="https://use.fontawesome.com/releases/v5.6.3/css/all.css"  integrity="sha384-UHRtZLI+pbxtHCWp1t77Bi1L4ZtiqrqD80Kn4Z8NTSRyMA2Fd33n5dQ8lWUE00s/" crossorigin="anonymous" />

Output:

   <link
      rel="stylesheet"
      href="https://use.fontawesome.com/releases/v5.6.3/css/all.css"
      integrity="sha384-UHRtZLI+pbxtHCWp1t77Bi1L4ZtiqrqD80Kn4Z8NTSRyMA2Fd33n5dQ8lWUE00s/"
      crossorigin="anonymous"
    />

And more others tags (img.....)

this is a bug or a trick?
What do you think about ?

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

The issue names no source files, tests, or entry points; begin by reproducing the two HTML examples with Prettier and reviewing the HTML formatting behavior they exercise. Done means the intended attribute-wrapping behavior is agreed and verified with a regression test.

Written by the indexing model from the issue text.

Assessment

Tech stack
html, javascript
Domain
tooling
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.