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

🐛 React-only lint rule useJsxKeyInIterable in Biome recommended config #5024

Closed
1 task done
Lucianod28 opened this issue Feb 3, 2025 · 3 comments
Closed
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

@Lucianod28
Copy link

Environment information

CLI:
  Version:                      1.9.4
  Color support:                true

Platform:
  CPU Architecture:             aarch64
  OS:                           linux

Environment:
  BIOME_LOG_PATH:               unset
  BIOME_LOG_PREFIX_NAME:        unset
  BIOME_CONFIG_PATH:            unset
  NO_COLOR:                     unset
  TERM:                         "xterm-256color"
  JS_RUNTIME_VERSION:           "v20.18.2"
  JS_RUNTIME_NAME:              "node"
  NODE_PACKAGE_MANAGER:         "npm/10.8.2"

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

Workspace:
  Open Documents:               0

What happened?

We use Biome for linting and formatting in our SolidJS project. Today I noticed the useJsxKeyInIterable rule failing because I didn't include React's "key" attribute in my div. This is a React-only rule and it isn't satisfiable in SolidJS (adding "key" causes a type error since it's a React attribute, not an HTMLDivElement attribute), so I had to disable it to use Biome with SolidJS.

Expected result

Since Biome is not a React-only linter, I would expect the default config not to include rules that only apply for React.

Code of Conduct

  • I agree to follow Biome's Code of Conduct
@Lucianod28 Lucianod28 added the S-Needs triage Status: this issue needs to be triaged label Feb 3, 2025
@ematipico
Copy link
Member

ematipico commented Feb 3, 2025

Thank you for bringing it up, we will fix it for v2.

The rule shouldn't be recommended, and it should belong to the react domain

@ematipico ematipico added good first issue Good for newcomers A-Linter Area: linter L-JavaScript Language: JavaScript and super languages S-Bug-confirmed Status: report has been confirmed as a valid bug and removed S-Needs triage Status: this issue needs to be triaged labels Feb 3, 2025
@arendjr
Copy link
Contributor

arendjr commented Feb 4, 2025

The rule shouldn't be recommended, and it should belong to the react domain

I think it should be recommended within the React domain, no?

@ematipico
Copy link
Member

Yes, sounds about right

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

3 participants