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

🐛 useConsistentCurlyBraces breaks react/no-unescaped-entities rule #5391

Open
1 task done
fregante opened this issue Mar 19, 2025 · 2 comments
Open
1 task done
Labels
A-Linter Area: linter good first issue Good for newcomers L-JavaScript Language: JavaScript and super languages S-Bug-confirmed Status: report has been confirmed as a valid bug

Comments

@fregante
Copy link

Environment information

CLI:
  Version:                      1.9.4
  Color support:                true

Platform:
  CPU Architecture:             aarch64
  OS:                           macos

Environment:
  BIOME_LOG_PATH:               unset
  BIOME_LOG_PREFIX_NAME:        unset
  BIOME_CONFIG_PATH:            unset
  NO_COLOR:                     unset
  TERM:                         "xterm-256color"
  JS_RUNTIME_VERSION:           "v22.14.0"
  JS_RUNTIME_NAME:              "node"
  NODE_PACKAGE_MANAGER:         "bun/1.1.32"

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

Workspace:
  Open Documents:               0

What happened?

See https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/no-unescaped-entities.md, also requested in #4491

{
  "$schema": "./node_modules/@biomejs/biome/configuration_schema.json",
  "linter": {
    "rules": {
      "recommended": false,
      "nursery": {
        "useConsistentCurlyBraces": "error"
      }
    }
  }
}

With the input:

function statement() {
  return <strong>Jupiter {">"} Venus</strong>
}
function other() {
  return <strong>{'"Moon\'s orbit is "huuuge"'}</strong>
}

is turned into

function statement() {
  return <strong>Jupiter > Venus</strong>
}

function other() {
  return <strong>Moon's orbit is "huuuge"</strong>
}

which is respectively invalid and breaking no-unescaped-entities

Expected result

See above

Code of Conduct

  • I agree to follow Biome's Code of Conduct
@fregante fregante added the S-Needs triage Status: this issue needs to be triaged label Mar 19, 2025
@fregante
Copy link
Author

fregante commented Mar 19, 2025

@siketyan siketyan added A-Linter Area: linter L-JavaScript Language: JavaScript and super languages S-Bug-confirmed Status: report has been confirmed as a valid bug good first issue Good for newcomers and removed S-Needs triage Status: this issue needs to be triaged labels Mar 19, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Linter Area: linter good first issue Good for newcomers L-JavaScript Language: JavaScript and super languages S-Bug-confirmed Status: report has been confirmed as a valid bug
Projects
None yet
Development

No branches or pull requests

2 participants