suspicious/noJsxLeakedDollar
suspicious · since 2.4.13
Unsafe autofix
biome.json
{
"linter": {
"rules": {
"suspicious": {
"noJsxLeakedDollar": "error"
}
}
}
}function MyComponent({ user }) {
return <div>Hello ${user.name}</div>;
}function MyComponent({ user }) {
return <div>${user.name} is your name</div>;
}function MyComponent({ user }) {
return <div>Hello {user.name}</div>;
}// A lone `$` before a single expression is treated as intentional (e.g. a price).
function MyComponent({ price }) {
return <div>${price}</div>;
}Examples from the Biome documentation.
No tracked preset enables this rule, so it has no reach yet.
None of the tracked presets enable this rule. Turn it on with the config below.
ESLint does not have this rule.
Oxlint does not have this rule.
suspicious/noJsxLeakedDollar
suspicious · since 2.4.13
{
"linter": {
"rules": {
"suspicious": {
"noJsxLeakedDollar": "error"
}
}
}
}Detect return type annotations that are misleadingly wider than what the implementation actually returns.
Disallow Sass variables and function calls in custom property values without #{} interpolation.
Limit how complex selectors can be, and disallow chosen parts of selectors.