Skip to content

chore(deps): upgrade prettier to v3 - #4674

Open
thetaPC wants to merge 3 commits into
mainfrom
prettier-upgrade
Open

chore(deps): upgrade prettier to v3#4674
thetaPC wants to merge 3 commits into
mainfrom
prettier-upgrade

Conversation

@thetaPC

@thetaPC thetaPC commented Aug 27, 2026

Copy link
Copy Markdown
Contributor

Issue URL: internal

What is the current behavior?

Prettier is on 2.8.8, released in 2023. @ionic/prettier-config is on v3.

What is the new behavior?

  • Prettier 3.9.6 and @ionic/prettier-config v4
  • Converted 72 inline HTML tags (<strong>, <b>, <em>, <i>) to markdown in docs/ and versioned_docs/version-v8

Does this introduce a breaking change?

  • Yes
  • No

Other information

1009 files, but almost all of it is one line each. The breakdown:

  • 906 files: <!DOCTYPE html><!doctype html>. Prettier 3 lowercases it. Browsers don't care
  • 73 files: from @ionic/prettier-config v4, whose only change is trailingComma: 'es5''all'. That adds commas after function parameters, which then breaks long signatures one-per-line. Mostly Angular constructor injection in code samples
  • 20 files: the inline HTML conversion

Why the HTML conversion is here. Raw HTML in a markdown paragraph makes prettier treat it as JSX and hard-wrap the prose at 120 chars, splitting sentences mid-line. Prettier 3 made that more visible, so converting to ** removes the cause. Bold and italics render identically.

@vercel

vercel Bot commented Aug 27, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
ionic-docs Ready Ready Preview Aug 27, 2026 11:13pm

Request Review

@thetaPC
thetaPC marked this pull request as ready for review August 27, 2026 18:31
@thetaPC
thetaPC requested a review from a team as a code owner August 27, 2026 18:31
@thetaPC
thetaPC requested a review from brandyscarney August 27, 2026 18:31

@brandyscarney brandyscarney left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I left some comments on some of the trailing commas. I think some of the trailing commas are overkill, like inside of console.log or after <IonApp> in React apps. It might make more sense if we use this setting:

{
  "trailingComma": "es5"
}

Let me know your thoughts.

Comment thread docs/vue/pwa.md Outdated
ready() {
console.log(
'App is being served from cache by a service worker.\n' + 'For more details, visit https://goo.gl/AFskqB'
'App is being served from cache by a service worker.\n' + 'For more details, visit https://goo.gl/AFskqB',

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why does this add a comma to the end?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@@ -71,7 +71,7 @@ export class ExampleComponent implements OnInit {
// Listen for changes to the media queries
prefersDark.addEventListener('change', (mediaQuery) => this.initializeDarkPalette(mediaQuery.matches));
prefersHighContrast.addEventListener('change', (mediaQuery) =>
this.initializeHighContrastPalette(mediaQuery.matches)
this.initializeHighContrastPalette(mediaQuery.matches),

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why does this add a comma to the end?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@@ -31,7 +31,7 @@
const selectedValue = event.detail.value;

console.log(
`Expanded: ${selectedValue === undefined ? 'None' : event.detail.value} | Collapsed: ${collapsedItems.join(', ')}`
`Expanded: ${selectedValue === undefined ? 'None' : event.detail.value} | Collapsed: ${collapsedItems.join(', ')}`,

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why does this add a comma to the end?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@@ -21,7 +21,7 @@

const validateEmail = (email) => {
return email.match(
/^(?=.{1,254}$)(?=.{1,64}@)[a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+)*@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/
/^(?=.{1,254}$)(?=.{1,64}@)[a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+)*@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/,

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why does this add a comma to the end?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@@ -20,7 +20,7 @@

const validateEmail = (email) => {
return email.match(
/^(?=.{1,254}$)(?=.{1,64}@)[a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+)*@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/
/^(?=.{1,254}$)(?=.{1,64}@)[a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+)*@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/,

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why does this add a comma to the end?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@@ -22,11 +22,16 @@ function Example() {
<IonText color="warning">
<IonIcon icon={warning}></IonIcon>
</IonText>
I saw a werewolf with a Chinese menu in his hand. Walking through the <IonText color="success">
I saw a werewolf with a Chinese menu in his hand. Walking through the{' '}

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we remove these spaces?

Suggested change
I saw a werewolf with a Chinese menu in his hand. Walking through the{' '}
I saw a werewolf with a Chinese menu in his hand. Walking through the

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

<sub>streets</sub>
</IonText> of Soho in the rain. He <IonText color="medium">
</IonText>{' '}

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
</IonText>{' '}
</IonText>

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

<sub>streets</sub>
</IonText> of Soho in the rain. He <IonText color="medium">
</IonText>{' '}
of Soho in the rain. He{' '}

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
of Soho in the rain. He{' '}
of Soho in the rain. He

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

<i>was</i>
</IonText> looking for a place called Lee Ho Fook's. Gonna get a <IonText color="danger">big dish of beef chow mein.</IonText>
</IonText>{' '}

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
</IonText>{' '}
</IonText>

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

<i>was</i>
</IonText> looking for a place called Lee Ho Fook's. Gonna get a <IonText color="danger">big dish of beef chow mein.</IonText>
</IonText>{' '}
looking for a place called Lee Ho Fook's. Gonna get a{' '}

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
looking for a place called Lee Ho Fook's. Gonna get a{' '}
looking for a place called Lee Ho Fook's. Gonna get a

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

2 participants