-
-
Notifications
You must be signed in to change notification settings - Fork 513
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
🐛 suspicious/noRedundantUseStrict
is reported for .cjs
files
#4665
Comments
might be related to biomejs/biome-vscode#338 |
This is likely not an issue with the extension. Diagnostics are created by the LSP server in the main repository. |
That's expected @risu729 . Your package.json files have a type module, so Biome assumes that files are ESM. Is there a reason to have a cjs file inside a ESM project? |
Thank you for your response! Also, I think this is a bug because the LSP server and the CLI behaviour are inconsistent. |
This bug should be easy to fix. If a file is a |
Yes, it seems it is implemented so, which should be why CLI doesn't report an error. biome/crates/biome_js_analyze/src/lint/suspicious/no_redundant_use_strict.rs Lines 132 to 138 in 799cf2e
|
VS Code version
1.94.0-insider
Extension version
2.3.0
Biome version
1.9.2
Operating system
Description
The extension reports an error for
use strict
directive in.cjs
files withsuspicious/noRedundantUseStrict
.Steps to reproduce
.cjs
exntension.use strict
directive.Expected behavior
No errors are shown as documents says.
Does this issue occur when using the CLI directly?
No
Link to a minimal reproduction
https://github.com/risu729/biome-repro-1727086476220
Logs
The text was updated successfully, but these errors were encountered: