@supersoniks/prettier-plugin-twig-melody

1.0.4 • Public • Published

Prettier for Melody

Prettier Banner


This plugin for Prettier is a fork of prettier-plugin-twig-melody, which is currently unmaintained. Several enhancements have been added to fit our development and templating needs at Supersoniks.

Install

yarn add --dev @supersoniks/prettier-plugin-twig-melody

Use

prettier --write "**/*.melody.twig"

In your editor, if the plugin is not automatically picked up and invoked (e.g., if you are using format on save, but no formatting is happening when you save), try adding the plugin explicitly in your Prettier configuration (e.g., .prettierrc.json) using the plugins key:

{
    "printWidth": 80,
    "tabWidth": 4,
    "plugins": ["./node_modules/@supersoniks/prettier-plugin-twig-melody"]
}

Enhancements

  • Preserve only keyword in twig templates.
  • Block statements : no empty line between opening end closing block statements.
  • Html element : nno empty line between opening and closing tags.

Readme

Keywords

none

Package Sidebar

Install

npm i @supersoniks/prettier-plugin-twig-melody

Weekly Downloads

108

Version

1.0.4

License

Apache 2.0

Unpacked Size

107 kB

Total Files

55

Last publish

Collaborators

  • supersoniks
  • rfargetton