Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug: can't set pugBracketSameLine to true in prettierrc #477

Closed
SArpnt opened this issue Dec 25, 2023 · 1 comment
Closed

Bug: can't set pugBracketSameLine to true in prettierrc #477

SArpnt opened this issue Dec 25, 2023 · 1 comment
Labels
type: duplicate This issue or pull request already exists

Comments

@SArpnt
Copy link

SArpnt commented Dec 25, 2023

Info

Tool Version
Plugin v3.0.0
Prettier v3.1.1
Framework none
Node v21.4.0
OS linux

Prettier config

.prettierrc.json5

{
	useTabs: true,
	tabWidth: 3,
	arrowParens: "avoid",
	plugins: ["@prettier/plugin-pug"],
	pugAttributeSeparator: "none",
	pugBracketSameLine: true, // or "true"
	pugEmptyAttributes: "none",
}

Input

(any pug file, can use an empty file)

Output or Error

with true:

[error] Error: Invalid --pug-bracket-same-line value. Expected null, false, "" or "true", but received true.

with "":

[error] Invalid pugBracketSameLine value. Expected null, false, true or "true", but received "".

with "true":

src/index2.pug
[error] src/index2.pug: Error: Error: Invalid bracketSameLine value. Expected true or false, but received "true".
[error]     at x.build (file:///home/sarpnt/Programming/bytebeat-composer/node_modules/.pnpm/@[email protected][email protected]/node_modules/@prettier/plugin-pug/dist/index.js:32:4380)
[error]     at async Object.print (file:///home/sarpnt/Programming/bytebeat-composer/node_modules/.pnpm/@[email protected][email protected]/node_modules/@prettier/plugin-pug/dist/index.js:61:295)
[error]     at async printAstToDoc (file:///home/sarpnt/Programming/bytebeat-composer/node_modules/.pnpm/[email protected]/node_modules/prettier/index.mjs:20377:16)
[error]     at async coreFormat (file:///home/sarpnt/Programming/bytebeat-composer/node_modules/.pnpm/[email protected]/node_modules/prettier/index.mjs:20687:14)
[error]     at async formatWithCursor (file:///home/sarpnt/Programming/bytebeat-composer/node_modules/.pnpm/[email protected]/node_modules/prettier/index.mjs:20885:14)
[error]     at async formatFiles (file:///home/sarpnt/Programming/bytebeat-composer/node_modules/.pnpm/[email protected]/node_modules/prettier/internal/cli.mjs:7073:18)
[error]     at async main (file:///home/sarpnt/Programming/bytebeat-composer/node_modules/.pnpm/[email protected]/node_modules/prettier/internal/cli.mjs:7279:5)
[error]     at async Module.run (file:///home/sarpnt/Programming/bytebeat-composer/node_modules/.pnpm/[email protected]/node_modules/prettier/internal/cli.mjs:7225:5)
@Shinigami92
Copy link
Member

duplicate, cannot be fixed by this plugin

@Shinigami92 Shinigami92 closed this as not planned Won't fix, can't repro, duplicate, stale Dec 25, 2023
@Shinigami92 Shinigami92 added the type: duplicate This issue or pull request already exists label Dec 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: duplicate This issue or pull request already exists
Projects
None yet
Development

No branches or pull requests

2 participants