Skip to content
This repository has been archived by the owner on Aug 31, 2023. It is now read-only.

feat(rome_js_formatter): Format throw and return argument #2986

Merged
merged 2 commits into from
Aug 3, 2022

Commits on Aug 3, 2022

  1. feat(rome_js_formatter): Format throw and return argument

    This PR ensures that `throw` and `return` add parentheses around the argument for binary like expressions, sequence expressions, and if the argument has any leading comments.
    
    ## Testing
    
     I manually reviewed all snapshot cases. The differences to prettier are around
    
     * formatting of binary like expressions -> separate PR
     * when to add or omit parentheses -> not part of this PR
     * comments -> requires the comments refactoring.
    MichaReiser committed Aug 3, 2022
    Configuration menu
    Copy the full SHA
    b29668a View commit details
    Browse the repository at this point in the history
  2. Code review feedback.

    MichaReiser committed Aug 3, 2022
    Configuration menu
    Copy the full SHA
    3940b57 View commit details
    Browse the repository at this point in the history