prettier / prettier/plugin-pug

Bug: printWidth option (or pugPrintWidth) not working

Open
#511 6 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
208
Forks
49
Avg merge
4h 26m
Merged PRs (30d)
8

Description

For some reason, the default Prettier option is not working with pug files. I tried both options printWidth and pugPrintWidth. The pug file with some long text remains unformatted.

image

Also, the plugin does not convert indents to tabs ("useTabs": true) on save.

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

No source file or test is named. First reproduce the report with a Pug file containing long text and indented content, using both printWidth or pugPrintWidth and useTabs; trace the plugin's option handling and formatter output. Done means long text responds to the configured width and indentation uses tabs on save, with regression coverage for both behaviors.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
tooling
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.