-
-
Notifications
You must be signed in to change notification settings - Fork 791
Closed
Labels
A-LinterArea: linterArea: linterL-JavaScriptLanguage: JavaScript and super languagesLanguage: JavaScript and super languagesS-Bug-confirmedStatus: report has been confirmed as a valid bugStatus: report has been confirmed as a valid buggood first issueGood for newcomersGood for newcomers
Description
Environment information
CLI:
Version: 2.3.3
Color support: true
Platform:
CPU Architecture: aarch64
OS: macos
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.20.0
JS_RUNTIME_NAME: node
NODE_PACKAGE_MANAGER: unset
Biome Configuration:
Status: Loaded successfully
Path: biome.json
Formatter enabled: true
Linter enabled: true
Assist enabled: true
VCS enabled: false
Linter:
JavaScript enabled: unset
JSON enabled: unset
CSS enabled: unset
GraphQL enabled: unset
Recommended: false
Enabled rules:
style/useConsistentCurlyBraces
Workspace:
Open Documents: 0Rule name
lint/style/useConsistentCurlyBraces
Playground link
Expected result
As a result of biome lint --write --unsafe I get invalid JSX:
I understand that it was "unsafe" but I did not expect to get invalid JSX as a result.
I would expect Biome to keep characters that need escaping as JS expressions (in curly brackets):
export const Comp = () => (
<div>
- {"start {{"}
+ start {"{{"}
<span>TEXT</span>
- {"}} end"}
+ {"}}"} end
</div>
);Or do not highlight such strings as issues at all (to me it is still less destructive than the current behavior).
Code of Conduct
- I agree to follow Biome's Code of Conduct
fregante
Metadata
Metadata
Assignees
Labels
A-LinterArea: linterArea: linterL-JavaScriptLanguage: JavaScript and super languagesLanguage: JavaScript and super languagesS-Bug-confirmedStatus: report has been confirmed as a valid bugStatus: report has been confirmed as a valid buggood first issueGood for newcomersGood for newcomers