# Code-Formatting with Prettier in VS Code

**URL:** <https://community.hubspot.com/t/code-formatting-with-prettier-in-vs-code/119091>\
**Category:** Tips, Tricks & Best Practices\
**Tags:** local-development, html\
**Created:** [October 24, 2024, 12:25pm UTC](https://community.hubspot.com/t/code-formatting-with-prettier-in-vs-code/119091 "2024-10-24T12:25:24Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Torsten\_Utz](https://avatars.discourse-cdn.com/v4/letter/t/d78d45/32.png) [@Torsten\_Utz](https://community.hubspot.com/u/Torsten_Utz)\
**Post date:** [October 24, 2024, 12:25pm UTC](https://community.hubspot.com/t/code-formatting-with-prettier-in-vs-code/119091/1 "2024-10-24T12:25:24Z")

</div>

Hallo,

ich habe ein Problem mit dem HubSpot prettier-plugin-hubl. Wenn ich dieses nach Anleitung installiere kommt immer folgende Fehlermeldung:

[“ERROR” - 2:16:09 PM] Error formatting document.

[“ERROR” - 2:16:09 PM] Couldn’t resolve parser “hubl”.

ConfigError: Couldn’t resolve parser “hubl”.

Der Parser wurde über eine config als Plugin registriert.

.prettierc.json:{ “plugins”: [“prettier-plugin-hubl”] }

Gibt es dafür eine Lösung?

---

<div class="post-metadata">

**Author:** ![MiaSrebrnjak](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/miasrebrnjak/32/10_2.png) [@MiaSrebrnjak](https://community.hubspot.com/u/MiaSrebrnjak)\
**Post date:** [October 25, 2024, 10:30am UTC](https://community.hubspot.com/t/code-formatting-with-prettier-in-vs-code/119091/2 "2024-10-25T10:30:50Z")

</div>

Hi [@Torsten\_Utz](https://community.hubspot.com/t5/user/viewprofilepage/user-id/390719),

danke für deine Frage.

Ich wollte zwei HubSpot-Experten um ihre Hilfe bitten:

Hi @mii und @Anton, habt ihr vielleicht Tipps oder Empfehlungen für [@Torsten\_Utz](https://community.hubspot.com/t5/user/viewprofilepage/user-id/390719)? Vielen Dank! ⭐

Beste Grüße

Mia, Community Team

---

<div class="post-metadata">

**Author:** ![Anton](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/anton/32/103167_2.png) [@Anton](https://community.hubspot.com/u/Anton)\
**Post date:** [October 25, 2024, 11:29am UTC](https://community.hubspot.com/t/code-formatting-with-prettier-in-vs-code/119091/3 "2024-10-25T11:29:45Z")

</div>

Hey [@Torsten\_Utz](https://community.hubspot.com/t5/user/viewprofilepage/user-id/390719),

mit dem prettier-plugin-hubl habe ich keine Erfahrung und um ehrlich zu sein, weis ich auch nicht, wozu es sein soll.

Mein VSCode Setup schaut wie folgt aus:  
- [HubSpot Plugin](https://marketplace.visualstudio.com/items?itemName=hubspot.hubl)

- [Prettier Plugin](https://marketplace.visualstudio.com/items?itemName=esbenp.prettier-vscode)

Das HubSpot Modul ist [wie in dieser Doku beschrieben](https://developers.hubspot.com/docs/cms/guides/install-and-use-hubspot-code-extension#hubl-language-support) konfiguriert und meine settings.json im Projekt-Ordner schaut so aus:

```lia-code-sample
{
 "files.associations": {
 "html-hubl": "html",
 "css-hubl": "css",
 "*.html": "html-hubl",
 "*.css": "css-hubl"
 }
}

```

 ![Bildschirmfoto 2024-10-25 um 13.27.44.png](https://d2qpr2jzcazej7.cloudfront.net/original/3X/c/8/c86475dc596f06536f0666f976444a2b550351de.png)

 ![Bildschirmfoto 2024-10-25 um 13.27.56.png](https://d2qpr2jzcazej7.cloudfront.net/original/3X/9/d/9d34db1c91b1368667ac1ec86f7cea303ac4b1df.png)

Wenn ich in den Einstellungen von VSCode nach HubSpot suche, sind dies meine Einstellungen.

 ![Bildschirmfoto 2024-10-25 um 13.28.48.png](https://d2qpr2jzcazej7.cloudfront.net/original/3X/0/e/0e106e5dd2e64cef2fbb4e83f2b89fc20326742a.png)

Hoffe es hilft.

Viele Grüße

Anton

---

<div class="post-metadata">

**Author:** ![Torsten\_Utz](https://avatars.discourse-cdn.com/v4/letter/t/d78d45/32.png) [@Torsten\_Utz](https://community.hubspot.com/u/Torsten_Utz)\
**Post date:** [October 28, 2024, 9:10am UTC](https://community.hubspot.com/t/code-formatting-with-prettier-in-vs-code/119091/4 "2024-10-28T09:10:57Z")

</div>

Hallo @Anton,

wenn ich die Konfiguration so vornehme bekomme ich folgende Fehlermeldung:

 ![Torsten_Utz_0-1730106638521.png](https://d2qpr2jzcazej7.cloudfront.net/original/2X/b/bd09e30b54c2017135f72f0fb963e46ba9fd17da.png)

Beste Grüße
