A dynamic, plug-and-play shared Prettier configuration that automatically enables supported plugins when they are installed in your project
npm install -D prettier @tenedev/prettier-configAdd this to your package.json:
{
"prettier": "@tenedev/prettier-config"
}That's it 🎉
@tenedev/prettier-config uses dynamic plugin resolution to automatically detect and enable supported Prettier plugins installed in your project. No additional Prettier configuration is required.
The config checks whether each supported plugin is installed in your project:
Plugin installed → Automatically enabled
Plugin not found → Silently skipped
This makes the configuration plug-and-play while keeping optional plugin dependencies truly optional.
For example, if your project uses Astro, install the Astro plugin:
npm install -D prettier-plugin-astroThat's it. You don't need to add prettier-plugin-astro to the plugins array in your Prettier configuration. @tenedev/prettier-config automatically detects and enables it when installed in your project.
These plugins are included with @tenedev/prettier-config and are available automatically.
If a bundled plugin is also installed in your project, the project-installed version takes priority. If it is not installed in your project, the config automatically falls back to the bundled version.
Project plugin installed
↓
Use project-installed version
│
└── Not installed
↓
Use bundled version
This allows you to override a bundled plugin version when needed without requiring any additional Prettier configuration.
The following plugins are bundled with @tenedev/prettier-config:
These plugins are not bundled with @tenedev/prettier-config. They are automatically detected and enabled when installed in your project.
If an optional plugin is not installed, it is simply skipped and does not affect the rest of the configuration.
The following plugins are supported by @tenedev/prettier-config and are automatically detected when installed in your project:
- @prettier/plugin-php
- @prettier/plugin-pug
- @prettier/plugin-ruby
- @prettier/plugin-xml
- @shopify/prettier-plugin-liquid
- prettier-plugin-astro
- prettier-plugin-css-order
- prettier-plugin-jsdoc
- prettier-plugin-organize-imports
- prettier-plugin-prisma
- prettier-plugin-sh
- prettier-plugin-sql
- prettier-plugin-svelte
- prettier-plugin-tailwindcss
- prettier-plugin-toml