Supports all Melos filtering flags.
The format command is used to format the code in your Melos workspace according to Dart's formatting standards.
melos formatTo learn more, visit the Dart format documentation.
Return exit code 1 if there are any formatting changes. This flag is particularly useful in CI/CD pipelines to automatically detect and reject commits that do not adhere to the formatting standards, ensuring code quality.
melos format --set-exit-if-changedBy default, dart format overwrites the Dart files.
This option is useful when you want to review formatting changes without directly overwriting your files.
It takes one of json, none, show or write (the default, which
overwrites the files on disk).
Outputs the formatted code to the console.
melos format --output show
# or
melos format -o showOutputs the formatted code as a JSON object
melos format -o jsonLists the files that would be formatted, without showing the formatted content or making changes.
melos format -o noneThe line length to format the code to. Forwarded to dart format.
melos format --line-length 100Defines the max concurrency value of how many packages will execute the command
in at any one time. Defaults to 1.
# Set a 5 concurrency
melos format -c 5
