microsoft/azure-pipelines-vscode

Recommended formatter, Prettier, indents block sequences

siewers opened this issue · 0 comments

According to the documentation on Azure Pipeline formatting, block sequences should not be indented:

parameters:
- name: param1
  type: string
- name: param2
  type: string

However, using the Prettier formatter, the sequences are indented:

parameters:
  - name: param1
    type: string
  - name: param2
    type: string

The Prettier maintainer has a clear philosophy and will not make any exceptions (see related issue), which makes sense.

However, as the issue describes, we're stuck between using a formatter that works with the Azure Pipelines extension and none (the default behaves similarly and does the same indentation).
So, currently, it's impossible to use a formatter if we want to adhere to the standard described throughout the documentation.

As explained in this issue, the redhat.vscode-yaml formatter won't work if the file types are azure-pipelines as it only accepts yaml.

Do you know if there are any plans to use a different formatter, or what is your recommendation?