Files
test-repo/changelog_unreleased/javascript/14192.md
T

681 B

Avoid unnecessarily indenting nested await expressions (#14192 by @thorn0)

A refinement of this change in v2.3. Sometimes there is no need to force indentation of nested await expressions.

// Prettier stable
await Promise.all(
  (
    await readdir("src")
  ).map((path) => {
    import(`./${path}`);
  })
);

// Prettier main
await Promise.all(
  (await readdir("src")).map((path) => {
    import(`./${path}`);
  }),
);