Skip to content

Recommended formatter, Prettier, indents block sequences #588

@siewers

Description

@siewers

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?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions