Skip to content

A Mix formatter for your javascript and css files using Prettier

License

Notifications You must be signed in to change notification settings

sezaru/prettier_formatter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PrettierFormatter

Hex.pm Version

A formatter that can be plugged in to mix format in order to format javascript and css files.

Installation

The package can be installed by adding prettier_formatter to your list of dependencies in mix.exs:

def deps do
  [
    {:prettier_formatter, "~> 0.2.0"}
  ]
end

Then, to install Prettier itself, first set the version you want to use by adding the following to your config.exs:

config :prettier_formatter, :version, "3.3.3"

And then run:

mix prettier.install

Usage

Add PrettierFormatter to the .formatter.exs plugin list.

[
  plugins: [PrettierFormatter],
  inputs: [
    ...
    "assets/js/**/*.{js,ts,jsx,tsx}",
    "assets/tailwind.config.js",
    "assets/css/**/*.css"
  ]
]

About

A Mix formatter for your javascript and css files using Prettier

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages