Skip to content

Conversation

@fisker
Copy link
Member

@fisker fisker commented Dec 1, 2025

Description

Fixes #18389 and the second case in #18379 (comment) which is the same issue as #18389

Checklist

  • I’ve added tests to confirm my change works.
  • (If changing the API or CLI) I’ve documented the changes I’ve made (in the docs/ directory).
  • (If the change is user-facing) I’ve added my changes to changelog_unreleased/*/XXXX.md file following changelog_unreleased/TEMPLATE.md.
  • I’ve read the contributing guidelines.

@pkg-pr-new
Copy link

pkg-pr-new bot commented Dec 1, 2025

Open in StackBlitz

yarn add https://pkg.pr.new/prettier/prettier/@prettier/[email protected]
yarn add https://pkg.pr.new/prettier/prettier/@prettier/[email protected]
yarn add https://pkg.pr.new/prettier/[email protected]

commit: 79d2903

@netlify
Copy link

netlify bot commented Dec 1, 2025

Deploy Preview for prettier ready!

Name Link
🔨 Latest commit 79d2903
🔍 Latest deploy log https://app.netlify.com/projects/prettier/deploys/692dd03e08ae0a00089c2787
😎 Deploy Preview https://deploy-preview-18393--prettier.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@fisker fisker marked this pull request as ready for review December 1, 2025 17:46
@fisker fisker merged commit 7efb988 into prettier:main Dec 1, 2025
34 of 35 checks passed
@fisker fisker deleted the union-type-comment branch December 1, 2025 17:46
apricote pushed a commit to hetznercloud/fleeting-plugin-hetzner that referenced this pull request Dec 3, 2025
…fleeting-plugin-hetzner!315)

This MR contains the following updates:

| Package | Change | [Age](https://docs.renovatebot.com/merge-confidence/) | [Confidence](https://docs.renovatebot.com/merge-confidence/) |
|---|---|---|---|
| [prettier](https://prettier.io) ([source](https://github.com/prettier/prettier)) | `3.7.3` -> `3.7.4` | ![age](https://developer.mend.io/api/mc/badges/age/npm/prettier/3.7.4?slim=true) | ![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/prettier/3.7.3/3.7.4?slim=true) |

Note: The `pre-commit` manager in Renovate is not supported by the `pre-commit` maintainers or community. Please do not report any problems there, instead [create a Discussion in the Renovate repository](https://github.com/renovatebot/renovate/discussions/new) if you have any questions.

---

### Release Notes

<details>
<summary>prettier/prettier (prettier)</summary>

### [`v3.7.4`](https://github.com/prettier/prettier/blob/HEAD/CHANGELOG.md#374)

[Compare Source](prettier/prettier@3.7.3...3.7.4)

[diff](prettier/prettier@3.7.3...3.7.4)

##### LWC: Avoid quote around interpolations ([#&#8203;18383](prettier/prettier#18383) by [@&#8203;kovsu](https://github.com/kovsu))

<!-- prettier-ignore -->

```html
<!-- Input -->
<div foo={bar}>   </div>

<!-- Prettier 3.7.3 (--embedded-language-formatting off) -->
<div foo="{bar}"></div>

<!-- Prettier 3.7.4 (--embedded-language-formatting off) -->
<div foo={bar}></div>
```

##### TypeScript: Fix comment inside union type gets duplicated ([#&#8203;18393](prettier/prettier#18393) by [@&#8203;fisker](https://github.com/fisker))

<!-- prettier-ignore -->

```tsx
// Input
type Foo = (/** comment */ a | b) | c;

// Prettier 3.7.3
type Foo = /** comment */ (/** comment */ a | b) | c;

// Prettier 3.7.4
type Foo = /** comment */ (a | b) | c;
```

##### TypeScript: Fix unstable comment print in union type comments ([#&#8203;18395](prettier/prettier#18395) by [@&#8203;fisker](https://github.com/fisker))

<!-- prettier-ignore -->

```tsx
// Input
type X = (A | B) & (
  // comment
  A | B
);

// Prettier 3.7.3 (first format)
type X = (A | B) &
  (// comment
  A | B);

// Prettier 3.7.3 (second format)
type X = (
  | A
  | B // comment
) &
  (A | B);

// Prettier 3.7.4
type X = (A | B) &
  // comment
  (A | B);
