Skip to content

Conversation

ZedLi
Copy link
Collaborator

@ZedLi ZedLi commented Oct 3, 2025

Description

Added a rule for eslint to enforce multi-line for control statements. My personal preference is enforcing braces for all statements but we've historically used single line if statements throughout the codebase which I think is fine.

However, I do want to avoid control statements that are on new lines without braces, even if they're single statements as those are more prone to errors when refactoring.

Screenshots (if appropriate)

How to Test

Confirm there's no other linting errors.

Checklist

  • [ ] I have added before and after screenshots for UI changes
  • [ ] I have added JSON response output for API changes
  • [ ] I have added steps to reproduce and test for bug fixes in the description
  • [ ] I have commented on my code, particularly in hard-to-understand areas
  • My changes generate no new warnings
  • [ ] I have added tests that prove my fix is effective or that my feature works
  • [ ] I have added a11y-tests label to run a11y audit tests if needed

PCI review checklist

  • I have documented a clear reason for, and description of, the change I am making.
  • If applicable, I've documented a plan to revert these changes if they require more than reverting the pull request.
  • If applicable, I've documented the impact of any changes to security controls.
    Examples of changes to security controls include using new access control methods, adding or removing logging pipelines, etc.

@ZedLi ZedLi self-assigned this Oct 3, 2025
@ZedLi ZedLi requested a review from a team as a code owner October 3, 2025 15:56
Copy link

vercel bot commented Oct 3, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Comments Updated (UTC)
boundary-ui Ready Ready Preview Comment Oct 3, 2025 3:56pm
boundary-ui-desktop Ready Ready Preview Comment Oct 3, 2025 3:56pm

Copy link
Collaborator

@cameronperera cameronperera left a comment

Choose a reason for hiding this comment

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

Thanks for the update. I personally prefer consistency for all control statements. Unless it can be a single line like if (true) action, which in that instance a ternary might be an option.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants