- Python ->
autoflake + isort + black
- PHP ->
pint (psr12)
- JavaScript ->
js-beautify
- CSS ->
css-beautify
- JSON ->
jq
- Yaml ->
yamlfix
docker
curl -o ~/formatter https://raw.githubusercontent.com/choval/formatter/master/formatter
chmod +x ~/formatter
# Move to a bin path like ~/bin or ~/local/bin or ~/.local/bin
mv ~/formatter ~/.local/bin/formatter
docker pull ghcr.io/choval/formatter
rm `which formatter`
docker rmi ghcr.io/choval/formatter
With installed binary, will format all files (unlimited depth) in the current directory and format all files.
Caution
It will not prompt or wait for confirmation!
formatter [PATH]
Directly through docker.
docker run -v `pwd`:/src ghcr.io/choval/formatter /src
MIT, see LICENSE.