{"library":"prettier-plugin-interpolated-html-tags","title":"prettier-plugin-interpolated-html-tags","description":"A Prettier plugin that correctly formats HTML with interpolated tag names (e.g., `<${Component}>`). Version 2.0.1 is current, stable, and requires Prettier 3+. Released sporadically, it solves the problem of Prettier breaking formatting when tag names are dynamic expressions. Unlike generic HTML formatting, this plugin preserves the interpolation syntax and avoids parsing errors. Ships TypeScript types and supports both ESM and CJS.","language":"javascript","status":"active","last_verified":"Sat Apr 25","install":{"commands":["npm install prettier-plugin-interpolated-html-tags"],"cli":null},"imports":["import prettierPluginInterpolatedHtmlTags from 'prettier-plugin-interpolated-html-tags'"],"auth":{"required":false,"env_vars":[]},"quickstart":{"code":"import { format } from 'prettier';\nimport plugin from 'prettier-plugin-interpolated-html-tags';\n\nconst code = `<\\n  \\${Component}\\n  prop1={value1}\\n  prop2={value2}\\n>\\n  child content\\n<\\/\\${Component}>`;\n\nconst formatted = await format(code, {\n  parser: 'html',\n  plugins: [plugin],\n});\n\nconsole.log(formatted);\n// Output:\n// <\\${Component} prop1={value1} prop2={value2}>\n//   child content\n// </\\${Component}>","lang":"typescript","description":"Shows how to use the plugin to format HTML with interpolated tag names, preventing Prettier from breaking the template literal syntax.","tag":null,"tag_description":null,"last_tested":null,"results":[]},"compatibility":null}