CompactifyLess space. Same logic. Compactify reduces unnecessary line breaks while keeping complex code structured. Use it alongside your usual formatter, such as Prettier. Supported filesJavaScript ( Before and afterBefore:
After:
Short objects, arrays and calls can also be compacted when they fit the configured line length. For JavaScript and JSON, the formatter checks the parsed syntax structure before accepting changes. Power Fx uses a conservative lexical check, not a full Power Fx parser. UsageOpen a supported file, open the Command Palette, choose Format Document With..., and select Compactify. You can also use Compactify: Format Document or Compactify: Format Selection. Compactify: Restore Original Formatting restores the last in-memory snapshot only if the document still matches the formatted result. Use Undo or Timeline otherwise. Settings
LimitationsComplex blocks and candidates containing comments or sensitive literal syntax may be left unchanged. Power Fx interpolated strings and Canvas Apps YAML are not supported. Review changes and test your code before deployment. Formatting runs locally; the extension does not make network requests. Bundled TypeScript license: |