Skip to content

Commit 5952764

Browse files
committed
chore: lint
1 parent 5a8e92d commit 5952764

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

packages/react-icons/scripts/parseRHIcons.mjs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -84,9 +84,7 @@ async function processSvgFile(iconName, iconType) {
8484
// If there's only one path, store as string; if multiple, store as array of objects with 'path' property
8585
// (createIcon expects arrays to be SVGPathObject[] with { path: string, className?: string } structure)
8686
const svgPathData =
87-
pathDataValues.length === 1
88-
? pathDataValues[0]
89-
: pathDataValues.map((pathData) => ({ path: pathData }));
87+
pathDataValues.length === 1 ? pathDataValues[0] : pathDataValues.map((pathData) => ({ path: pathData }));
9088

9189
// 4. Construct the final object
9290
return {
@@ -131,7 +129,7 @@ function formatModule(obj, indent = 0) {
131129
lines.push(`${spaces} yOffset: ${value.yOffset},`);
132130
lines.push(`${spaces} width: ${value.width},`);
133131
lines.push(`${spaces} height: ${value.height},`);
134-
132+
135133
// Handle svgPathData: string or array of objects
136134
if (Array.isArray(value.svgPathData)) {
137135
// Array of path objects with { path: string } structure
@@ -141,7 +139,9 @@ function formatModule(obj, indent = 0) {
141139
const escapedPath = pathObject.path.replace(/'/g, "\\'");
142140
if (pathObject.className) {
143141
const escapedClassName = pathObject.className.replace(/'/g, "\\'");
144-
lines.push(`${spaces} { path: '${escapedPath}', className: '${escapedClassName}' }${isLast ? '' : ','}`);
142+
lines.push(
143+
`${spaces} { path: '${escapedPath}', className: '${escapedClassName}' }${isLast ? '' : ','}`
144+
);
145145
} else {
146146
lines.push(`${spaces} { path: '${escapedPath}' }${isLast ? '' : ','}`);
147147
}

0 commit comments

Comments
 (0)