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

🐛 JSX inside .vue files can not be formatted #3464

Closed
1 task done
ccforeverd opened this issue Jul 18, 2024 · 8 comments · Fixed by #3468
Closed
1 task done

🐛 JSX inside .vue files can not be formatted #3464

ccforeverd opened this issue Jul 18, 2024 · 8 comments · Fixed by #3468

Comments

@ccforeverd
Copy link

Environment information

CLI:
  Version:                      1.8.3
  Color support:                true

Platform:
  CPU Architecture:             aarch64
  OS:                           linux

Environment:
  BIOME_LOG_DIR:                unset
  NO_COLOR:                     unset
  TERM:                         "xterm-256color"
  JS_RUNTIME_VERSION:           "v16.20.2"
  JS_RUNTIME_NAME:              "node"
  NODE_PACKAGE_MANAGER:         "npm/8.19.4"

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

Workspace:
  Open Documents:               0

What happened?

  1. node16 and Nuxt2 (Vue2) project
  2. There is some jsx code inside .vue files
  3. Vscode biome plugin show error type assertion are a TypeScript only feature. Convert your file to a TypeScript file or remove the syntax.biome(parse)

Expected result

Support vue-jsx format

Code of Conduct

  • I agree to follow Biome's Code of Conduct
@ccforeverd
Copy link
Author

image

@ccforeverd
Copy link
Author

ccforeverd commented Jul 18, 2024

↑ screenshot for a .vue file

@ematipico
Copy link
Member

@ccforeverd could you provide us with an example of source code? We will use that inside our test suite

@ccforeverd
Copy link
Author

@ccforeverd could you provide us with an example of source code? We will use that inside our test suite

https://github.com/ccforeverd/vue2-jsx-biome-example

@ccforeverd
Copy link
Author

  1. pnpm i
  2. pnpm dev

@ccforeverd
Copy link
Author

image

@ccforeverd
Copy link
Author

image

@ccforeverd
Copy link
Author

And another bug for rsbuild :P

web-infra-dev/rsbuild#2964

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants