A plugin for extending the HTML formatter of Prettier to format HTML files containing syntax of the FW2 framework.
Install this package:
npm install -D @devmount/prettier-plugin-fw2
Add the plugin to your Prettier config file.
{
"plugins": ["@devmount/prettier-plugin-fw2"]
}
Using this plugin provides formatting for FW2's template markers for conditionals ({!
, !}
) and variables ({_a_}
, {_b:raw_}
).
It formats only HTML files, but includes embedded JS.
This repo contains a misformatted example HTML file, you can test this plugin by running:
npm run example