A Prettier plugin that integrates enhanced estree printer options from prettierX, supporting Babel, TypeScript (via bundled TS), and Flow parsers (x-babel, x-babel-ts, x-babel-flow, x-typescript). v0.0.10 is the latest stable version, with no new releases since 2020. Requires Prettier ^2.0.0 and explicit parser configuration. Key differentiator: provides prettierX's formatting options not available in standard Prettier, such as generatorStarSpacing and spaceBeforeFunctionParen, to align with Standard JS style. Alternative: prettier-plugin-x-babel for more reliable Babel parsing.
npm install prettier-plugin-xVerified import paths — ran on the pinned version, not inferred.
Install prettier-plugin-x, configure Prettier to use x-babel parser and prettierX-specific options, and format a sample JS file.
Switch to parser x-typescript for TypeScript files, or use prettier-plugin-x-babel for Babel-based TS parsing.
Migrate to prettier-plugin-x-babel or other actively maintained Prettier plugins.
Consider using @prettier/plugin-babel or @prettier/plugin-typescript for standard formatting.
Add 'parser': 'x-babel' (or x-babel-ts, x-babel-flow, x-typescript) to your .prettierrc.
Run 'npm install --save-dev prettier-plugin-x'.
Specify parser in config: --parser=x-babel or add to .prettierrc.
Ensure prettier-plugin-x is installed and use valid parser names: x-babel, x-babel-ts, x-babel-flow, x-typescript.