Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

[Bug]: jsx-no-useless-fragment does not auto-fix in ESLInt 9 #3933

Open
Labels
@stevensacks

Description

@stevensacks

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

In ESLint v8, it removes the useless fragment with --fix, as expected.

In ESLint v9, it doesn't remove it, it just tells you it's in violation.

This happens in both the CLI and the IDE (WebStorm/VSCode)

constExample=()=>(<div><>Hello</></div>);errorFragmentsshouldcontainmorethanonechild-otherwise,there’snoneedforaFragmentatallreact/jsx-no-useless-fragment

It is only saying the error is there, it is not auto-fixing

npx eslint

Expected Behavior

It should auto-fix by removing the useless fragment

eslint-plugin-react version

7.37.5

eslint version

9.28.0

node version

22.15.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2025 Movatter.jp