Skip to content
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

fix(jsx): correctly comment first line of JSX #56

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Commits on Dec 31, 2022

  1. fix(jsx): correctly comment first line of JSX

    The first and last lines of JSX should be commented with `// %s`, rather
    than `{/* %s */}`. However, the current way of configuring the plugin
    does not allow us to check if the current node is a `jsx_element` with a
    parent of `parenthesized_expression`. We could allow checking the parent
    node in the configuration, but that would be a bit tricky and a lot of
    work.
    
    Since this is (hopefully) a 1-time exception, then it seems okay to add
    an explicit check for this. If we have similar cases in the future
    though, then we should think of making this configurable somehow.
    
    Fixes #29
    JoosepAlviste committed Dec 31, 2022
    Configuration menu
    Copy the full SHA
    3d1f244 View commit details
    Browse the repository at this point in the history