Sec-ant / prettier-plugin-embed

A configurable Prettier plugin to format embedded languages in JS/TS Files.

Home Page:https://www.npmjs.com/package/prettier-plugin-embed/v/latest

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

ESM support?

quantuminformation opened this issue · comments

I tried to use it and get

image

This is a Prettier v3 plugin written as an es module. It seems you're using Prettier v2. Could you please recheck your project and if there're still errors, please provide the reproduction steps.

thx, it works a but but didn't help much:

image

image

I'm not sure where I should look at. This plugin won't magically format your strings, it requires "identifiers" to tell it which template strings are needed to be formatted and as which language it should be formatted.

Would you please check the README, especially the section "An Overview of the Philosophy" to get a basic idea of how this plugin works and then label your template strings with the identifiers that can be understood by this plugin?

This plugin doesn't support line comments like //language=CSS as indicators because their placement is limited to lines, not AST nodes.

If you need formatting support, please use block comments like /* css */ followed by the string template you want to format.

@quantuminformation Do you have other questions or can we close this issue?

im good thx