Repository navigation
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #12245 +/- ##
=========================================
Coverage 20.77% 20.77%
Complexity 20855 20855
=========================================
Files 6053 6053
Lines 548230 548230
Branches 73237 73237
=========================================
+ Hits 113903 113911 +8
+ Misses 420988 420973 -15
- Partials 13339 13346 +7
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Pull request overview
This PR adds Biome as a pre-commit hook to automatically format JSON locale files in ui/public/locales/. The changes standardize indentation to 2 spaces across all JSON files, improving consistency and maintainability.
Key Changes:
- Added Biome formatter configuration with 2-space indentation
- Configured pre-commit hook to run Biome on locale JSON files
- Reformatted existing locale files (zh_CN.json, pl.json, hi.json) to use consistent 2-space indentation
Reviewed changes
Copilot reviewed 2 out of 19 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| .github/linters/biome.json | New Biome configuration file defining formatting rules and disabling duplicate key detection |
| .pre-commit-config.yaml | Added Biome pre-commit hook targeting locale JSON files |
| ui/public/locales/zh_CN.json | Reformatted with consistent 2-space indentation, fixed spacing around colons |
| ui/public/locales/pl.json | Reformatted entire file with 2-space indentation (previously had inconsistent/no indentation) |
| ui/public/locales/hi.json | Reformatted entire file with 2-space indentation (previously had inconsistent/no indentation) |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
This pull request has merge conflicts. Dear author, please fix the conflicts and sync your branch with the base branch. |
|
@shwstppr @sureshanaparti this has conflicts because the json is not indented in our code. I think we should actually but it will be quite a discipline to change, What do you think? cc the rest of the world. |
|
@DaanHoogland @jbampton I'm fine with having indentation, but I think the change should go in the 4.20 branch otherwise it would be regular conflicts during forward merges |
|
Hi @jbampton can you please address the conflicts? |
# Conflicts: # .pre-commit-config.yaml # ui/public/locales/el_GR.json # ui/public/locales/en.json # ui/public/locales/pt_BR.json
https://github.com/biomejs/pre-commit/releases/tag/v2.6.7 updated the hooks with `prek autoupdate --freeze`
|
This pull request has merge conflicts. Dear author, please fix the conflicts and sync your branch with the base branch. |
https://github.com/biomejs/pre-commit/releases/tag/v2.6.7
updated the hooks with
prek autoupdate --freezeDescription
Indentation in JSON is optional for the format to be valid, as whitespace is generally insignificant to JSON parsers. However, it is a best practice to indent JSON to make it human-readable and maintainable, especially for configuration files or debugging purposes.
Tools for Formatting: Most programming languages and code editors provide built-in tools or libraries to automatically format or "beautify" JSON with a specified indentation level
We had most of these JSON files with no indents and some with 2 spaces.
Some had minor whitespace inconsistencies in some places.
This PR closes #12244 and we can work on this Biome config more in future PRs.
For example rules can be set or disabled for individual file types etc.
Auto formatting saves time.
Really just whitespace standardization
refs #11277
If this PR is not preferred we may be able to use "flat" JSON for these file with no indents
Types of changes
Feature/Enhancement Scale or Bug Severity
Feature/Enhancement Scale
Bug Severity
Screenshots (if appropriate):
How Has This Been Tested?
With pre-commit. First run the files were formatted and second time pre-commit passed.
Will just work on the GHA CI with pass or fail.
How did you try to break this feature and the system with this change?