Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

deno fmt breaks list of objects in the middle of an object #22459

Open
tgross35 opened this issue Feb 18, 2024 · 1 comment
Open

deno fmt breaks list of objects in the middle of an object #22459

tgross35 opened this issue Feb 18, 2024 · 1 comment
Assignees
Labels
bug Something isn't working correctly deno fmt Related to the "deno fmt" subcommand or dprint upstream Changes in upstream are required to solve these issues

Comments

@tgross35
Copy link

tgross35 commented Feb 18, 2024

For a list of objects, Deno applies the following formatting:

  const fpnMembershipTitles = [{ name: "FPN" }, { name: "FPN Class" }, {
    name: "Type",
  }, { name: "Description" }];

It breaks the line in the middle of an object, which doesn't make much sense. This formatting gets reapplied even if I delete line breaks and trailing commas. The following would be much better:

  const fpnMembershipTitles = [
    { name: "FPN" },
    { name: "FPN Class" },
    { name: "Type" },
    { name: "Description" },
  ];

No specific format configuration outside of excluded files.

deno 1.40.3 (release, aarch64-apple-darwin)
v8 12.1.285.6
typescript 5.3.3

@lucacasonato lucacasonato added bug Something isn't working correctly deno fmt Related to the "deno fmt" subcommand or dprint labels Jun 13, 2024
@lucacasonato
Copy link
Member

Opened upstream issue dprint/dprint-plugin-typescript#641

@lucacasonato lucacasonato added the upstream Changes in upstream are required to solve these issues label Jun 13, 2024
yazan-abdalrahman added a commit to yazan-abdalrahman/dprint-plugin-typescript that referenced this issue Jul 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working correctly deno fmt Related to the "deno fmt" subcommand or dprint upstream Changes in upstream are required to solve these issues
Projects
None yet
Development

No branches or pull requests

3 participants