chore: enforce brackets for if clause and for/while loops
This commit is contained in:
@@ -66,7 +66,9 @@ let open = $state(false);
|
||||
// Smart value formatting matching the Figma design
|
||||
const formattedValue = $derived(() => {
|
||||
const v = control.value;
|
||||
if (Number.isInteger(v)) return String(v);
|
||||
if (Number.isInteger(v)) {
|
||||
return String(v);
|
||||
}
|
||||
return control.step < 0.1 ? v.toFixed(2) : v.toFixed(1);
|
||||
});
|
||||
|
||||
|
||||
@@ -61,7 +61,9 @@ const style = $derived.by(() => {
|
||||
|
||||
// Calculate horizontal constraints based on region
|
||||
const regionStyleStr = $derived(() => {
|
||||
if (region === 'full') return '';
|
||||
if (region === 'full') {
|
||||
return '';
|
||||
}
|
||||
const side = region === 'left' ? 'left' : 'right';
|
||||
return `position: absolute; ${side}: 0; width: ${regionWidth}%; top: 0; bottom: 0;`;
|
||||
});
|
||||
|
||||
@@ -136,7 +136,9 @@ const estimatedTotalSize = $derived.by(() => {
|
||||
|
||||
// Add estimated size for unloaded rows
|
||||
const unloadedRows = totalRows - rowCount;
|
||||
if (unloadedRows <= 0) return loadedSize;
|
||||
if (unloadedRows <= 0) {
|
||||
return loadedSize;
|
||||
}
|
||||
|
||||
// Estimate the size of unloaded rows
|
||||
const estimateFn = typeof itemHeight === 'function'
|
||||
|
||||
Reference in New Issue
Block a user