# Prettier formatting not working for typescript

**URL:** <https://forum.cursor.com/t/prettier-formatting-not-working-for-typescript/53630>\
**Category:** Help\
**Created:** [February 24, 2025, 12:39am UTC](https://forum.cursor.com/t/prettier-formatting-not-working-for-typescript/53630 "2025-02-24T00:39:10Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![caelinsutch](https://sea3.discourse-cdn.com/cursor1/user_avatar/forum.cursor.com/caelinsutch/32/28775_2.png) [@caelinsutch](https://forum.cursor.com/u/caelinsutch)\
**Post date:** [February 24, 2025, 12:39am UTC](https://forum.cursor.com/t/prettier-formatting-not-working-for-typescript/53630/1 "2025-02-24T00:39:10Z")

</div>

I’ve hunted down the forum and configuration files - works fine in Vscode but prettier can’t seem to format anything at all.

---

<div class="post-metadata">

**Author:** ![sulejmanhoxha](https://sea3.discourse-cdn.com/cursor1/user_avatar/forum.cursor.com/sulejmanhoxha/32/55475_2.png) [@sulejmanhoxha](https://forum.cursor.com/u/sulejmanhoxha)\
**Post date:** [May 15, 2025, 5:07pm UTC](https://forum.cursor.com/t/prettier-formatting-not-working-for-typescript/53630/2 "2025-05-15T17:07:10Z")

</div>

did you find a solution

---

<div class="post-metadata">

**Author:** ![electroheadfx](https://sea3.discourse-cdn.com/cursor1/user_avatar/forum.cursor.com/electroheadfx/32/56286_2.png) [@electroheadfx](https://forum.cursor.com/u/electroheadfx)\
**Post date:** [May 19, 2025, 9:57am UTC](https://forum.cursor.com/t/prettier-formatting-not-working-for-typescript/53630/3 "2025-05-19T09:57:45Z")

</div>

Same for me, no auto formatting in cursor

---

<div class="post-metadata">

**Author:** ![Cpyrighted](https://sea3.discourse-cdn.com/cursor1/user_avatar/forum.cursor.com/cpyrighted/32/46511_2.png) [@Cpyrighted](https://forum.cursor.com/u/Cpyrighted)\
**Post date:** [May 19, 2025, 10:37am UTC](https://forum.cursor.com/t/prettier-formatting-not-working-for-typescript/53630/4 "2025-05-19T10:37:37Z")

</div>

Works for me… did you make sure to configure it as the Default Code Formatter for Typescript and ensure you select the correct Typescript version.

 ![Screenshot from 2025-05-19 11-33-39](https://us1.discourse-cdn.com/cursor1/original/3X/b/2/b2429e861d0ba79f7e2b5dba3db6ddca4a9a7780.png)

 ![Screenshot from 2025-05-19 11-36-13](https://us1.discourse-cdn.com/cursor1/original/3X/b/7/b7425252cf6b1e9d084b915e9902034efcf4f8de.png)

---

<div class="post-metadata">

**Author:** ![electroheadfx](https://sea3.discourse-cdn.com/cursor1/user_avatar/forum.cursor.com/electroheadfx/32/56286_2.png) [@electroheadfx](https://forum.cursor.com/u/electroheadfx)\
**Post date:** [May 20, 2025, 2:47pm UTC](https://forum.cursor.com/t/prettier-formatting-not-working-for-typescript/53630/6 "2025-05-20T14:47:16Z")

</div>

![image](https://us1.discourse-cdn.com/cursor1/original/3X/4/2/42a2816a436b776210a7ae278bdb4fdbdda6a25d.png)

when I save it should fix all the indentation, and remove all ‘;’ like with my vscode setup on the same project, its very annoying

---

<div class="post-metadata">

**Author:** ![electroheadfx](https://sea3.discourse-cdn.com/cursor1/user_avatar/forum.cursor.com/electroheadfx/32/56286_2.png) [@electroheadfx](https://forum.cursor.com/u/electroheadfx)\
**Post date:** [May 20, 2025, 8:08pm UTC](https://forum.cursor.com/t/prettier-formatting-not-working-for-typescript/53630/7 "2025-05-20T20:08:43Z")

</div>

I fixed, just installed Prettier ESLint from rvest, and add in settings.json:

```json
{
  "editor.defaultFormatter": "rvest.vs-code-prettier-eslint",
  "editor.formatOnType": false, // required
  "editor.formatOnPaste": true, // optional
  "editor.formatOnSave": true, // optional
  "editor.formatOnSaveMode": "file", // required to format on save
  "files.autoSave": "onFocusChange", // optional but recommended
  "vs-code-prettier-eslint.prettierLast": false // set as "true" to run 'prettier' last not first
}

```

---

<div class="post-metadata">

**Author:** ![Cpyrighted](https://sea3.discourse-cdn.com/cursor1/user_avatar/forum.cursor.com/cpyrighted/32/46511_2.png) [@Cpyrighted](https://forum.cursor.com/u/Cpyrighted)\
**Post date:** [May 21, 2025, 9:25am UTC](https://forum.cursor.com/t/prettier-formatting-not-working-for-typescript/53630/8 "2025-05-21T09:25:12Z")

</div>

This is how I set my Cursor up to use both Prettier for multiple languages and Rust Analyzer for my Rust Backend.

```auto
{
  "window.commandCenter": true,
  "cursor.chat.premiumChatAutoScrollWhenAtBottom": true,
  "workbench.colorTheme": "One Dark Pro Night Flat",
  "files.autoSave": "onFocusChange",
  "files.autoSaveDelay": 500,
  "workbench.editor.closeOnFileDelete": false,
  "files.hotExit": "off",
  "window.confirmBeforeClose": "always",
  "cursor.composer.shouldAllowCustomModes": true,
  "cursor.composer.collapsePaneInputBoxPills": true,
  "cursor.terminal.usePreviewBox": true,
  "roo-cline.allowedCommands": [
    "npm test",
    "npm install",
    "tsc",
    "git log",
    "git diff",
    "git show"
  ],
  "update.releaseTrack": "prerelease",
  "diffEditor.maxComputationTime": 0,
  "editor.formatOnSave": true,
  "editor.codeActionsOnSave": {
    "source.formatDocument": "explicit"
  },
  "editor.defaultFormatter": "esbenp.prettier-vscode",
  "[json]": {
    "editor.defaultFormatter": "esbenp.prettier-vscode",
    "editor.formatOnSave": true
  },
  "cursor.composer.textSizeScale": 1.15,
  "[typescript]": {
    "editor.defaultFormatter": "esbenp.prettier-vscode",
    "editor.formatOnSave": true
  },
  "[javascript]": {
    "editor.defaultFormatter": "esbenp.prettier-vscode",
    "editor.formatOnSave": true
  },
  "[vue]": {
    "editor.defaultFormatter": "esbenp.prettier-vscode",
    "editor.formatOnSave": true
  },
  "[html]": {
    "editor.defaultFormatter": "esbenp.prettier-vscode",
    "editor.formatOnSave": true
  },
  "[css]": {
    "editor.defaultFormatter": "esbenp.prettier-vscode",
    "editor.formatOnSave": true
  },
  "[scss]": {
    "editor.defaultFormatter": "esbenp.prettier-vscode",
    "editor.formatOnSave": true
  },
  "[markdown]": {
    "editor.defaultFormatter": "esbenp.prettier-vscode",
    "editor.formatOnSave": true
  },
  "[rust]": {
    "editor.defaultFormatter": "rust-lang.rust-analyzer",
    "editor.formatOnSave": true
  },
  "rusty.rustfmtPath": "/home/cpyrighted/.cargo/bin/rustfmt",
  "prettier.singleQuote": true,
  "prettier.semi": false,
  "prettier.printWidth": 100,
  "prettier.requireConfig": false,
  "rust-analyzer.linkedProjects": [
    "/mnt/SStorage/Projects/Sync-Apps/Sync-DB/Test-Versions/0.0.5/ui/src-tauri/Cargo.toml"
  ]
}

```

---

<div class="post-metadata">

**Author:** ![electroheadfx](https://sea3.discourse-cdn.com/cursor1/user_avatar/forum.cursor.com/electroheadfx/32/56286_2.png) [@electroheadfx](https://forum.cursor.com/u/electroheadfx)\
**Post date:** [May 21, 2025, 6:57pm UTC](https://forum.cursor.com/t/prettier-formatting-not-working-for-typescript/53630/9 "2025-05-21T18:57:28Z")

</div>

Amazing Mate, thanks for the share

---

<div class="post-metadata">

**Author:** ![system](https://sea3.discourse-cdn.com/cursor1/user_avatar/forum.cursor.com/system/32/99069_2.png) [@system](https://forum.cursor.com/u/system)\
**Post date:** [June 18, 2026, 10:43am UTC](https://forum.cursor.com/t/prettier-formatting-not-working-for-typescript/53630/11 "2026-06-18T10:43:14Z")

</div>

Closed on June 18, 2026, 10:43am UTC