```

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 **Automerge**: Enabled.

♻ **Rebasing**: Whenever MR is behind base branch, or you tick the rebase/retry checkbox.

🔕 **Ignore**: Close this MR and you won't be reminded about this update again.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this MR, check this box

---

This MR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0Mi4zMC40IiwidXBkYXRlZEluVmVyIjoiNDIuMzAuNCIsInRhcmdldEJyYW5jaCI6Im1haW4iLCJsYWJlbHMiOltdfQ==-->
Doridian pushed a commit to Doridian/carvera-pendant that referenced this pull request Dec 3, 2025
This PR contains the following updates:

| Package | Change | [Age](https://docs.renovatebot.com/merge-confidence/) | [Confidence](https://docs.renovatebot.com/merge-confidence/) |
|---|---|---|---|
| [prettier](https://prettier.io) ([source](https://github.com/prettier/prettier)) | [`3.7.3` -> `3.7.4`](https://renovatebot.com/diffs/npm/prettier/3.7.3/3.7.4) | ![age](https://developer.mend.io/api/mc/badges/age/npm/prettier/3.7.4?slim=true) | ![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/prettier/3.7.3/3.7.4?slim=true) |

---

### Release Notes

<details>
<summary>prettier/prettier (prettier)</summary>

### [`v3.7.4`](https://github.com/prettier/prettier/blob/HEAD/CHANGELOG.md#374)

[Compare Source](prettier/prettier@3.7.3...3.7.4)

[diff](prettier/prettier@3.7.3...3.7.4)

##### LWC: Avoid quote around interpolations ([#&#8203;18383](prettier/prettier#18383) by [@&#8203;kovsu](https://github.com/kovsu))

<!-- prettier-ignore -->

```html
<!-- Input -->
<div foo={bar}>   </div>

<!-- Prettier 3.7.3 (--embedded-language-formatting off) -->
<div foo="{bar}"></div>

<!-- Prettier 3.7.4 (--embedded-language-formatting off) -->
<div foo={bar}></div>
```

##### TypeScript: Fix comment inside union type gets duplicated ([#&#8203;18393](prettier/prettier#18393) by [@&#8203;fisker](https://github.com/fisker))

<!-- prettier-ignore -->

```tsx
// Input
type Foo = (/** comment */ a | b) | c;

// Prettier 3.7.3
type Foo = /** comment */ (/** comment */ a | b) | c;

// Prettier 3.7.4
type Foo = /** comment */ (a | b) | c;
```

##### TypeScript: Fix unstable comment print in union type comments ([#&#8203;18395](prettier/prettier#18395) by [@&#8203;fisker](https://github.com/fisker))

<!-- prettier-ignore -->

```tsx
// Input
type X = (A | B) & (
  // comment
  A | B
);

// Prettier 3.7.3 (first format)
type X = (A | B) &
  (// comment
  A | B);

// Prettier 3.7.3 (second format)
type X = (
  | A
  | B // comment
) &
  (A | B);

// Prettier 3.7.4
type X = (A | B) &
  // comment
  (A | B);
```

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update again.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box

---

This PR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0Mi4yNy4xIiwidXBkYXRlZEluVmVyIjoiNDIuMjcuMSIsInRhcmdldEJyYW5jaCI6Im1haW4iLCJsYWJlbHMiOltdfQ==-->

Reviewed-on: https://git.foxden.network/FoxDen/carvera-pendant/pulls/38
Co-authored-by: Renovate <[email protected]>
Co-committed-by: Renovate <[email protected]>
Doridian pushed a commit to foxCaves/foxCaves that referenced this pull request Dec 3, 2025
This PR contains the following updates:

| Package | Change | [Age](https://docs.renovatebot.com/merge-confidence/) | [Confidence](https://docs.renovatebot.com/merge-confidence/) |
|---|---|---|---|
| [prettier](https://prettier.io) ([source](https://github.com/prettier/prettier)) | [`3.7.3` -> `3.7.4`](https://renovatebot.com/diffs/npm/prettier/3.7.3/3.7.4) | ![age](https://developer.mend.io/api/mc/badges/age/npm/prettier/3.7.4?slim=true) | ![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/prettier/3.7.3/3.7.4?slim=true) |

---

### Release Notes

<details>
<summary>prettier/prettier (prettier)</summary>

### [`v3.7.4`](https://github.com/prettier/prettier/blob/HEAD/CHANGELOG.md#374)

[Compare Source](prettier/prettier@3.7.3...3.7.4)

[diff](prettier/prettier@3.7.3...3.7.4)

##### LWC: Avoid quote around interpolations ([#&#8203;18383](prettier/prettier#18383) by [@&#8203;kovsu](https://github.com/kovsu))

<!-- prettier-ignore -->

```html
<!-- Input -->
<div foo={bar}>   </div>

<!-- Prettier 3.7.3 (--embedded-language-formatting off) -->
<div foo="{bar}"></div>

<!-- Prettier 3.7.4 (--embedded-language-formatting off) -->
<div foo={bar}></div>
```

##### TypeScript: Fix comment inside union type gets duplicated ([#&#8203;18393](prettier/prettier#18393) by [@&#8203;fisker](https://github.com/fisker))

<!-- prettier-ignore -->

```tsx
// Input
type Foo = (/** comment */ a | b) | c;

