question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

singleAttributePerLine not working

See original GitHub issue

Summary

setting singleAttributePerLine to true does not have any effect.

Steps To Reproduce:

  1. Your .prettierrc looks like this:
{
    "singleQuote": true,
    "printWidth": 200,
    "semi": true,
    "useTabs": false,
    "trailingComma": "none",
    "arrowParens": "avoid",
    "tabWidth": 4,
    "singleAttributePerLine": true
}
  1. Create some HTML file with lots of attributes per node

Expected result

Each attribute gets put on a separate line

Actual result

Attributes get squished into a single line

Additional information

VS Code Version:

1.67.2

Prettier Extension Version:

9.5.0

Prettier Library Version:

2.6.2

OS and version:

Mac Monterey, 12.3.1

Issue Analytics

  • State:closed
  • Created a year ago
  • Reactions:5
  • Comments:5

github_iconTop GitHub Comments

1reaction
karlitoscommented, Jun 9, 2022

Affects me too

0reactions
github-actions[bot]commented, Nov 19, 2022

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Prettier 2.6: new singleAttributePerLine option and new ...
This is an option to print only one attribute per line in Vue SFC templates, HTML, and JSX. Per our Option Philosophy, we...
Read more >
How to enforce new line per attribute in vue using Prettier in ...
Technically it's not a dependency, it's a VS Code extension. And also it's not a Vue 3 problem--many other frameworks pack lots of...
Read more >
r/javascript - Prettier 2.6: new singleAttributePerLine option ...
the large amount of issues related to comment positioning are sort of interesting as they are likely all motivated by ...
Read more >
Tweets with replies by Prettier (@PrettierCode) / Twitter
We just released Prettier 2.6, featuring new singleAttributePerLine ... This release focuses on fixing long-standing issues in the JavaScript printer.
Read more >
max-statements-per-line - ESLint - Pluggable JavaScript Linter
When Not To Use It. You can turn this rule off if you are not concerned with the number of statements on each...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found