Skip to content

Commit

Permalink
Enable recomended rule performance/noAccumulatingSpread
Browse files Browse the repository at this point in the history
  • Loading branch information
nazarhussain committed Oct 11, 2024
1 parent ab71719 commit 91f6054
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 8 deletions.
2 changes: 0 additions & 2 deletions biome.jsonc
Original file line number Diff line number Diff line change
Expand Up @@ -52,11 +52,9 @@
}
},
"useArrayLiterals": "error",
"noUndeclaredDependencies": "off", // TODO: Need to see why this rule is not detecting monorepo packages
"noUndeclaredVariables": "error"
},
"performance": {
"noAccumulatingSpread": "off",
"noDelete": "off"
},
"style": {
Expand Down
10 changes: 5 additions & 5 deletions packages/cli/src/options/paramsOptions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,14 @@ export function parseBeaconParamsArgs(args: Record<string, string | number>): IB
}

const paramsOptionsByName = ObjectKeys(chainConfigTypes).reduce(
(options: Record<string, CliOptionDefinition>, key): Record<string, CliOptionDefinition> => ({
...options,
[getArgKey(key)]: {
(options: Record<string, CliOptionDefinition>, key): Record<string, CliOptionDefinition> => {
options[getArgKey(key)] = {
hidden: true,
type: "string",
group: "params",
},
}),
};
return options;
},
{}
);

Expand Down
8 changes: 7 additions & 1 deletion packages/cli/test/utils/crucible/utils/paths.ts
Original file line number Diff line number Diff line change
Expand Up @@ -84,5 +84,11 @@ export const getNodeMountedPaths = <T extends ExecutionPaths | BeaconPaths | Val
[`${key}Mounted`, mount ? (value as string).replace(paths.rootDir, mountPath) : value],
])
.flat()
.reduce((o, [key, value]) => ({...o, [key]: value as string}), {}) as MountedPaths<T>;
.reduce(
(o, [key, value]) => {
o[key] = value as string;
return o;
},
{} as Record<string, string>
) as MountedPaths<T>;
};

0 comments on commit 91f6054

Please sign in to comment.