NiklasPor / prettier-plugin-organize-attributes

Organize your HTML attributes automatically with Prettier 🧼
MIT License
205 stars 12 forks source link

Add support for "lwc" parser #20

Open geoffswift opened 1 year ago

geoffswift commented 1 year ago

In addition to "vue", "angular" and "html" there is also "lwc" parser, refer to https://prettier.io/docs/en/options.html

I got it working by adding one line of code. Without this change the plugin makes no changes to my LWCs

export const parsers = {
  html: wrapParser(prettierParsers.html),
  lwc: wrapParser(prettierParsers.lwc), // Add this to make it work
  vue: wrapParser(prettierParsers.vue),
  angular: wrapParser(prettierParsers.angular),
};