Skip to content

[Bug]: jsx-curly-newline and comments #3584

Open
@josemigallas

Description

@josemigallas

Is there an existing issue for this?

  • I have searched the existing issues and my issue is unique
  • My issue appears in the command-line and not only in the text editor

Description Overview

jsx-curly-newline reports an error when using multiline comments in JSX.

      {/* <FormGroup
        helperTextInvalid={helperText}
        inputProps={inputProps}
        type="password"
      /> */}
  134:7   error  Unexpected newline after '{'                             react/jsx-curly-newline
  138:12  error  Unexpected newline before '}'                            react/jsx-curly-newline

$ eslint --ext .js,.jsx,.ts,.tsx .

Expected Behavior

I would expect no error.

Rule options

"react/jsx-curly-newline": ["error", { "multiline": "forbid", "singleline": "forbid" }],

eslint-plugin-react version

7.32.2

eslint version

7.32.0

node version

14.21.3

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions