Skip to content

Conversation

@shun-shobon
Copy link

fix #254

The root cause was that prettier-plugin-jsdoc delegates parse/preprocess to “another plugin that provides the same parser” by scanning options.plugins, but it could accidentally pick a plugin that appears after prettier-plugin-jsdoc (e.g. tailwindcss). Since tailwindcss wraps other parsers, delegating back to it from inside jsdoc creates a circular call chain like tailwind.preprocess -> jsdoc.preprocess -> tailwind.preprocess -> ..., eventually overflowing the call stack.

To prevent this, findPluginByParser() now only considers plugins that appear before prettier-plugin-jsdoc in options.plugins, avoiding delegation back into wrapper plugins while preserving compatibility with earlier parser plugins.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

RangeError: Maximum call stack size exceeded

1 participant