Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file modified map-generator/assets/maps/britannia/image.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
123 changes: 96 additions & 27 deletions resources/maps/britannia/manifest.json
Original file line number Diff line number Diff line change
@@ -1,158 +1,227 @@
{
"map": {
"height": 1396,
"num_land_tiles": 933706,
"num_land_tiles": 933664,
"width": 2000
},
"map16x": {
"height": 349,
"num_land_tiles": 55009,
"num_land_tiles": 54999,
"width": 500
},
"map4x": {
"height": 698,
"num_land_tiles": 228914,
"num_land_tiles": 228894,
"width": 1000
},
"name": "Britannia",
"nations": [
{
"coordinates": [960, 1258],
"coordinates": [
960,
1258
],
Comment on lines +20 to +23
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

🧩 Analysis chain

Fix Prettier formatting error before merge.

The CI pipeline reports Prettier formatting issues. Although the multi-line coordinate format improves readability, it does not match your project's Prettier configuration. Run npx prettier --write resources/maps/britannia/manifest.json locally and commit the corrected formatting.

Also applies to: 29-32, 38-41, 47-50, 56-59, 65-68, 74-77, 83-86, 92-95, 101-104, 110-113, 119-122, 128-131, 137-140, 146-149, 155-158, 164-167, 173-176, 182-185, 191-194, 200-203, 209-212, 218-221


I need to verify the claims in the review comment by inspecting the actual file and Prettier configuration.


🏁 Script executed:

#!/bin/bash
# Check if manifest.json exists and inspect the coordinates section
fd "manifest.json" --type f | head -5

Length of output: 169


🏁 Script executed:

#!/bin/bash
# Look for Prettier configuration files
fd -e prettierrc -e "prettier.config.*" | head -10

Length of output: 0


🏁 Script executed:

#!/bin/bash
# Check package.json for Prettier config and check first 50 lines of manifest
cat package.json | grep -A 20 "prettier" || echo "No prettier config in package.json"

Length of output: 2195


🏁 Script executed:

#!/bin/bash
# Get full content of the manifest.json to verify actual formatting
cat resources/maps/britannia/manifest.json 2>/dev/null || echo "File not found at expected path"

Length of output: 3623


I found the file and can see it uses multi-line coordinate formatting. Let me verify Prettier's default behavior for JSON arrays.


---

🌐 Web query:

```web
Prettier default JSON array formatting behavior short arrays

💡 Result:

Short answer: Prettier prints JSON arrays on a single line when the entire array (including brackets, items, commas and surrounding context) fits within its printWidth and the array is simple; otherwise it breaks the array across lines. Single-line arrays never get trailing commas. See Prettier’s options/behavior (printWidth + trailingComma). [1][2]

Sources:

  • Prettier options (printWidth behavior). [1]
  • Prettier options (single-line arrays do not get trailing commas / trailingComma option). [2]

Format coordinates to match Prettier defaults.

The multi-line coordinate arrays do not match Prettier's default formatting. Prettier prints JSON arrays on a single line when the entire array fits within its printWidth. The short arrays like [960, 1258] should be formatted on one line. Run npx prettier --write resources/maps/britannia/manifest.json to apply the correct formatting.

Also applies to: lines 29–32, 38–41, 47–50, 56–59, 65–68, 74–77, 83–86, 92–95, 101–104, 110–113, 119–122, 128–131, 137–140, 146–149, 155–158, 164–167, 173–176, 182–185, 191–194, 200–203, 209–212, 218–221

🤖 Prompt for AI Agents
In resources/maps/britannia/manifest.json around lines 20 to 23, the short
numeric coordinate arrays are split across multiple lines instead of using
Prettier's single-line formatting (e.g. [960, 1258]); update those arrays (and
the other listed occurrences) to single-line arrays or run the formatter to fix
them automatically. Run npx prettier --write
resources/maps/britannia/manifest.json (or manually collapse each short
coordinate array to one line) so all coordinate arrays that fit within
printWidth are formatted as single-line arrays.

"flag": "1_Dumnonia",
"name": "Dumnonia",
"strength": 1
},
{
"coordinates": [918, 1088],
"coordinates": [
918,
1088
],
"flag": "1_Dyfed",
"name": "Dyfed",
"strength": 1
},
{
"coordinates": [1114, 1108],
"coordinates": [
1114,
1108
],
"flag": "1_Gwent",
"name": "Gwent",
"strength": 1
},
{
"coordinates": [1048, 936],
"coordinates": [
1048,
936
],
"flag": "1_Gwynedd",
"name": "Gwynedd",
"strength": 2
},
{
"coordinates": [1108, 986],
"coordinates": [
1108,
986
],
"flag": "1_Powys",
"name": "Powys",
"strength": 2
},
{
"coordinates": [952, 536],
"coordinates": [
952,
536
],
"flag": "1_Strathclyde",
"name": "Strathclyde",
"strength": 2
},
{
"coordinates": [748, 556],
"coordinates": [
748,
556
],
"flag": "1_Dalriata",
"name": "Dalriata",
"strength": 1
},
{
"coordinates": [1228, 1176],
"coordinates": [
1228,
1176
],
"flag": "1_Wessex",
"name": "Wessex",
"strength": 3
},
{
"coordinates": [1442, 1226],
"coordinates": [
1442,
1226
],
"flag": "1_Sussex",
"name": "Sussex",
"strength": 1
},
{
"coordinates": [1600, 1188],
"coordinates": [
1600,
1188
],
"flag": "1_Kent",
"name": "Kent",
"strength": 2
},
{
"coordinates": [1621, 1085],
"coordinates": [
1621,
1085
],
"flag": "1_Essex",
"name": "Essex",
"strength": 1
},
{
"coordinates": [1707, 1018],
"coordinates": [
1707,
1018
],
"flag": "1_East Anglia",
"name": "East Anglia",
"strength": 2
},
{
"coordinates": [1370, 1002],
"coordinates": [
1370,
1002
],
"flag": "1_Mercia",
"name": "Mercia",
"strength": 3
},
{
"coordinates": [1298, 724],
"coordinates": [
1298,
724
],
"flag": "1_Northumbria",
"name": "Northumbria",
"strength": 2
},
{
"coordinates": [962, 366],
"coordinates": [
962,
366
],
"flag": "1_Fortriu",
"name": "Fortriu",
"strength": 2
},
{
"coordinates": [272, 1041],
"coordinates": [
272,
1041
],
"flag": "1_Munster",
"name": "Munster",
"strength": 2
},
{
"coordinates": [264, 830],
"coordinates": [
264,
830
],
"flag": "1_Connacht",
"name": "Connacht",
"strength": 2
},
{
"coordinates": [608, 975],
"coordinates": [
608,
975
],
"flag": "1_Laigin",
"name": "Laigin",
"strength": 2
},
{
"coordinates": [564, 845],
"coordinates": [
564,
845
],
"flag": "1_Southern Ui Neill",
"name": "Southern Uí Néill",
"strength": 3
},
{
"coordinates": [639, 680],
"coordinates": [
639,
680
],
"flag": "1_Ulaid",
"name": "Ulaid",
"strength": 2
},
{
"coordinates": [509, 759],
"coordinates": [
509,
759
],
"flag": "1_Airgialla",
"name": "Airgialla",
"strength": 2
},
{
"coordinates": [416, 678],
"coordinates": [
416,
678
],
"flag": "1_Northern Ui Neill",
"name": "Northern Uí Néill",
"strength": 3
},
{
"coordinates": [1869, 1308],
"coordinates": [
1869,
1308
],
"flag": "1_Franks",
"name": "Franks",
"strength": 3
}
]
}
}
2 changes: 1 addition & 1 deletion resources/maps/britannia/map.bin

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion resources/maps/britannia/map16x.bin

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion resources/maps/britannia/map4x.bin

Large diffs are not rendered by default.

Binary file modified resources/maps/britannia/thumbnail.webp
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading