Prettier 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 2.x (latest 2.3.2), with a dev version 2.4.0-dev available. It enforces consistent style by parsing code and reprinting with its own rules, wrapping based on line length. Key differentiators: it eliminates debates over code style, has wide ecosystem support (editor integrations, pre-commit hooks, CI), and is extensible via plugins. Releases are frequent, and it is actively maintained by the Prettier community.
npm install prettier-ecvNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Formats a simple JavaScript object string using Prettier with the babel parser.
Use --no-trailing-comma or set trailingComma: 'none' in config to revert.
Upgrade Node.js to >=10.13.0 or use Prettier v1.x.
Replace --stdin with --stdin-filepath <filename>.
Import from 'prettier/standalone' and register parser plugins.
Use // prettier-ignore for JS/TS, or <!-- prettier-ignore --> for HTML/JSX.
Run 'npm install prettier --save-dev' or ensure correct import path.
Provide a parser option (e.g., parser: 'babel') or use prettier.check() with a filePath.
Use 'import prettier from "prettier"' for default, or 'import { format } from "prettier"' for named.Use 'prettier/standalone' in browser environments and register plugins.
No dependency data recorded yet.