An open API service indexing awesome lists of open source software.

https://github.com/griffincancode/standardize

File formatting, done right.
https://github.com/griffincancode/standardize

black file-formatting formatting iformat mypy prettier rust

Last synced: 7 months ago
JSON representation

File formatting, done right.

Awesome Lists containing this project

README

          

# Standardize

A high-performance, extensible code formatting tool designed to surpass existing solutions like Prettier and Black by providing consistent, configurable, and intelligent formatting across multiple programming languages.

## Features

- **Multi-Language Support**: Rust, Python, TypeScript/JavaScript with extensible plugin architecture
- **Tree-sitter Powered**: Robust parsing with incremental updates
- **High Performance**: Parallel processing and memory-efficient AST transformations
- **Smart Formatting**: Context-aware formatting that respects developer intent
- **Unified Configuration**: Consistent code style across polyglot codebases
- **Developer Tools**: Format-on-save, git pre-commit hooks, partial file formatting
- **Stable & Idempotent**: Consistent formatting results across runs

## Installation

```bash
cargo install standardize
```

## Usage

```bash
# Format a single file
standardize format src/main.rs

# Format entire project
standardize format .

# Check formatting without making changes
standardize check src/

# Watch and format on save
standardize watch src/
```

## Configuration

Create a `.standardize.toml` file in your project root:

```toml
[general]
max_line_length = 100
indent_style = "spaces"
indent_size = 4

[rust]
edition = "2021"
format_strings = true

[python]
line_length = 88
quote_style = "double"

[typescript]
semicolons = true
trailing_commas = "es5"
```

## Architecture

Built with SOLID principles and modular design:

- **Single Responsibility**: Each module has a focused purpose
- **Open/Closed**: Extensible through plugins without modifying core
- **Liskov Substitution**: Language formatters are interchangeable
- **Interface Segregation**: Clean abstractions for parsing and formatting
- **Dependency Inversion**: Core logic depends on abstractions, not implementations

## Contributing

Built by Griffin (@GriffinCanCode). Contributions welcome!

## License

MIT License