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

🐛 NestJS: decorator are not valid here (biome/parse) #2261

Closed
1 task done
thaiducdung255 opened this issue Apr 1, 2024 · 7 comments
Closed
1 task done

🐛 NestJS: decorator are not valid here (biome/parse) #2261

thaiducdung255 opened this issue Apr 1, 2024 · 7 comments

Comments

@thaiducdung255
Copy link

Environment information

CLI:
  Version:                      1.6.3
  Color support:                true

Platform:
  CPU Architecture:             x86_64
  OS:                           linux

Environment:
  BIOME_LOG_DIR:                unset
  NO_COLOR:                     unset
  TERM:                         "xterm-256color"
  JS_RUNTIME_VERSION:           "v20.8.0"
  JS_RUNTIME_NAME:              "node"
  NODE_PACKAGE_MANAGER:         unset

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

Workspace:
  Open Documents:               0

What happened?

1.Open a file that contain decorators in NestJS project
2.Biome show error as bellow:
image

Expected result

It should not shown error like that

Code of Conduct

  • I agree to follow Biome's Code of Conduct
@nhedger
Copy link
Member

nhedger commented Apr 1, 2024

You should set javascript.parser.unsafeParameterDecoratorsEnabled to true.

https://biomejs.dev/reference/configuration/#javascriptparserunsafeparameterdecoratorsenabled

@nhedger nhedger closed this as completed Apr 1, 2024
@thaiducdung255
Copy link
Author

lgtm, thank you

@Conaclos
Copy link
Member

Conaclos commented Apr 1, 2024

I wonder: could we improve the diagnostic and point to the config javascript.parser.unsafeParameterDecoratorsEnabled when relevant?

@ematipico
Copy link
Member

PR welcome :)

@MateusJSouza
Copy link

I tried passing these rules to my biome.json, restarted the biome, but nothing worked. Could it be a conflict with the settings I have in biome.json?

I'm using version 1.9.4 and these are my settings:

Image

@thaiducdung255
Copy link
Author

@MateusJSouza I think something wrong with your biome.js config, try to comment suspicious sections, then restart the biome.
BTW, I also use biome 1.9.4, which work perfectly

@ematipico
Copy link
Member

@MateusJSouza open a new issue with a reproduction. Please don't comment on closed, solved issues.

@biomejs biomejs locked and limited conversation to collaborators Feb 26, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants