A Prettier plugin that preprocesses JavaScript/TypeScript code to collapse object literals into compact single-line formatting. Version 0.1.6, actively maintained but early-stage. Unlike other Prettier plugins, it hooks into the parsing stage to enforce compact object notation, addressing a long-standing Prettier issue with unwanted newlines after opening braces. Requires Prettier >=2.x.
npm install prettier-plugin-compactifyNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Shows installation, configuration, and effect of collapsing object literals to single line.
Review output manually for unexpected formatting; consider disabling for specific files via // prettier-ignore
Upgrade Prettier to version 2 or later.
Configure plugins array in .prettierrc with the package name string instead of an import.
Ensure prettier-plugin-compactify is installed as a devDependency and Prettier config is correct.
Check Prettier version (>=2.x) and reinstall plugin.