prettier / prettier

Prettier is an opinionated code formatter.
https://prettier.io
MIT License
49.37k stars 4.34k forks source link

Vue ugly line break #12368

Open Rubon72 opened 2 years ago

Rubon72 commented 2 years ago
  "printWidth": 110,
  "singleQuote": true,
  "jsxSingleQuote": false,
  "arrowParens": "avoid",
  "parser": "vue"

Input:

        <template v-if="isFromPrivateToPublic && !conflict.usedItems.length">
          <p>
            {{ t('You are moving the element from private workspace to Public.') }}
          </p>
          {{ t('What changes:') }}
          <ul class="mb-8">
            <li>
              {{ t('this element will be visible in the settings of other elements in all the workspaces;') }}
            </li>
            <li>
              {{t('this element will be visible for all your team members, if you work with the multi-user access.' )}}
            </li>
          </ul>
        </template>

Output:

        <template v-if="isFromPrivateToPublic && !conflict.usedItems.length">
          <p>
            {{ t('You are moving the element from private workspace to Public.') }}
          </p>
          {{ t('What changes:') }}
          <ul class="mb-8">
            <li>
              {{ t('this element will be visible in the settings of other elements in all the workspaces;') }}
            </li>
            <li>
              {{
                t(
                  'this element will be visible for all your team members, if you work with the multi-user access.'
                )
              }}
            </li>
          </ul>
        </template>
shrpne commented 3 weeks ago

same here, "printWidth": 300 not helps