Command format
has been designed to run code formatting tools. It acts as a
wrapper to the original CLI tools (Prettier and StyLua) and can run them
through Docker when not locally available on the system.
$ mod format -h
usage: mod format [<flags>]
Code formatting tools: Prettier and StyLua.
Flags:
-h, --help Show context-sensitive help (also try --help-long and --help-man).
-c, --config=".modcli" Path to configuration file.
-v, --version Show application version.
-d, --docker Run through Docker.
-f, --fix Fix issues automatically. Beware!
-p, --prettier Run Prettier.
-s, --stylua Run StyLua.
$ mod format
[PRETTIER]
No issues found
[STYLUA]
No issues found