A tool that formats all kinds of languages consistently
Project description
Monoformat
Opinionated and "zero config" formatters like Black and Prettier are amazing in the sense that they remove any need for thinking about formatting. However, they still require you to:
- Be used separately (one is Python and the other is Node)
- Be configured for the language version and so forth
Monoformat does this automatically. You can only use the language version that monoformat allows and you can configure literally nothing except which files it's going to reformat and which it's not.
Installation
Monoformat is available on PyPI:
pip install monoformat
Usage
Monoformat is a command line tool. You can run it with:
monoformat .
This will reformat all files in the current directory and its subdirectories.
It will take care to avoid .git
and other special directories. There is a
default pattern embedded but you can change it with the --do-not-enter
flag,
which is a pattern matching folder or file names you don't want to consider.
Without install
I've actually spent an absurd amount of time to make it extremely simple to run Python and JS code without installing anything. You can do this with:
curl -s https://pypi.run/monoformat | python3.10 - .
Doing so will entirely reformat with black, isort and prettier the current directory.
Supported languages
Monoformat supports the following languages:
- Python (Black)
- JavaScript (Prettier)
- TypeScript (Prettier)
- JSON (Prettier)
- Markdown (Prettier)
- YAML (Prettier)
- HTML (Prettier)
- CSS (Prettier)
- SCSS (Prettier)
- Vue (Prettier)
- Svelte (Prettier)
- PHP (Prettier)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file monoformat-0.1.0b2.tar.gz
.
File metadata
- Download URL: monoformat-0.1.0b2.tar.gz
- Upload date:
- Size: 6.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.2.2 CPython/3.10.5 Linux/5.15.0-53-generic
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 68027d3e797a0975b46afd924ca23546a476996feb0404d2f5f55d3bd98b1f04 |
|
MD5 | 8cbd1d12495a04a440ff31e7a098d4fd |
|
BLAKE2b-256 | a3f55218df5412121a76350cc84ba2d6b62deabe5239fdb9ee63fc571a2fb91d |
Provenance
File details
Details for the file monoformat-0.1.0b2-py3-none-any.whl
.
File metadata
- Download URL: monoformat-0.1.0b2-py3-none-any.whl
- Upload date:
- Size: 7.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.2.2 CPython/3.10.5 Linux/5.15.0-53-generic
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3a004aa1ffd11b5f813cef345545dd30ae0bade6ca8b5a10ec920a029852d705 |
|
MD5 | 707e706ae2cb5f711e43ff694a9d842a |
|
BLAKE2b-256 | 9f0e5bdd1466012d87748464dff04a3edb6050e8dcb5a5d07e084cd8f01d29a2 |