Repository navigation
Description
{
"semi": false,
"tabWidth": 2,
"printWidth": 100,
"singleQuote": true,
"trailingComma": "es5",
"plugins": ["prettier-plugin-tailwindcss", "prettier-plugin-jsdoc"]
}If you have any other plugin added next to prettier-plugin-jsdoc, you'll end up with infinite loop of errors:
Some additional context:
File: package.json
{
"name": "web",
"description": "",
"author": "",
"version": "1.0.0",
"license": "Apache-2.0",
"private": true,
"type": "module",
"scripts": {
"dev": "tsx ./scripts/dev.ts",
"lint": "tsx ./scripts/lint.ts",
"setup": "tsx ./scripts/setup.ts",
"build": "tsx ./scripts/build.ts",
"clean": "tsx ./scripts/clean.ts",
"format": "tsx ./scripts/format.ts",
"prisma": "tsx ./scripts/prisma.ts",
"locales": "tsx ./scripts/locales.ts",
"start": "node ./dist/scripts/start.js"
},
"dependencies": {
"next": "16.0.5",
"react": "19.2.0",
"react-dom": "19.2.0",
"@clscripts/cl-common": "^1.0.4",
"@clscripts/dotenv-cli": "^8.0.1",
"@clscripts/next": "^15.3.5",
"@hookform/resolvers": "^3.9.1",
"@inquirer/prompts": "^7.2.4",
"@kodingdotninja/use-tailwind-breakpoint": "^1.0.0",
"@mdi/js": "^7.4.47",
"@mdi/react": "^1.6.1",
"@prisma/client": "^6.3.1",
"@radix-ui/react-label": "^2.1.0",
"@radix-ui/react-select": "^2.1.2",
"@radix-ui/react-slot": "^1.1.0",
"@radix-ui/react-toggle": "^1.1.0",
"@radix-ui/react-toggle-group": "^1.1.0",
"@radix-ui/react-tooltip": "^1.2.7",
"@t3-oss/env-nextjs": "^0.13.8",
"@tanstack/react-query": "^5.84.1",
"@tanstack/react-query-devtools": "^5.84.1",
"@tolgee/format-icu": "^5.32.0",
"@tolgee/react": "^5.31.5",
"await-to-js": "^3.0.0",
"axios": "^1.7.8",
"chalk": "^4.1.2",
"class-variance-authority": "^0.7.0",
"clsx": "^2.1.1",
"compare-path": "^1.1.3",
"concat-str": "^1.0.6",
"conditionalize-component": "^1.4.2",
"dotenv": "^16.4.5",
"framer-motion": "^11.11.17",
"iif-ts": "^2.0.0",
"lucide-react": "^0.460.0",
"ms": "^2.1.3",
"next-intl": "^3.25.3",
"next-themes": "^0.4.6",
"nextjs-middleware-stack": "^1.0.2",
"nuqs": "^2.4.3",
"prisma": "^6.13.0",
"react-hook-form": "^7.53.2",
"tailwind-merge": "^2.5.4",
"tailwindcss-animate": "^1.0.7",
"tailwindest": "^2.3.6",
"use-is-mounted-hook": "^1.0.1",
"zod": "^3.25.20",
"zustand": "^5.0.3"
},
"devDependencies": {
"@clscripts/del-cli": "^6.0.0",
"@clscripts/echo-cli": "^2.0.0",
"@clscripts/prettier": "^3.6.2",
"@clscripts/prisma": "^6.11.1",
"@clscripts/tolgee-cli": "^2.13.0",
"@clscripts/ts-patch": "^3.3.0",
"@tailwindcss/postcss": "^4",
"@tolgee/cli": "^2.13.0",
"@types/ms": "^2.1.0",
"@types/node": "^20",
"@types/react": "^19",
"@types/react-dom": "^19",
"autoprefixer": "^10.4.21",
"del-cli": "^6.0.0",
"dotenv-cli": "^7.4.4",
"echo-cli": "^2.0.0",
"eslint": "^9",
"eslint-config-next": "16.0.5",
"postcss": "^8.5.3",
"postcss-load-config": "^6.0.1",
"prettier": "^3.7.3",
"prettier-plugin-jsdoc": "^1.7.0",
"prettier-plugin-tailwindcss": "^0.7.1",
"tailwindcss": "^4",
"ts-essentials": "^10.1.1",
"ts-patch": "^3.3.0",
"tsx": "^4.20.3",
"typescript": "^5"
}
}
regarding @CLScripts, its just a small class that lets you write something like the following, which makes your package.json scripts section a lot cleaner to read:
File: scripts/format.ts
import { Prettier } from '@clscripts/prettier'
import { runCommand } from '@clscripts/cl-common'
runCommand(
new Prettier({
files: ['./**/*.{htm,html,css,md,mdx,js,jsx,ts,tsx}'],
}).command // prettier --write ./**/*.{htm,html,css,md,mdx,js,jsx,ts,tsx}
)And thanks for supporting prettier 3.7 🌹
Reacted by Samuel Plumppu and Ben Wells
Reacted by Pascal Barth and Ben Wells
Metadata
Metadata
Assignees
Labels
No labels
Activity
Update deps - except prettier-related dependencies, until issues have…
Greenheart commentedon Dec 4, 2025
I've looked into this a bit more.
This error only seems to happen when you run
prettier format --write -. via the CLI. So the prettier JS API seems to behave differently.The current tests of
prettier-plugin-jsdocdon't cover plugin compatibility when prettier is run via the prettier CLI.Cause of the infinite loop
When running
prettier format --write ., the functionfindPluginByParserinprettier-plugin-jsdoc(utils.js) fails to find a parser forprettier-plugin-tailwindcss, causing some other code to keep callingfindPluginByParserinfinitely until the maximum call stack is reached and the formatting for that file is aborted.fix: prevent preprocess again
fardad-dev commentedon Dec 7, 2025
Thank you, i fixed the issue, released in v1.7.1
bwells78 commentedon Dec 8, 2025
Thank you for your work on this plugin, it's incredibly useful. I'm still struggling with this error after updating to v1.8 (or v1.7.1) - here is my output for any clues:
If I remove
prettier-plugin-tailwindcssthe error goes away-fardad-dev commentedon Dec 8, 2025
Change order of plugins, add jsdoc to end of list
bwells78 commentedon Dec 8, 2025
Thank you, I should have mentioned that I tried that as well, same result for me:
diego-aquino commentedon Dec 14, 2025
I'm facing the same error using
prettier-plugin-jsdoc@1.8.0:.prettierrc.json{ "semi": true, "printWidth": 120, "tabWidth": 2, "useTabs": false, "singleQuote": true, "trailingComma": "all", "bracketSpacing": true, "arrowParens": "always", "endOfLine": "lf", "proseWrap": "always", "plugins": ["prettier-plugin-jsdoc", "prettier-plugin-tailwindcss"] }tmp.jsOutput:
wmertens commentedon Jan 26, 2026
I'm also getting this, no matter if I put the tailwind plugin first or last
borgogelli commentedon Apr 18, 2026
I'm facing the same problem with prettier-plugin-jsdoc@1.8.0 and prettier 3.8.2
fix: handle parser re-entry from chaining plugins
iainlane commentedon May 7, 2026
I've filed #262 to fully fix this. @fardad-dev it'd be good if you could reopen!
fix: handle parser re-entry from chaining plugins (#262)