Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork2.8k
Open
Labels
Description
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