JSPM

  • Created
  • Published
  • Downloads 579408
  • Score
    100M100P100Q177165F
  • License MIT

Svelte plugin for prettier

Package Exports

  • prettier-plugin-svelte

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (prettier-plugin-svelte) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

Prettier for Svelte components

Format your svelte components using prettier.

Features

  • Format your html, css, and javascript using prettier
  • Format Svelte syntax, e.g. each loops, if statements, await blocks, etc.
  • Format the javascript expressions embedded in the svelte syntax
    • e.g. expressions inside of {}, event bindings on:click="", and more
  • Supports Svelte v2 and v3

How to use

Install prettier-plugin-svelte as a dev dependency in your project.

Then format your code using prettier cli. You may need to add --plugin-search-dir=.

prettier --write --plugin-search-dir=. ./**/*.html