// Prettier 3.7.3
type Foo = /** comment */ (/** comment */ a | b) | c;

// Prettier 3.7.4
type Foo = /** comment */ (a | b) | c;
```

##### TypeScript: Fix unstable comment print in union type comments ([#&#8203;18395](prettier/prettier#18395) by [@&#8203;fisker](https://github.com/fisker))

<!-- prettier-ignore -->

```tsx
// Input
type X = (A | B) & (
  // comment
  A | B
);

// Prettier 3.7.3 (first format)
type X = (A | B) &
  (// comment
  A | B);

// Prettier 3.7.3 (second format)
type X = (
  | A
  | B // comment
) &
  (A | B);

// Prettier 3.7.4
type X = (A | B) &
  // comment
  (A | B);
```

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update again.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box

---

This PR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0Mi4yNy4xIiwidXBkYXRlZEluVmVyIjoiNDIuMjcuMSIsInRhcmdldEJyYW5jaCI6Im1haW4iLCJsYWJlbHMiOltdfQ==-->

Reviewed-on: https://git.foxden.network/foxCaves/foxCaves/pulls/15
Co-authored-by: Renovate <[email protected]>
Co-committed-by: Renovate <[email protected]>
Doridian pushed a commit to foxCaves/foxCaves that referenced this pull request Dec 3, 2025
This PR contains the following updates:

| Package | Change | [Age](https://docs.renovatebot.com/merge-confidence/) | [Confidence](https://docs.renovatebot.com/merge-confidence/) |
|---|---|---|---|
| [prettier](https://prettier.io) ([source](https://github.com/prettier/prettier)) | [`3.7.3` -> `3.7.4`](https://renovatebot.com/diffs/npm/prettier/3.7.3/3.7.4) | ![age](https://developer.mend.io/api/mc/badges/age/npm/prettier/3.7.4?slim=true) | ![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/prettier/3.7.3/3.7.4?slim=true) |

---

### Release Notes

<details>
<summary>prettier/prettier (prettier)</summary>

### [`v3.7.4`](https://github.com/prettier/prettier/blob/HEAD/CHANGELOG.md#374)

[Compare Source](prettier/prettier@3.7.3...3.7.4)

[diff](prettier/prettier@3.7.3...3.7.4)

##### LWC: Avoid quote around interpolations ([#&#8203;18383](prettier/prettier#18383) by [@&#8203;kovsu](https://github.com/kovsu))

<!-- prettier-ignore -->

```html
<!-- Input -->
<div foo={bar}>   </div>

<!-- Prettier 3.7.3 (--embedded-language-formatting off) -->
<div foo="{bar}"></div>

<!-- Prettier 3.7.4 (--embedded-language-formatting off) -->
<div foo={bar}></div>
```

##### TypeScript: Fix comment inside union type gets duplicated ([#&#8203;18393](prettier/prettier#18393) by [@&#8203;fisker](https://github.com/fisker))

<!-- prettier-ignore -->

```tsx
// Input
type Foo = (/** comment */ a | b) | c;

// Prettier 3.7.3
type Foo = /** comment */ (/** comment */ a | b) | c;

// Prettier 3.7.4
type Foo = /** comment */ (a | b) | c;
```

##### TypeScript: Fix unstable comment print in union type comments ([#&#8203;18395](prettier/prettier#18395) by [@&#8203;fisker](https://github.com/fisker))

<!-- prettier-ignore -->

```tsx
// Input
type X = (A | B) & (
  // comment
  A | B
);

// Prettier 3.7.3 (first format)
type X = (A | B) &
  (// comment
  A | B);

// Prettier 3.7.3 (second format)
type X = (
  | A
  | B // comment
) &
  (A | B);

// Prettier 3.7.4
type X = (A | B) &
  // comment
  (A | B);
```

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update again.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box

---

This PR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0Mi4yNy4xIiwidXBkYXRlZEluVmVyIjoiNDIuMjcuMSIsInRhcmdldEJyYW5jaCI6Im1haW4iLCJsYWJlbHMiOltdfQ==-->

Reviewed-on: https://git.foxden.network/foxCaves/foxCaves/pulls/14
Co-authored-by: Renovate <[email protected]>
Co-committed-by: Renovate <[email protected]>
renovate bot added a commit to andrei-picus-tink/auto-renovate that referenced this pull request Dec 4, 2025
| datasource | package  | from  | to    |
| ---------- | -------- | ----- | ----- |
| npm        | prettier | 3.7.3 | 3.7.4 |


## [v3.7.4](https://github.com/prettier/prettier/blob/HEAD/CHANGELOG.md#374)

[diff](prettier/prettier@3.7.3...3.7.4)

##### LWC: Avoid quote around interpolations ([#18383](prettier/prettier#18383) by [@kovsu](https://github.com/kovsu))

<!-- prettier-ignore -->

```html
<!-- Input -->
<div foo={bar}>   </div>

