Skip to content

trailingComma: none is ignored by v4+ #8000

@sbreakey

Description

@sbreakey

Environments:

  • Prettier Version: 4.1.1 (but any 4+ version is reproducible)
  • Running Prettier via: VS Code
  • Runtime: No idea. VS Code?
  • Operating System: Windows 10

Steps to reproduce:

set the rule "prettier.trailingComma": "none" in your settings. Write some typescript like:

x = {
  'a': 'b'
}

Expected behavior:
Given the no trailing commas, the above block of code should not be formatted

Actual behavior:
The setting is ignored and the code is formatted to:

x = {
  'a': 'b',
}

thereby creating a mess in git diffs.

NOTE: downgrading to version 3.20.0 fixes the issue for whatever reason.
EDIT: this appears to affect other rules too, e.g. whatever the rule is that wraps single arguments to arrow functions is (I think arrowParens)?

Metadata

Metadata

Assignees

No one assigned

    Labels

    locked-due-to-inactivityPlease open a new issue and fill out the template instead of commenting.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions