Prettier-fx is an opinionated code formatter that supports JavaScript, TypeScript, Flow, JSX, JSON, CSS, SCSS, Less, HTML, Vue, Angular, GraphQL, Markdown, and YAML. Current stable version is 3.1.1. It enforces a consistent style by parsing code and reprinting with its own rules, taking line length into account. It can be run in-editor on-save, via pre-commit hooks, or in CI. Key differentiators: zero configuration required, extensive plugin system, and built-in support for many languages. Releases follow SemVer with frequent patch updates.
npm install prettier-fxNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Shows how to import and use the format function to format a code string with options.
Update imports to use ESM import syntax; ensure package.json has 'type': 'module' or use .mjs extension.
Use npx prettier-fx instead of calling 'prettier' directly.
Always use await format(...) or .then() to handle the Promise.
Explicitly set parser option (e.g., 'babel', 'typescript', 'css').
Switch to import syntax: `import prettier from 'prettier-fx'`.
Provide a parser option, e.g., { parser: 'babel' }.Use `import { format } from 'prettier-fx'` or access `prettier.format`.