a standard extensible prettier config
npm install @tyisi/config-prettierstandard prettier config
Add @tyisi/config-prettier to your dependencies and:
- set as the value of the prettier key in your package.json
- set it in your .prettierrc
- extend it in your local prettier config file
| export | description |
| -------- | ---------------------------------------- |
| _none_ | Full config, with sh and tailwindcss |
| base | Base configuration without plugins |
| full | Full config, with sh and tailwindcss |
| sh | Shellscript formatting |
| tailwind | Tailwind CSS plugin and configuration |
This prettier config comes with Typescript types, a Config class that can be extended and so helper methods that make it easier to extend the configuration.
withOptions takes a standard Prettier config object and returns the config object itself.
It will also merge/add overrides and plugins from that object.
withOverrides takes multiple standard Prettier override configs as its arguments and returns the config object itself.
withPlugins takes multiple standard Prettier plugin definitions as its arguments and returns the config object itself.
See the configs in the src directory for examples.