prettier-plugin-litsx
v0.3.0
Published
Official Prettier plugin for LitSX-authored source
Maintainers
Readme
prettier-plugin-litsx
Official Prettier support for LitSX-authored source.
Status
This plugin intentionally covers the official authored formats only:
*.litsx*.litsx.jsx
It does not claim plain *.tsx or *.jsx formatting.
The plugin preserves LitSX-authored syntax directly:
@event.prop?attrstatic styles = ...static properties = ...
Static static styles = \...`;templates are formatted as real CSS when they do not
contain${...}` interpolations.
Install
npm install -D prettier prettier-plugin-litsxUsage
Recommended configuration:
{
"overrides": [
{
"files": "*.litsx",
"options": {
"parser": "litsx"
}
},
{
"files": "*.litsx.jsx",
"options": {
"parser": "litsx-jsx"
}
}
]
}Notes
static styles = \...`;` is formatted with Prettier's CSS parser only when the template is fully static.- Templates with
${...}expressions are preserved without CSS reflow. *.tsxand*.jsxcompatibility formatting is intentionally out of scope for this package.
