-
Notifications
You must be signed in to change notification settings - Fork 51
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
prettier #2636
prettier #2636
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
1 Skipped Deployment
|
Hi @aymericdelab! You need to be added as a user to interact with me. Please ask @ponderingdemocritus to add you on the settings page. You are receiving this comment because I am set to review all PRs. That is configurable here. |
Caution Review failedThe pull request is closed. WalkthroughThe pull request introduces significant changes to the project's component and import management, primarily focusing on migrating component definitions and imports from local files to the Changes
Sequence DiagramsequenceDiagram
participant Local as Local Implementation
participant Library as @bibliothecadao/eternum
participant App as Application
Local->>Library: Migrate component definitions
Library-->>App: Provide centralized components
App->>Library: Import components directly
Note over Local,Library: Simplify component management
Possibly related PRs
Suggested reviewers
Poem
📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (2)
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
Failed to generate code suggestions for PR |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
🔭 Outside diff range comments (1)
client/apps/game/src/ui/modules/military/battle-view/BattleActions.tsx (1)
Line range hint
279-309
: Fix missing dependencies in useCallback hooks.The tooltip handlers are recreated on every render because
setTooltip
is missing from the dependency array. This could lead to potential memory leaks and performance issues.Add the missing dependency:
const mouseEnterRaid = useCallback(() => { // ... existing code ... setTooltip({ content: <div className="w-[250px]">{content}</div>, position: "top", }); -}, [raidStatus, selectedArmy, defenderArmy]); +}, [raidStatus, selectedArmy, defenderArmy, setTooltip]); const mouseEnterLeave = useCallback(() => { if (leaveStatus !== LeaveStatus.Leave) { setTooltip({ content: <div>{leaveStatus}</div>, position: "top" }); } -}, [leaveStatus]); +}, [leaveStatus, setTooltip]); const mouseEnterBattle = useCallback(() => { if (battleStartStatus !== BattleStartStatus.BattleStart && battleStartStatus !== BattleStartStatus.ForceStart) { setTooltip({ content: <div>{battleStartStatus}</div>, position: "top" }); } -}, [battleStartStatus]); +}, [battleStartStatus, setTooltip]); const mouseEnterClaim = useCallback(() => { if (claimStatus !== ClaimStatus.Claimable) { setTooltip({ content: <div>{claimStatus}</div>, position: "top" }); } -}, [claimStatus]); +}, [claimStatus, setTooltip]);
🧹 Nitpick comments (2)
client/apps/game/src/ui/modules/military/battle-view/BattleActions.tsx (1)
Line range hint
95-106
: Enhance error handling in battle actions.While error handling exists, consider enhancing user feedback for better UX:
- Add specific error messages for different failure scenarios
- Show error notifications to users
- Log structured error information for debugging
Example enhancement for the raid action:
const handleRaid = async () => { if (selectedArmy?.battle_id !== 0 && !raidWarning) { setRaidWarning(true); return; } setLoading(Loading.Raid); setRaidWarning(false); try { await battleManager.pillageStructure(account, selectedArmy!, structure!.entity_id); toggleModal( <ModalContainer size="half"> <Headline>Pillage History</Headline> <PillageHistory structureId={structure!.entity_id} /> </ModalContainer>, ); setBattleView(null); setView(LeftView.None); } catch (error) { - console.error("Error during pillage:", error); + const errorMessage = error instanceof Error ? error.message : "Unknown error during pillage"; + console.error("Pillage error:", { error, army: selectedArmy?.entity_id, structure: structure?.entity_id }); + toggleModal( + <ModalContainer size="half"> + <Headline>Raid Failed</Headline> + <div className="text-red">{errorMessage}</div> + </ModalContainer>, + ); } setLoading(Loading.None); };Also applies to: 134-145, 166-177, 189-200
client/apps/landing/src/dojo/setupNetwork.ts (1)
Line range hint
9-9
: Consider updating the SetupNetworkResult typeFor better type safety, consider explicitly defining the return type interface instead of relying on the inferred type from ReturnType.
-export type SetupNetworkResult = Awaited<ReturnType<typeof setupNetwork>>; +export interface SetupNetworkResult { + toriiClient: torii.Client; + contractComponents: ReturnType<typeof defineContractComponents>; + provider: EternumProvider; + world: World; + burnerManager: BurnerManager; +}
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (43)
client/.prettierignore
(1 hunks)client/apps/game/src/dojo/contractComponents.ts
(0 hunks)client/apps/game/src/dojo/createClientComponents.ts
(0 hunks)client/apps/game/src/dojo/setup.ts
(1 hunks)client/apps/game/src/dojo/setupNetwork.ts
(1 hunks)client/apps/game/src/hooks/helpers/battles/useBattles.tsx
(1 hunks)client/apps/game/src/hooks/helpers/use-resource-arrivals.tsx
(0 hunks)client/apps/game/src/hooks/helpers/useArmies.tsx
(1 hunks)client/apps/game/src/hooks/helpers/useContributions.tsx
(1 hunks)client/apps/game/src/hooks/helpers/useEntities.tsx
(1 hunks)client/apps/game/src/hooks/helpers/useGuilds.tsx
(1 hunks)client/apps/game/src/hooks/helpers/useHyperstructures.tsx
(1 hunks)client/apps/game/src/hooks/helpers/useRealm.tsx
(1 hunks)client/apps/game/src/three/components/InstancedBiome.tsx
(1 hunks)client/apps/game/src/three/sound/utils.ts
(1 hunks)client/apps/game/src/three/systems/SystemManager.ts
(1 hunks)client/apps/game/src/ui/components/construction/SelectPreviewBuilding.tsx
(1 hunks)client/apps/game/src/ui/components/military/PillageHistory.tsx
(2 hunks)client/apps/game/src/ui/components/military/TroopChip.tsx
(1 hunks)client/apps/game/src/ui/modules/military/battle-view/Battle.tsx
(1 hunks)client/apps/game/src/ui/modules/military/battle-view/BattleActions.tsx
(1 hunks)client/apps/game/src/ui/modules/military/battle-view/BattleHistory.tsx
(1 hunks)client/apps/game/src/ui/modules/military/battle-view/BattleSideView.tsx
(1 hunks)client/apps/game/src/ui/modules/military/battle-view/Troops.tsx
(1 hunks)client/apps/game/src/ui/modules/military/battle-view/battle-twitter-share-button.tsx
(1 hunks)client/apps/game/src/ui/modules/military/battle-view/utils.tsx
(1 hunks)client/apps/game/src/ui/modules/stream/eventDetails.tsx
(1 hunks)client/apps/game/src/ui/utils/realms.tsx
(1 hunks)client/apps/landing/src/dojo/contractComponents.ts
(0 hunks)client/apps/landing/src/dojo/createClientComponents.ts
(0 hunks)client/apps/landing/src/dojo/setup.ts
(1 hunks)client/apps/landing/src/dojo/setupNetwork.ts
(1 hunks)client/apps/landing/src/hooks/gql/fragment-masking.ts
(1 hunks)client/apps/landing/src/hooks/gql/gql.ts
(2 hunks)client/apps/landing/src/hooks/gql/graphql.ts
(0 hunks)client/apps/landing/src/hooks/helpers/useDonkeyArrivals.tsx
(0 hunks)client/apps/landing/src/hooks/helpers/useResources.tsx
(1 hunks)client/apps/landing/src/hooks/query/capacityConfig.tsx
(1 hunks)client/apps/landing/src/hooks/query/entityOwners.tsx
(1 hunks)client/apps/landing/src/hooks/useTravel.tsx
(1 hunks)client/sdk/packages/eternum/src/dojo/createClientComponents.ts
(1 hunks)contracts/src/utils/map/.prettierignore
(1 hunks)package.json
(1 hunks)
💤 Files with no reviewable changes (7)
- client/apps/landing/src/dojo/createClientComponents.ts
- client/apps/game/src/dojo/createClientComponents.ts
- client/apps/landing/src/hooks/helpers/useDonkeyArrivals.tsx
- client/apps/game/src/hooks/helpers/use-resource-arrivals.tsx
- client/apps/game/src/dojo/contractComponents.ts
- client/apps/landing/src/dojo/contractComponents.ts
- client/apps/landing/src/hooks/gql/graphql.ts
✅ Files skipped from review due to trivial changes (24)
- client/apps/landing/src/hooks/query/entityOwners.tsx
- client/apps/landing/src/hooks/useTravel.tsx
- client/apps/game/src/hooks/helpers/useRealm.tsx
- contracts/src/utils/map/.prettierignore
- client/apps/landing/src/hooks/helpers/useResources.tsx
- client/apps/game/src/hooks/helpers/useEntities.tsx
- client/apps/landing/src/hooks/query/capacityConfig.tsx
- client/apps/game/src/ui/components/military/TroopChip.tsx
- client/apps/game/src/ui/modules/military/battle-view/BattleSideView.tsx
- client/apps/game/src/three/components/InstancedBiome.tsx
- client/apps/game/src/ui/components/military/PillageHistory.tsx
- client/apps/game/src/hooks/helpers/useArmies.tsx
- client/apps/game/src/hooks/helpers/battles/useBattles.tsx
- client/apps/game/src/ui/modules/military/battle-view/Battle.tsx
- client/apps/game/src/three/sound/utils.ts
- client/.prettierignore
- client/apps/game/src/ui/modules/stream/eventDetails.tsx
- client/apps/game/src/ui/modules/military/battle-view/Troops.tsx
- client/apps/game/src/ui/utils/realms.tsx
- client/apps/game/src/hooks/helpers/useGuilds.tsx
- client/apps/game/src/three/systems/SystemManager.ts
- client/apps/game/src/hooks/helpers/useHyperstructures.tsx
- client/apps/game/src/ui/modules/military/battle-view/utils.tsx
- client/apps/game/src/hooks/helpers/useContributions.tsx
⏰ Context from checks skipped due to timeout of 90000ms (11)
- GitHub Check: test-various (guild_test)
- GitHub Check: test-various (resource_bridge_test)
- GitHub Check: test-various (map_test)
- GitHub Check: test-various (bank_test)
- GitHub Check: test-various (hyperstructure_test)
- GitHub Check: test-various (config_test)
- GitHub Check: test-various (position_test)
- GitHub Check: test-various (owner_test)
- GitHub Check: test-various (combat_test)
- GitHub Check: Run pr agent on every pull request, respond to user comments
- GitHub Check: clippy
🔇 Additional comments (16)
client/apps/game/src/ui/modules/military/battle-view/battle-twitter-share-button.tsx (1)
5-5
: LGTM! Import consolidation looks good.The addition of
ClientComponents
to the existing imports from@bibliothecadao/eternum
aligns with the PR's objective of centralizing component imports. The type is correctly used in the component's props interface.client/apps/game/src/ui/components/construction/SelectPreviewBuilding.tsx (1)
Line range hint
29-36
: LGTM! Import consolidation looks good.The migration of
ClientComponents
to@bibliothecadao/eternum
aligns with the PR's objective of consolidating component definitions.Let's verify that all imports of
ClientComponents
have been updated consistently:✅ Verification successful
Import changes are consistent across the game client
The migration of
ClientComponents
to@bibliothecadao/eternum
has been properly implemented across all game client files. The only files using the old import path are test mocks within the eternum package itself, which is expected and correct.🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Search for any remaining imports of ClientComponents from the old location rg "import.*ClientComponents.*from.*@/dojo/createClientComponents" # Search for the new import pattern to confirm the migration rg "import.*ClientComponents.*from.*@bibliothecadao/eternum"Length of output: 2267
client/apps/game/src/ui/modules/military/battle-view/BattleActions.tsx (2)
15-15
: LGTM! Import change aligns with centralization effort.The addition of
ClientComponents
import from@bibliothecadao/eternum
aligns with the PR's objective of centralizing component definitions.
Line range hint
40-50
: LGTM! Type safety improvement.The use of
ClientComponents
type forbattleAdjusted
prop enhances type safety and makes the component's interface more explicit.client/apps/landing/src/hooks/gql/gql.ts (2)
18-18
: LGTM! Formatting improvements.The whitespace changes in the GraphQL queries improve readability while maintaining functionality.
Also applies to: 20-20
36-36
: Verify the removal of player registration queries.The removal of
hasPlayerRegistered
andhasPlayerClaimed
queries suggests these operations have been moved or are no longer needed. Let's verify there are no remaining references to these queries.Also applies to: 44-44
✅ Verification successful
Removal of player registration queries is safe
The removed queries
hasPlayerRegistered
andhasPlayerClaimed
have no remaining references in the codebase. The registration-related code found in the codebase uses different queries for leaderboard functionality.🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Check for any remaining references to the removed queries # to ensure they're not being used elsewhere in the codebase echo "Checking for hasPlayerRegistered references..." rg -l "hasPlayerRegistered|HasPlayerRegisteredDocument" --type ts echo "Checking for hasPlayerClaimed references..." rg -l "hasPlayerClaimed|HasPlayerClaimedDocument" --type tsLength of output: 329
Script:
#!/bin/bash # Case-insensitive search with partial matches echo "Checking for any player registration query references..." rg -i "player.*regist|regist.*player" --type ts echo "Checking for any player claim query references..." rg -i "player.*claim|claim.*player" --type ts echo "Checking generated types file..." fd "graphql.ts" --type f --exec cat {}Length of output: 66695
client/apps/landing/src/dojo/setup.ts (1)
1-1
: LGTM! Clean import refactoringThe change to import from
@bibliothecadao/eternum
aligns with the broader effort to consolidate component management.client/sdk/packages/eternum/src/dojo/createClientComponents.ts (1)
6-6
: Verify all callers of createClientComponentsThe function signature has changed from accepting a direct parameter to using destructuring. While this change is valid, we should ensure all calling code has been updated.
Let's verify all callers have been updated:
✅ Verification successful
✓ Callers are compatible with new signature
The function signature change is safe. Both callers in
client/apps/landing/src/dojo/setup.ts
andclient/apps/game/src/dojo/setup.ts
pass anetwork
object that contains the requiredcontractComponents
property, which is created viadefineContractComponents(world)
in their respectivesetupNetwork
implementations.🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Search for direct calls to createClientComponents that might need updating rg "createClientComponents\(" --type tsLength of output: 394
Script:
#!/bin/bash # Check the content of both setup files to understand the network parameter echo "=== Landing setup.ts ===" cat client/apps/landing/src/dojo/setup.ts echo -e "\n=== Game setup.ts ===" cat client/apps/game/src/dojo/setup.tsLength of output: 8480
Script:
#!/bin/bash # Check setupNetwork implementation echo "=== Landing setupNetwork.ts ===" cat client/apps/landing/src/dojo/setupNetwork.ts echo -e "\n=== Game setupNetwork.ts ===" cat client/apps/game/src/dojo/setupNetwork.tsLength of output: 3128
client/apps/game/src/dojo/setupNetwork.ts (1)
1-1
: LGTM! Consistent import refactoringThe import changes align with the centralization of components in
@bibliothecadao/eternum
.client/apps/landing/src/hooks/gql/fragment-masking.ts (2)
2-2
: LGTM! Import orderingThe reordering of imports improves code organization.
6-6
: LGTM! Type exportMaking FragmentType exportable improves module reusability.
client/apps/game/src/ui/modules/military/battle-view/BattleHistory.tsx (1)
4-4
: LGTM! Import consolidation looks good.The addition of
ClientComponents
to the import statement from@bibliothecadao/eternum
aligns with the PR's objective of consolidating component-related imports.client/apps/game/src/dojo/setup.ts (2)
4-9
: LGTM! Import consolidation looks good.Moving
createClientComponents
import to@bibliothecadao/eternum
aligns with the PR's objective of centralizing component management.
Line range hint
31-37
: Verify the impact of increased debounce time.The debounce time has been increased to 200ms for handling larger batches. While this might help with batch processing, it could affect the responsiveness of entity updates in the UI.
Please ensure this change doesn't introduce noticeable delays in:
- UI updates when entities change
- Real-time synchronization requirements
- Game state responsiveness
Consider adding metrics or logging to monitor the entity update frequency and batch sizes to validate this change.
client/apps/landing/src/dojo/setupNetwork.ts (2)
Line range hint
42-48
: Verify the impact of adding contractComponents to the return objectThe addition of
contractComponents
to the return object is consistent with the refactoring effort. However, we should verify that all consumers ofsetupNetwork
are updated to handle this change.Let's check for potential breaking changes:
✅ Verification successful
Change is verified and safe to proceed
The addition of
contractComponents
to the return object ofsetupNetwork
is properly integrated into the codebase. It's consumed bycreateClientComponents
which enhances it with overridable components, and this pattern is consistently used across both game and landing applications.🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Find all files that import and use setupNetwork rg -l "setupNetwork" | xargs rg "setupNetwork|SetupNetworkResult" -A 5Length of output: 6581
Script:
#!/bin/bash # Check how contractComponents is used in createClientComponents rg "createClientComponents" -A 5 ast-grep --pattern 'function createClientComponents($_) { $$$ }'Length of output: 14340
1-1
: Verify @bibliothecadao/eternum package dependencyThe import statement has been updated to use the centralized package. This aligns with the refactoring effort to consolidate components.
Let's verify the package dependency is properly specified:
✅ Verification successful
Import statement is valid and properly configured
The package
@bibliothecadao/eternum
exists as a workspace package inclient/sdk/packages/eternum
and properly exports the required components through its module system. The workspace dependency is correctly configured.🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Check if the package is properly specified in package.json files fd package.json | xargs jq -r '.dependencies["@bibliothecadao/eternum"] // empty'Length of output: 95
Script:
#!/bin/bash # Check for the package directory fd -t d bibliothecadao # Check for any files exporting the required components ast-grep --pattern 'export { defineContractComponents, EternumProvider }'Length of output: 100
Script:
#!/bin/bash # Look for workspace packages fd package.json --exec grep -l "name.*bibliothecadao" {} \; # Search for component references with broader patterns ast-grep --pattern 'export $_ defineContractComponents' ast-grep --pattern 'export $_ EternumProvider' # Fallback to text search rg -l "bibliothecadao"Length of output: 13045
Script:
#!/bin/bash # Check the package's main source files for exports cat client/sdk/packages/eternum/src/index.ts || true # Fallback to checking all typescript files in the package for exports rg -l "defineContractComponents|EternumProvider" client/sdk/packages/eternum/src/Length of output: 799
package.json
Outdated
"format": "pnpm --dir ./client prettier --write .", | ||
"format:check": "pnpm --dir ./client prettier --check .", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💡 Codebase verification
The current changes limit formatting to only the client directory, but there are important files that should be formatted:
- Configuration files (package.json, biome.json)
- Documentation (*.md files)
- Contract-related code (deployment scripts, configs)
Consider either:
- Removing
--dir ./client
to format all files - Or creating separate format commands (e.g.,
format:client
,format:contracts
) if different formatting rules are needed
🔗 Analysis chain
LGTM! Verify scope of formatting.
The changes align with the project's script pattern of using --dir ./client
. This provides consistent formatting behavior with other commands.
Let's verify no critical files are excluded from formatting:
🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash
# Check for potentially important files that might need formatting outside client/
fd -t f -e ts -e tsx -e js -e jsx -e json -e md \
--exclude client \
--exclude node_modules \
--exclude dist \
--exec echo "File outside client dir: {}"
Length of output: 2013
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
🧹 Nitpick comments (1)
client/package.json (1)
13-14
: Consider documenting the root directory change.Adding a comment in the package.json or updating the README to explain why the root directory is set to parent would help future maintainers understand the setup.
Example documentation to add to README:
+ ## Development + + The project uses Prettier for code formatting. The formatting commands are configured to use the root directory's + prettier configuration to ensure consistent formatting across all packages.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (1)
pnpm-lock.yaml
is excluded by!**/pnpm-lock.yaml
📒 Files selected for processing (21)
.github/workflows/lint.yml
(1 hunks).prettierignore
(1 hunks)client/apps/balancing/package.json
(1 hunks)client/apps/game-docs/package.json
(1 hunks)client/apps/game/package.json
(1 hunks)client/apps/landing/package.json
(1 hunks)client/apps/landing/schema.graphql
(3 hunks)client/apps/landing/src/hooks/gql/fragment-masking.ts
(1 hunks)client/apps/landing/src/hooks/gql/gql.ts
(2 hunks)client/apps/landing/src/hooks/gql/index.ts
(1 hunks)client/apps/landing/src/routeTree.gen.ts
(2 hunks)client/common/manifests/manifest_dev.json
(24 hunks)client/common/manifests/manifest_mainnet.json
(22 hunks)client/common/manifests/manifest_prod.json
(22 hunks)client/package.json
(1 hunks)contracts/formula/battles/battle_time.js
(1 hunks)contracts/manifest_dev.json
(16 hunks)contracts/manifest_mainnet.json
(16 hunks)contracts/manifest_prod.json
(16 hunks)contracts/world/manifest_prod.json
(1 hunks)package.json
(1 hunks)
✅ Files skipped from review due to trivial changes (11)
- contracts/formula/battles/battle_time.js
- client/apps/landing/src/hooks/gql/index.ts
- contracts/world/manifest_prod.json
- .prettierignore
- client/common/manifests/manifest_dev.json
- client/apps/landing/src/routeTree.gen.ts
- client/common/manifests/manifest_prod.json
- contracts/manifest_prod.json
- contracts/manifest_mainnet.json
- contracts/manifest_dev.json
- client/common/manifests/manifest_mainnet.json
🚧 Files skipped from review as they are similar to previous changes (3)
- package.json
- client/apps/landing/src/hooks/gql/fragment-masking.ts
- client/apps/landing/src/hooks/gql/gql.ts
⏰ Context from checks skipped due to timeout of 90000ms (14)
- GitHub Check: test-various (test_ownership_systems)
- GitHub Check: test-various (transport_test)
- GitHub Check: test-various (guild_test)
- GitHub Check: test-various (realm_test)
- GitHub Check: test-various (trade_test)
- GitHub Check: test-various (resource_bridge_test)
- GitHub Check: test-various (map_test)
- GitHub Check: test-various (bank_test)
- GitHub Check: test-various (hyperstructure_test)
- GitHub Check: test-various (config_test)
- GitHub Check: test-various (resources_test)
- GitHub Check: test-various (owner_test)
- GitHub Check: test-various (combat_test)
- GitHub Check: test-various (season_test)
🔇 Additional comments (9)
client/apps/landing/schema.graphql (3)
38-154
: LGTM! Improved readability of ModelUnion type.The vertical formatting of union types makes the schema more readable and maintainable.
329-1555
: LGTM! Consistent query parameter formatting.Breaking down query parameters into multiple lines improves readability while maintaining functionality.
11284-11284
: LGTM! Appropriate scalar placement.Moving the u256 scalar declaration to group it with other scalar types is a good organization practice.
client/apps/game-docs/package.json (1)
7-8
: LGTM! Verify prettier configuration in parent directory.The format scripts are correctly configured to use the parent directory as root.
Run this script to verify the prettier configuration:
✅ Verification successful
Prettier configuration verified and consistent
The root-level prettier configuration is properly set up with standard formatting rules. The format scripts in game-docs will correctly use this configuration.
🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Check for prettier config files in parent directory fd -H -t f "^\.prettier(rc|ignore).*$|prettier\.config\.[jt]s$" ..Length of output: 204
Script:
#!/bin/bash # Check content of prettier config files echo "=== Root .prettierrc ===" cat ../git/.prettierrc echo -e "\n=== Root .prettierignore ===" cat ../git/.prettierignore echo -e "\n=== SDK eternum .prettierrc ===" cat ../git/client/sdk/packages/eternum/.prettierrc echo -e "\n=== Contracts map .prettierignore ===" cat ../git/contracts/src/utils/map/.prettierignoreLength of output: 1389
client/apps/balancing/package.json (1)
10-11
: LGTM! Format scripts are consistent.The format scripts match the project-wide standardization.
.github/workflows/lint.yml (1)
31-31
: LGTM! CI workflow updated to use new format:check script.The workflow correctly uses the newly standardized script name.
client/apps/game/package.json (1)
10-11
: LGTM! Format scripts are consistent.The format scripts maintain consistency with the project-wide standardization.
client/apps/landing/package.json (1)
12-13
: LGTM! Format scripts complete the project-wide standardization.The format scripts are consistent across all package.json files, establishing a unified approach to code formatting.
client/package.json (1)
13-14
: LGTM! Verify prettier configuration location.The changes to use
npx
and specify the root directory are good practices. However, let's verify the prettier configuration setup.Run this script to check the prettier configuration:
✅ Verification successful
Prettier configuration verified and correct
The
--root=..
setting is properly configured to use the root-level prettier configuration. For better maintenance, consider removing the identical config atclient/sdk/packages/eternum/.prettierrc
as it's redundant.🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify prettier configuration location and consistency # Check for prettier config files in root and client directories echo "Checking prettier configuration files:" fd -H -t f "^\.prettier" .. # Verify if the root directory setting works as expected cd .. && npx prettier --check client/package.json --root=. || echo "Root directory setting might be incorrect"Length of output: 499
Script:
#!/bin/bash # Check content of prettier configs to understand the setup echo "Root prettier config:" cat ../git/.prettierrc echo -e "\nSub-package prettier config:" cat ../git/client/sdk/packages/eternum/.prettierrc # Check if configs are identical diff ../git/.prettierrc ../git/client/sdk/packages/eternum/.prettierrc || echo "Configs are different"Length of output: 756
Summary by CodeRabbit
Based on the comprehensive summary, here are the high-level release notes:
Library Migration
@bibliothecadao/eternum
package.Code Formatting
.prettierignore
to exclude generated and specific files.GraphQL Schema
Minor Improvements