Registry / devops / prettier-plugin-curly-and-jsdoc

prettier-plugin-curly-and-jsdoc

JSON →
library3.4.0jsnpmunverified

Prettier plugin that resolves incompatibilities between prettier-plugin-curly and prettier-plugin-jsdoc, allowing both to be used together without conflicts. Current stable version is 3.4.0. The package is a thin compatibility layer that re-exports and combines the two plugins. It is part of the codestyle-config monorepo and ships TypeScript definitions. Key differentiator: no configuration needed beyond adding it to your Prettier plugins list. Released as needed to keep up with upstream plugin changes.

npm install prettier-plugin-curly-and-jsdoc
INSTALL
IMPORT
SIG · PRETTIER-PLUGIN-CU
P
prettier-plugin-curly-and-jsdoc
devopsjavascriptv3.4.0
Install
Import
Disk
Pass rate
0/ 6
Env Coverage0 / 6
glibc
1822
musl
1822
Install & Compatibility
Where this runs
tested against v? · npm install
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
node 18226 runs
build_error
glibc
node 18226 runs
build_error
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

default
import prettierPluginCurlyAndJsdoc from 'prettier-plugin-curly-and-jsdoc'
const prettierPluginCurlyAndJsdoc = require('prettier-plugin-curly-and-jsdoc')
ESM-only since v3; CJS require will fail.
plugins
// In prettier.config.mjs: import prettierPluginCurlyAndJsdoc from 'prettier-plugin-curly-and-jsdoc'; export default { plugins: [prettierPluginCurlyAndJsdoc] };
// Adding the plugin name as a string in .prettierrc: {"plugins": ["prettier-plugin-curly-and-jsdoc"]}
As of v3, you must import the plugin and pass the object, not just the package name string.
Plugin
import type { Plugin } from 'prettier'; import plugin from 'prettier-plugin-curly-and-jsdoc'; // type is Plugin
import { Plugin } from 'prettier-plugin-curly-and-jsdoc'
The package does not export any types; use Prettier's own Plugin type.

Shows installation and configuration to enable both curly and JSDoc formatting via Prettier without conflicts.

// Install the plugin and its dependencies: // npm install --save-dev prettier prettier-plugin-curly prettier-plugin-jsdoc prettier-plugin-curly-and-jsdoc // prettier.config.mjs import prettierPluginCurlyAndJsdoc from 'prettier-plugin-curly-and-jsdoc'; export default { semi: true, singleQuote: true, plugins: [prettierPluginCurlyAndJsdoc], // No need to add curly or jsdoc plugins separately; this plugin includes them. }; // Then run: npx prettier --check .
Debug
Known issues
breakingIn v3.0.0, the plugin became ESM-only. CommonJS require() will throw.
fix
Switch to ESM: use 'import' or ensure your project is ESM (type: module in package.json).
affects: >=3.0.0
gotchaDo NOT add curly and jsdoc plugins individually in Prettier config if using this plugin; it includes them and adding duplicates may cause conflicts.
fix
Only include this plugin in the 'plugins' array; remove 'prettier-plugin-curly' and 'prettier-plugin-jsdoc' from config.
affects: >=1.0.0
deprecatedThe package does not follow semantic versioning for the compatibility layer; minor bumps may break due to upstream changes in prettier-plugin-curly or prettier-plugin-jsdoc.
fix
Pin exact versions of all three plugins and test after updates.
affects: <3.0.0
Errors
Common errors & fixes
Error [ERR_REQUIRE_ESM]: require() of ES Module /path/to/node_modules/prettier-plugin-curly-and-jsdoc/dist/index.js from ... not supported.
Using CommonJS require() for an ESM-only package (v3+).
fix
Change to dynamic import() or convert your project to ESM (e.g., use .mjs extension or type: module in package.json).
Cannot find module 'prettier-plugin-curly-and-jsdoc'
The package is not installed when using the string reference in Prettier config (e.g., ".prettierrc" with plugin name).
fix
Install the package: npm install --save-dev prettier-plugin-curly-and-jsdoc. And use the object reference as shown in quickstart.
Error: Couldn't resolve plugin "prettier-plugin-curly-and-jsdoc" from your Prettier config. Did you mean to import it instead of using the string name?
Prettier v3+ requires plugin objects, not strings, when using external ESM plugins.
fix
Change your Prettier config to export a config object that imports the plugin and passes the object in the plugins array.
Upgrade
Version history
3.4.0latest on npm
Audit
Dependencies
prettierrequiredPeer dependency: requires Prettier ^3.0.0; this plugin is a Prettier plugin and will not work without it.
Agent activity
4 hits · last 30 days
node
4
Resources
prettier-plugin-curly-and-jsdoc — npm install prettier-plugin-curly-and-jsdoc · libregistry