Suggest an editImprove this articleRefine the answer for “What does Prettier do to code?”. Your changes go to moderation before they’re published.Approval requiredContentWhat you’re changing🇺🇸EN🇺🇦UAPreviewTitle (EN)Short answer (EN)**Prettier brings code to a consistent, neat, and readable form according to strictly defined formatting rules**, automatically rewriting the code in the chosen style. **Key point:** Prettier is an autopilot for the code's visual structure, making it clean, consistent, and predictable.Shown above the full answer for quick recall.Answer (EN)Image**Prettier brings code to a consistent, neat, and readable form according to strictly defined formatting rules.** It does not ask for your opinion, it simply rewrites the code automatically in the chosen style. --- ### **What Prettier specifically does** It automatically: - **aligns indentation** - **adds or removes semicolons** - **picks a quote style** - `'` or `"` - **wraps long lines** - **places spaces where needed** - **formats brackets correctly** `{ } ( ) [ ]` - **formats objects, arrays, functions** - **creates a consistent style across the whole project** --- ### **What this looks like** Before: ```js const user={name:"Tom",age:20} function sayHi(){console.log("Hello")} ``` After (with Prettier): ```js const user = { name: "Tom", age: 20 }; function sayHi() { console.log("Hello"); } ``` --- ### **The main point of Prettier** | Without Prettier | With Prettier | |---|---| | Everyone writes "their own way" | All files look the same | | Team arguments about style | No arguments, there are rules | | Formatting by hand | Ctrl+S → clean code | --- ### **What it does** ***not*** **do** - does not check for errors - does not improve logic - does not optimize how the code runs --- ### **Summary** **Prettier is an autopilot for the code's visual structure.** It makes the code clean, consistent, and predictable, so it is easier to read and maintain.For the reviewerNote to the moderator (optional)Visible only to the moderator. Helps review go faster.