Skip to content

Action Builder JSX cleanup #60

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

Open
wants to merge 8 commits into
base: main
Choose a base branch
from

Conversation

anaxite
Copy link
Contributor

@anaxite anaxite commented Feb 24, 2025

This is a cleanup pass on the Action Builder's JSX components using Biome.

  • Applies some recommended fixes for legibility:
    • noUnusedTemplateLiteral
    • noForEach
    • useOptionalChain
    • noUselessElse
  • Runs the formatter on the components
  • Rearranges imports by import distance
  • Removes unnecessary React declarations

I used space indents, two spaces, to match most of the code so far.

Do not use template literals if interpolation and special-character handling are not needed.
Prefer for...of instead of forEach. Improves readability and may improve some performance issues.
Do not use template literals if interpolation and special-character handling are not needed.
Change to an optional chain for conciceness and safe property access.
Remove redundant else statements. Their content will never be executed in conjuction with the if block.
Some line rearranging
Import sorting
Add/remove characters as needed
`import React` is apparently unnecessary since React 17
@dosubot dosubot bot added the size:L This PR changes 100-499 lines, ignoring generated files. label Feb 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
size:L This PR changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant