Skip to content

Tailwind attributes moved outside @errror tag #126

@amolswnz

Description

@amolswnz

test.blade.php
<input type="text" class="@error('name') border-red-300 @enderror border-slate-300" />

After running prettier on test.blade.php
npx prettier test.blade.php --write --log-level debug

[debug] normalized argv: {"":["test.blade.php"],"cache":false,"color":true,"editorconfig":true,"write":true,"logLevel":"debug","configPrecedence":"cli-override","debugRepeat":0,"ignorePath":[".gitignore",".prettierignore"],"plugins":[],"_":["test.blade.php"],"__raw":{"_":["test.blade.php"],"cache":false,"color":true,"editorconfig":true,"write":true,"log-level":"debug","config-precedence":"cli-override","debug-repeat":0,"ignore-path":[".gitignore",".prettierignore"],"plugin":[]}}
[debug] resolve config from '/Users/amolw/test.blade.php'
[debug] loaded options `{"useTabs":false,"tabWidth":4,"endOfLine":"lf","printWidth":120,"semi":true,"singleQuote":true,"trailingComma":"all","bracketSpacing":true,"arrowParens":"always","tailwindPreserveDuplicates":true,"tailwindConfig":"./tailwind.config.js","plugins":["prettier-plugin-blade","prettier-plugin-tailwindcss"],"parser":"blade"}`
[debug] applied config-precedence (cli-override): {"singleQuote":true,"bracketSpacing":true,"arrowParens":"always","semi":true,"trailingComma":"all","tailwindConfig":"./tailwind.config.js","tailwindPreserveDuplicates":true,"endOfLine":"lf","parser":"blade","plugins":["prettier-plugin-blade","prettier-plugin-tailwindcss"],"printWidth":120,"tabWidth":4,"useTabs":false}
test.blade.php 672ms

The output moves border-red-300 after @enderror
<input type="text" class="@error('name') @enderror border-red-300 border-slate-300" />

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions