Skip to content

Commit feb0950

Browse files
committed
fix: enable noAccumulatingSpread in biome
1 parent bed9283 commit feb0950

File tree

3 files changed

+8
-12
lines changed

3 files changed

+8
-12
lines changed

biome.jsonc

-3
Original file line numberDiff line numberDiff line change
@@ -76,9 +76,6 @@
7676
"suspicious": {
7777
"noArrayIndexKey": "off",
7878
"noDoubleEquals": "off" // TODO: Enable this rule
79-
},
80-
"performance": {
81-
"noAccumulatingSpread": "off" // TODO: Enable this rule
8279
}
8380
},
8481
"ignore": []

packages/cli/src/tokens/formats/css.ts

+6-8
Original file line numberDiff line numberDiff line change
@@ -148,11 +148,10 @@ export const typography: Format = {
148148
font-weight: ${getValue<string>(token)};
149149
}`;
150150

151-
return {
152-
...acc,
151+
return Object.assign({}, acc, {
153152
variables: [...acc.variables, format(token)],
154153
classes: [...acc.classes, className],
155-
};
154+
});
156155
}
157156

158157
if (typeEquals('lineheight', token)) {
@@ -161,11 +160,10 @@ export const typography: Format = {
161160
line-height: ${getValue<string>(token)};
162161
}`;
163162

164-
return {
165-
...acc,
163+
return Object.assign({}, acc, {
166164
variables: [...acc.variables, format(token)],
167165
classes: [...acc.classes, className],
168-
};
166+
});
169167
}
170168

171169
if (typeEquals('typography', token)) {
@@ -194,10 +192,10 @@ export const typography: Format = {
194192
${letterSpacingVar ? `letter-spacing: ${letterSpacingVar};` : ''}
195193
}`;
196194

197-
return { ...acc, classes: [className, ...acc.classes] };
195+
return Object.assign({}, acc, { classes: [className, ...acc.classes] });
198196
}
199197

200-
return { ...acc, variables: [...acc.variables, format(token)] };
198+
return Object.assign({}, acc, { variables: acc.variables.concat(format(token)) });
201199
},
202200
{ variables: [], classes: [] },
203201
),

packages/react/src/components/Table/Table.stories.tsx

+2-1
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,8 @@ export const WithFormElements: Story = (args) => {
208208
setHeaderChecked(event.target.checked);
209209
setCheckedItems(
210210
rows.reduce(
211-
(acc: CheckedItems, row) => ({ ...acc, [row]: event.target.checked }),
211+
(acc: CheckedItems, row) =>
212+
Object.assign(acc, { [row]: event.target.checked }),
212213
{},
213214
),
214215
);

0 commit comments

Comments
 (0)