3 Repos
Logic for traversing syntax trees to determine optimal line breaks and indentation.
Explore 3 awesome GitHub repositories matching development tools & productivity · Pretty Printing Algorithms. Refine with filters or upvote what's useful.
Prettier is an opinionated code formatter that parses source code and reprints it from scratch to enforce a consistent, project-wide visual style. By transforming code into an abstract syntax tree and applying a recursive document printing process, it eliminates manual style debates and ensures that all source files adhere to a unified appearance. The project is distinguished by its extensible, plugin-based architecture, which decouples language-specific parsing logic from the core engine. This modular design allows for uniform style enforcement across diverse programming languages and comple
Calculates optimal line breaks and indentation by traversing syntax trees against a defined print width.
Pino is a high-performance logging library for Node.js applications designed to minimize overhead and prevent blocking the main event loop. It generates machine-readable logs using newline-delimited JSON, facilitating efficient ingestion and analysis by external monitoring and log aggregation platforms. The library distinguishes itself by offloading log processing and formatting to worker threads, ensuring that heavy logging tasks do not impact application responsiveness. It also provides a decoupled command-line utility that transforms structured production logs into human-readable text, sim
Provides a command-line utility that transforms structured production logs into human-readable text for easier debugging.
Recast ist ein JavaScript-AST-Parser und -Printer für automatisiertes Code-Refactoring. Er konvertiert Quellcode in Abstract Syntax Trees (AST), die modifiziert und anschließend wieder in Quellcode zurückverwandelt werden können. Das Projekt konzentriert sich auf formatierungserhaltende Transformationen und speichert ursprüngliche Whitespace- und Einrückungs-Metadaten innerhalb der Syntaxbaum-Knoten, um Code ohne Verlust des ursprünglichen Layouts zu rekonstruieren. Zudem generiert es Source-Maps auf Zeichenebene, um präzise Entsprechungen zwischen ursprünglicher Eingabe und transformierter Ausgabe zu wahren. Das Toolkit enthält Utilities für die Syntaxbaum-Manipulation mittels Visitor-Pattern sowie Optionen für generisches Style-Pretty-Printing. Ein Command-Line-Interface wird bereitgestellt, um diese Transformationsfunktionen auf Zieldateien auszuführen und die Ergebnisse auf die Festplatte zu schreiben.
Offers a generic style pretty-printer that applies consistent global indentation rules regardless of original formatting.