<!-- Prettier 3.7.3 (--embedded-language-formatting off) -->
<div foo="{bar}"></div>

<!-- Prettier 3.7.4 (--embedded-language-formatting off) -->
<div foo={bar}></div>
```

##### TypeScript: Fix comment inside union type gets duplicated ([#18393](prettier/prettier#18393) by [@fisker](https://github.com/fisker))

<!-- prettier-ignore -->

```tsx
// Input
type Foo = (/** comment */ a | b) | c;

// Prettier 3.7.3
type Foo = /** comment */ (/** comment */ a | b) | c;

// Prettier 3.7.4
type Foo = /** comment */ (a | b) | c;
```

##### TypeScript: Fix unstable comment print in union type comments ([#18395](prettier/prettier#18395) by [@fisker](https://github.com/fisker))

<!-- prettier-ignore -->

```tsx
// Input
type X = (A | B) & (
  // comment
  A | B
);

// Prettier 3.7.3 (first format)
type X = (A | B) &
  (// comment
  A | B);

// Prettier 3.7.3 (second format)
type X = (
  | A
  | B // comment
) &
  (A | B);

// Prettier 3.7.4
type X = (A | B) &
  // comment
  (A | B);
```
evgenygunko pushed a commit to evgenygunko/Translations that referenced this pull request Dec 17, 2025
This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
| [prettier](https://prettier.io) ([source](https://github.com/prettier/prettier)) | devDependencies | minor | [`^3.6.2` -> `^3.7.4`](https://renovatebot.com/diffs/npm/prettier/3.6.2/3.7.4) |

---

### Release Notes

<details>
<summary>prettier/prettier (prettier)</summary>

### [`v3.7.4`](https://github.com/prettier/prettier/blob/HEAD/CHANGELOG.md#374)

[Compare Source](prettier/prettier@3.7.3...3.7.4)

[diff](prettier/prettier@3.7.3...3.7.4)

##### LWC: Avoid quote around interpolations ([#&#8203;18383](prettier/prettier#18383) by [@&#8203;kovsu](https://github.com/kovsu))

<!-- prettier-ignore -->

```html
<!-- Input -->
<div foo={bar}>   </div>

<!-- Prettier 3.7.3 (--embedded-language-formatting off) -->
<div foo="{bar}"></div>

<!-- Prettier 3.7.4 (--embedded-language-formatting off) -->
<div foo={bar}></div>
```

##### TypeScript: Fix comment inside union type gets duplicated ([#&#8203;18393](prettier/prettier#18393) by [@&#8203;fisker](https://github.com/fisker))

<!-- prettier-ignore -->

```tsx
// Input
type Foo = (/** comment */ a | b) | c;

// Prettier 3.7.3
type Foo = /** comment */ (/** comment */ a | b) | c;

// Prettier 3.7.4
type Foo = /** comment */ (a | b) | c;
```

##### TypeScript: Fix unstable comment print in union type comments ([#&#8203;18395](prettier/prettier#18395) by [@&#8203;fisker](https://github.com/fisker))

<!-- prettier-ignore -->

```tsx
// Input
type X = (A | B) & (
  // comment
  A | B
);

// Prettier 3.7.3 (first format)
type X = (A | B) &
  (// comment
  A | B);

// Prettier 3.7.3 (second format)
type X = (
  | A
  | B // comment
) &
  (A | B);

// Prettier 3.7.4
type X = (A | B) &
  // comment
  (A | B);
```

### [`v3.7.3`](https://github.com/prettier/prettier/blob/HEAD/CHANGELOG.md#373)

[Compare Source](prettier/prettier@3.7.2...3.7.3)

[diff](prettier/prettier@3.7.2...3.7.3)

##### API: Fix `prettier.getFileInfo()` change that breaks VSCode extension ([#&#8203;18375](prettier/prettier#18375) by [@&#8203;fisker](https://github.com/fisker))

An internal refactor accidentally broke the VSCode extension plugin loading.

### [`v3.7.2`](https://github.com/prettier/prettier/blob/HEAD/CHANGELOG.md#372)

[Compare Source](prettier/prettier@3.7.1...3.7.2)

[diff](prettier/prettier@3.7.1...3.7.2)

##### JavaScript: Fix string print when switching quotes ([#&#8203;18351](prettier/prettier#18351) by [@&#8203;fisker](https://github.com/fisker))

<!-- prettier-ignore -->

```jsx
// Input
console.log("A descriptor\\'s .kind must be \"method\" or \"field\".")

// Prettier 3.7.1
console.log('A descriptor\\'s .kind must be "method" or "field".');

// P...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Every run, comments get duplicated.

1 participant