BibliothecaDAO / eternum

onchain eternal game
https://alpha-eternum.realms.world
MIT License
36 stars 30 forks source link

prettier #1085

Closed cwastche closed 5 days ago

cwastche commented 5 days ago

PR Type

formatting


Description


Changes walkthrough ๐Ÿ“

Relevant files
Formatting
useHyperstructures.tsx
Reformat `progresses` parameter type definition                   

client/src/hooks/helpers/useHyperstructures.tsx
  • Reformatted the progresses parameter type definition for better
    readability.
  • +4/-5     

    ๐Ÿ’ก PR-Agent usage: Comment /help on the PR to get a list of all available PR-Agent tools and their descriptions

    vercel[bot] commented 5 days ago

    The latest updates on your projects. Learn more about Vercel for Git โ†—๏ธŽ

    Name Status Preview Comments Updated (UTC)
    eternum โœ… Ready (Inspect) Visit Preview ๐Ÿ’ฌ Add feedback Jul 5, 2024 1:05pm
    github-actions[bot] commented 5 days ago

    PR Reviewer Guide ๐Ÿ”

    โฑ๏ธ Estimated effort to review: 1 ๐Ÿ”ตโšชโšชโšชโšช
    ๐Ÿงช No relevant tests
    ๐Ÿ”’ No security concerns identified
    โšก Key issues to review

    None
    github-actions[bot] commented 5 days ago

    PR Code Suggestions โœจ

    CategorySuggestion                                                                                                                                    Score
    Maintainability
    Simplify complex union types using a type alias ___ **Consider using a type alias for the complex union type of progresses to improve code
    readability and maintainability. This will make the type easier to reuse and modify in the
    future.** [client/src/hooks/helpers/useHyperstructures.tsx [98-100]](https://github.com/BibliothecaDAO/eternum/pull/1085/files#diff-bf17af418721188cfc90bf8ed7cc8071cc96c2f61f98a068e77f8027429e61cfR98-R100) ```diff -progresses: ( - | ComponentValue<{ hyperstructure_entity_id: Type.BigInt; resource_type: Type.Number; amount: Type.Number }> - | undefined -)[], +type ProgressType = ComponentValue<{ hyperstructure_entity_id: Type.BigInt; resource_type: Type.Number; amount: Type.Number }> | undefined; +progresses: ProgressType[], ```
    Suggestion importance[1-10]: 9 Why: Using a type alias for the complex union type of `progresses` improves code readability and maintainability, making it easier to reuse and modify in the future. This suggestion is highly beneficial for the codebase.
    9