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

type assertion are a TypeScript only feature. Convert your file to a TypeScript file or remove the syntax.🐛 #2259

Closed
1 of 3 tasks
kwihpe opened this issue Mar 28, 2024 · 3 comments

Comments

@kwihpe
Copy link

kwihpe commented Mar 28, 2024

VS Code version

1.87.2

Extension version

2.2.2

Biome version

1.6.1

Operating system

  • Windows
  • macOS
  • Linux

Description

I have a react application, biome is stating that the javascript files have the following issue:
"type assertion are a TypeScript only feature. Convert your file to a TypeScript file or remove the syntax."
It is highlighting the returned elements of the function which are normal JSX.

Biome is even highlight this with the error above:
return <div></div>;

The Biome extension in VS code is the issue, we have Biome running with our pre-commit husky hook and everything is normal.

Steps to reproduce

I cannot share the code.

Expected behavior

Biome does not mention typescript errors as this is just a javascript project and file.

Does this issue occur when using the CLI directly?

Not sure / Not applicable

Logs

No response

@nhedger
Copy link
Member

nhedger commented Mar 28, 2024

Please provide a minimal example that reproduces this issue.

Ideally, a repository that contains only the problematic code.

@Sec-ant
Copy link
Member

Sec-ant commented Mar 29, 2024

I think this is a duplicate of #2085

@nhedger nhedger transferred this issue from biomejs/biome-vscode Apr 1, 2024
@nhedger
Copy link
Member

nhedger commented Apr 1, 2024

Closing as duplicate of #2085

@nhedger nhedger closed this as completed Apr 1, 2024
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

No branches or pull requests

3 participants