Registry /
devops / prettier-plugin-curly-and-jsdoc
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
muslnode 18–226 runs
build_error
glibcnode 18–226 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 .
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+).
fixChange 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).
fixInstall 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.
fixChange your Prettier config to export a config object that imports the plugin and passes the object in the plugins array.
Audit
Dependencies
prettierrequiredPeer dependency: requires Prettier ^3.0.0; this plugin is a Prettier plugin and will not work without it.