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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

馃拝 noUselessFragments autofix causes syntax error on component props #1335

Closed
1 task done
almeidx opened this issue Dec 24, 2023 · 0 comments 路 Fixed by #1496
Closed
1 task done

馃拝 noUselessFragments autofix causes syntax error on component props #1335

almeidx opened this issue Dec 24, 2023 · 0 comments 路 Fixed by #1496
Labels
A-Linter Area: linter L-JavaScript Language: JavaScript and super languages S-Bug-confirmed Status: report has been confirmed as a valid bug S-Help-wanted Status: you're familiar with the code base and want to help the project

Comments

@almeidx
Copy link

almeidx commented Dec 24, 2023

Environment information

CLI:
  Version:                      1.4.1
  Color support:                true

Platform:
  CPU Architecture:             x86_64
  OS:                           windows

Environment:
  BIOME_LOG_DIR:                unset
  NO_COLOR:                     unset
  TERM:                         unset
  JS_RUNTIME_VERSION:           "v20.10.0"
  JS_RUNTIME_NAME:              "node"
  NODE_PACKAGE_MANAGER:         "pnpm/8.13.0"

Biome Configuration:
  Status:                       Loaded successfully
  Formatter disabled:           false
  Linter disabled:              false
  Organize imports disabled:    false
  VCS disabled:                 true

Workspace:
  Open Documents:               0

Rule name

noUselessFragments

Playground link

https://biomejs.dev/playground/?code=aQBtAHAAbwByAHQAIAB7ACAAUwB1AHMAcABlAG4AcwBlACAAfQAgAGYAcgBvAG0AIAAiAHIAZQBhAGMAdAAiADsACgBpAG0AcABvAHIAdAAgAHsAIABDAG8AbQBwACAAfQAgAGYAcgBvAG0AIAAiAC4ALwBjAG8AbQBwAG8AbgBlAG4AdABzAC8AQwBvAG0AcAAiADsACgAKAGUAeABwAG8AcgB0ACAAZgB1AG4AYwB0AGkAbwBuACAAQwBvAG0AcABvAG4AZQBuAHQAKAApACAAewAKACAAIAByAGUAdAB1AHIAbgAgACgACgAgACAAIAAgADwAZABpAHYAPgAKACAAIAAgACAAIAAgADwAUwB1AHMAcABlAG4AcwBlACAAZgBhAGwAbABiAGEAYwBrAD0AewA8AD4APAAvAD4AfQA%2BAAoAIAAgACAAIAAgACAAIAAgADwAaAAxAD4ASABpADwALwBoADEAPgAKACAAIAAgACAAIAAgADwALwBTAHUAcwBwAGUAbgBzAGUAPgAKAAoAIAAgACAAIAAgACAAPABDAG8AbQBwACAAcAByAG8AcAA9AHsAPAA%2BADwALwA%2BAH0AIAAvAD4ACgAgACAAIAAgADwALwBkAGkAdgA%2BAAoAIAAgACkAOwAKAH0ACgA%3D

Expected result

I do not believe this to be a "useless fragment", so I expected it to not trigger the noUselessFragments rule.

However, even if this is deemed to be a useless fragment, the autofix is not correct, as it causes a syntax error.
e.g. <Suspense fallback={<></>}> -> <Suspense fallback=>

Code of Conduct

  • I agree to follow Biome's Code of Conduct
@ematipico ematipico added S-Help-wanted Status: you're familiar with the code base and want to help the project A-Linter Area: linter S-Bug-confirmed Status: report has been confirmed as a valid bug L-JavaScript Language: JavaScript and super languages labels Dec 31, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Linter Area: linter L-JavaScript Language: JavaScript and super languages S-Bug-confirmed Status: report has been confirmed as a valid bug S-Help-wanted Status: you're familiar with the code base and want to help the project
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants