Skip to content

Commit e9b8bce

Browse files
committed
fix: Lint and prettify Phase 1 & 2 Grid3 utilities
1 parent f24be21 commit e9b8bce

6 files changed

Lines changed: 13 additions & 965 deletions

File tree

src/processors/gridset/colorUtils.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,8 @@ const CSS_COLORS: Record<string, [number, number, number]> = {
169169
* @returns RGB tuple [r, g, b] or undefined if not found
170170
*/
171171
export function getNamedColor(name: string): [number, number, number] | undefined {
172-
return CSS_COLORS[name.toLowerCase()];
172+
const color = CSS_COLORS[name.toLowerCase()];
173+
return color;
173174
}
174175

175176
/**
@@ -281,7 +282,7 @@ export function darkenColor(hex: string, amount: number): string {
281282
const r = parseInt(rgb.substring(0, 2), 16);
282283
const g = parseInt(rgb.substring(2, 4), 16);
283284
const b = parseInt(rgb.substring(4, 6), 16);
284-
const clamp = (val: number) => Math.max(0, Math.min(255, val));
285+
const clamp = (val: number): number => Math.max(0, Math.min(255, val));
285286
const newR = clamp(r - amount);
286287
const newG = clamp(g - amount);
287288
const newB = clamp(b - amount);
@@ -329,4 +330,3 @@ export function ensureAlphaChannel(color: string | undefined): string {
329330
// Invalid or unknown format, return white
330331
return '#FFFFFFFF';
331332
}
332-

src/processors/gridset/styleHelpers.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -195,5 +195,3 @@ export function createCategoryStyle(
195195
FontSize: '16',
196196
};
197197
}
198-
199-

0 commit comments

Comments
 (0)