Skip to content

Latest commit

 

History

86 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

@tenedev/prettier-config

A dynamic, plug-and-play shared Prettier configuration that automatically enables supported plugins when they are installed in your project

npm version Downloads

Installation

npm install -D prettier @tenedev/prettier-config

Usage

Add this to your package.json:

{
  "prettier": "@tenedev/prettier-config"
}

That's it 🎉

Automatic Plugin Detection

@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.

How it works

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-astro

That'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.

Supported Plugins

Bundled Plugins

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:

Optional Plugins

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:

About

✨ Dynamic, plug-and-play shared Prettier configuration with automatic plugin detection

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Sponsor this project

Packages

Used by

Contributors

Languages