one command,
npx prettier-inittier
, to install and configure prettier
prettier
doesn't have an --init
flag to create a default config for you. There are many tools like this, but this one is mine. It installs `prettier`` using the same package manager you use for your project and creates a config file with some sensible defaults.
Requires node
> v18.
npx prettier-inittier
If you don't like the config that is generated by default, you can edit the .prettier-inittier-default
file that is created in ~
after running the command.