A fork of Prettier that removes unnecessary parentheses around JSX fragments and elements, providing a cleaner output for JSX/TSX code. Version 3.4.0 is based on Prettier v3.4.0 and is released infrequently, tracking upstream Prettier versions. It aims to address the common complaint of Prettier adding extra parentheses in JSX, resulting in more compact formatting similar to standard React patterns. Unlike Prettier plugins that modify behavior through options, this is a complete fork that replaces the prettier binary, so it cannot be used as a plugin alongside official Prettier.
npm install prettier-no-jsx-parensVerified import paths — ran on the pinned version, not inferred.
Installs the package, adds a formatting script, and shows how to use the API to format JSX without extra parentheses.
Uninstall prettier and use prettier-no-jsx-parens as the sole formatter, or alias the command as shown in README.
Check repository for newer versions or switch to official Prettier with a plugin like @prettier/plugin-parens if available.
Use import or dynamic import(). Or use a build step that handles ESM.
Set prettier.prettierPath in VSCode settings to the absolute path of the package, e.g., /usr/local/lib/node_modules/prettier-no-jsx-parens/
Change require() to import or use dynamic import(). If using TypeScript, set "module": "ESNext" or use ts-node with --esm flag.
Run 'npm install --save-dev prettier-no-jsx-parens' in the project root, or ensure the package is globally installed and the PATH is correct.
Use import instead of require, or rename file to .mjs, or set "type": "module" in package.json.