prettierx (v0.19.0) is a less opinionated fork of Prettier, offering additional formatting options that align with Standard JS and semistandard. It provides CLI usage and can be used as a standalone formatter or via a plugin. Unlike Prettier, prettierx includes options like `alignObjectProperties`, `offsetTernaryExpressions`, `spaceBeforeFunctionParen`, and `breakBeforeElse`. It requires Node >=12.17.0 and is currently in active maintenance with irregular release cadence. The package is ESM-only for programmatic use but provides a CommonJS-compatible CLI.
npm install prettierxVerified import paths — ran on the pinned version, not inferred.
Demonstrates using prettierx programmatically with additional options like alignObjectProperties and spaceBeforeFunctionParen.
Upgrade to Node >=12.17.0 and update any TypeScript parser configuration.
Use `--offset-ternary-expressions` or `offsetTernaryExpressions: true` instead.
Use specific spacing options like `--array-bracket-spacing`, `--computed-property-spacing`, etc.
Test thoroughly before enabling experimental options in production.
Use `importFormatting: 'auto'` or disable VSCode Organize Imports if using `oneline`.
Use `import` statements or `dynamic import()`.
Use `import('prettierx')` or switch to ES modules.Ensure you are using prettierx, not Prettier, and update to a version that supports the option (>=0.14.0).
Use `import { format } from 'prettierx'` instead of default import.Add 'type': 'module' to your package.json or use .mjs extension for your script.
No dependency data recorded yet.