Skip to content

File variant not set to JSX even with jsxEverywhere enabled #7286

@ThiefMaster

Description

@ThiefMaster

Environment information

CLI:
  Version:                      2.2.0
  Color support:                true

Platform:
  CPU Architecture:             x86_64
  OS:                           linux

Environment:
  BIOME_LOG_PATH:               unset
  BIOME_LOG_PREFIX_NAME:        unset
  BIOME_CONFIG_PATH:            unset
  BIOME_THREADS:                unset
  NO_COLOR:                     unset
  TERM:                         screen-256color
  JS_RUNTIME_VERSION:           v22.13.1
  JS_RUNTIME_NAME:              node
  NODE_PACKAGE_MANAGER:         npm/10.9.2

Biome Configuration:
  Status:                       Loaded successfully
  Path:                         biome.jsonc
  Formatter enabled:            true
  Linter enabled:               false
  Assist enabled:               false
  VCS enabled:                  false

Workspace:
  Open Documents:               0

What happened?

Playground (JS)

Playground (JSX)

As you can see, the code is formatted differently. On the CLI it also does not make a difference whether jsxEverywhere is set. The ONLY way to get the correct behavior is to use a .jsx file extension which is of course quite annoying in a codebase that uses JSX syntax in .js files...

Expected result

Consider all files as JSX when jsxEverywhere is enabled.

Code of Conduct

  • I agree to follow Biome's Code of Conduct

Metadata

Metadata

Assignees

Labels

A-CoreArea: coreS-Bug-confirmedStatus: report has been confirmed as a valid bug

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions