This change alters the existing format workflow to include another job that handles formatting JSON files. The JSON files are formatted using BiomeJS. The BiomeJS config file is dynamically created before Biome runs and removed after. This uses the existing `.editorconfig` settings as defaults, allowing overwrites and additional Biome configurations within the workflow file.
Current JSON formatting rules:
- end_of_line = lf
- insert_final_newline = true
- indent_style = space
- trim_trailing_whitespace = true
- charset = utf-8
- indent_size = 2
- trailingCommas = none
- bracketSpacing = true
- expand = always
The existing Csharpier job runs at the same time as the new Biome job. The results (changes made) in each job are compressed into an artifact and downloaded into a final job that combines them and commits them back into the project (if there are changes, and if the workflow is not triggered within a PR).
Something has changed, either in GitHub, the checkout action, or the auto-commit action. Commits in PRs can no longer be checked and have their formatting auto-commited back (at least using this method) without running into permission issues. I've modified the workflow to simply error when formatting has not been run in a PR branch. The auto-commit still runs on commits to develop.
Implements a commit workflow on every commit that runs `dotnet format` to format the source of the project via the rules configured within the editorConfig. This does nothing to assign any formatting, it just enforces the rules already present.