Stillat / blade-parser-typescript

A Laravel Blade parser, compiler, and static analyzer written in TypeScript.
https://stillat.com
MIT License
82 stars 2 forks source link

[Prettier plugin] Wrong indent on multi-line blade component attributes #82

Closed Roardom closed 10 months ago

Roardom commented 10 months ago

A file containing the following blade component with a multi-line attribute

<x-checkbox
    :checked="
        $firstCondition
        || $secondCondition
        || $thirdCondition
        || $fourthCondition
        || $fifthCondition
        || $sixthCondition
        || $seventhCondition
    "
/>

becomes

<x-checkbox
    :checked="
                $firstCondition
                || $secondCondition
                || $thirdCondition
                || $fourthCondition
                || $fifthCondition
                || $sixthCondition
                || $seventhCondition
        "
/>

and each successive format adds another indent.

prettier-plugin-blade: 1.6.14 prettier: 2.8.8

JohnathonKoster commented 10 months ago

Improved in v1.6.15, with additional test coverage