Skip to content

Commit b765ba2

Browse files
committed
refactor: fix new Biome lint errors/warnings
1 parent c011688 commit b765ba2

20 files changed

Lines changed: 105 additions & 85 deletions

File tree

biome.json

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -3,16 +3,16 @@
33
"files": {
44
"includes": [
55
"**",
6-
"!**/node_modules/**",
7-
"!**/public/**",
8-
"!**/resources/**",
9-
"!**/_gen/**",
10-
"!**/assets/dist/**",
6+
"!**/node_modules",
7+
"!**/public",
8+
"!**/resources",
9+
"!**/_gen",
10+
"!**/assets/dist",
1111
"!**/*.min.js",
1212
"!**/*.min.css",
13-
"!**/pagefind/**",
14-
"!**/_vendor/**",
15-
"!**/vendor/**",
13+
"!**/pagefind",
14+
"!**/_vendor",
15+
"!**/vendor",
1616
"!**/*.html",
1717
"!**/layouts/**/*.html",
1818
"!**/layouts/**/*.htm",
@@ -21,12 +21,13 @@
2121
"!**/hugo_stats.json",
2222
"!**/*.code-workspace",
2323
"!**/modules/blox-tailwind/data/icons/devicon.json",
24-
"!**/templates/**",
25-
"!**/test/**",
24+
"!**/templates",
25+
"!**/test",
2626
"!**/modules/**/package.json",
2727
"!**/assets/jsconfig.json",
2828
"!**/docs-local",
29-
"!**/backups/**"
29+
"!**/backups",
30+
"!**/modules/blox-tailwind/assets/css/config/safelist.css"
3031
]
3132
},
3233
"formatter": {

modules/blox-plugin-reveal/assets/js/hugoblox-slides.js

Lines changed: 15 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -14,33 +14,23 @@ import * as params from "@params";
1414
// Enable core slide features.
1515
var enabledPlugins = [RevealMarkdown, RevealSearch, RevealNotes, RevealMath.KaTeX, RevealZoom];
1616

17-
const isObject = function (o) {
18-
return o === Object(o) && !isArray(o) && typeof o !== "function";
19-
};
17+
const isObject = (o) => o === Object(o) && !isArray(o) && typeof o !== "function";
2018

21-
const isArray = function (a) {
22-
return Array.isArray(a);
23-
};
19+
const isArray = (a) => Array.isArray(a);
2420

25-
const toCamelCase = function (s) {
26-
return s.replace(/([-_][a-z])/gi, function (term) {
27-
return term.toUpperCase().replace("-", "").replace("_", "");
28-
});
29-
};
21+
const toCamelCase = (s) => s.replace(/([-_][a-z])/gi, (term) => term.toUpperCase().replace("-", "").replace("_", ""));
3022

31-
const keysToCamelCase = function (o) {
23+
const keysToCamelCase = (o) => {
3224
if (isObject(o)) {
3325
const n = {};
3426

35-
Object.keys(o).forEach(function (k) {
27+
Object.keys(o).forEach((k) => {
3628
n[toCamelCase(k)] = keysToCamelCase(o[k]);
3729
});
3830

3931
return n;
4032
} else if (isArray(o)) {
41-
return o.map(function (i) {
42-
return keysToCamelCase(i);
43-
});
33+
return o.map((i) => keysToCamelCase(i));
4434
}
4535

4636
return o;
@@ -64,7 +54,7 @@ if (pluginOptions.menu_enabled) {
6454
enabledPlugins.push(RevealMenu);
6555
}
6656

67-
pluginOptions["plugins"] = enabledPlugins;
57+
pluginOptions.plugins = enabledPlugins;
6858

6959
Reveal.initialize(pluginOptions);
7060

@@ -84,23 +74,23 @@ if (params.slides.diagram) {
8474
}
8575

8676
// `startOnLoad` must be false since diagrams are lazily rendered.
87-
mermaidOptions["startOnLoad"] = false;
77+
mermaidOptions.startOnLoad = false;
8878

8979
mermaid.initialize(mermaidOptions);
9080

9181
// Lazily render Mermaid diagrams within Reveal.JS slides
9282
// See: https://github.com/hakimel/reveal.js/issues/2863#issuecomment-1107444425
93-
let renderMermaidDiagrams = function renderMermaidDiagrams(event) {
94-
let mermaidDivs = event.currentSlide.querySelectorAll(".mermaid:not(.done)");
95-
let indices = Reveal.getIndices();
96-
let pageno = `${indices.h}-${indices.v}`;
83+
const renderMermaidDiagrams = function renderMermaidDiagrams(event) {
84+
const mermaidDivs = event.currentSlide.querySelectorAll(".mermaid:not(.done)");
85+
const indices = Reveal.getIndices();
86+
const pageno = `${indices.h}-${indices.v}`;
9787

98-
mermaidDivs.forEach(function (mermaidDiv, i) {
99-
let insertSvg = function (svgCode) {
88+
mermaidDivs.forEach((mermaidDiv, i) => {
89+
const insertSvg = (svgCode) => {
10090
mermaidDiv.innerHTML = svgCode;
10191
mermaidDiv.classList.add("done");
10292
};
103-
let graphDefinition = mermaidDiv.textContent;
93+
const graphDefinition = mermaidDiv.textContent;
10494
mermaid.mermaidAPI.render(`mermaid${pageno}-${i}`, graphDefinition, insertSvg);
10595
});
10696
Reveal.layout();

modules/blox-tailwind/assets/css/blox/biography.css

Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -152,12 +152,18 @@
152152
font-size: 20px;
153153
background-color: #fff;
154154
color: #000; /* override parent alpha */
155-
box-shadow: 0 10px 20px rgb(0 0 0 / 4%), 0 2px 6px rgb(0 0 0 / 4%), 0 0 1px rgb(0 0 0 / 4%);
155+
box-shadow:
156+
0 10px 20px rgb(0 0 0 / 4%),
157+
0 2px 6px rgb(0 0 0 / 4%),
158+
0 0 1px rgb(0 0 0 / 4%);
156159
}
157160

158161
.dark .avatar-emoji {
159162
background-color: #000;
160-
box-shadow: 0 10px 20px rgb(0 0 0 / 4%), 0 2px 6px rgb(0 0 0 / 4%), 0 0 1px rgb(255 255 255 / 96%);
163+
box-shadow:
164+
0 10px 20px rgb(0 0 0 / 4%),
165+
0 2px 6px rgb(0 0 0 / 4%),
166+
0 0 1px rgb(255 255 255 / 96%);
161167
}
162168

163169
/* Biography Block */
@@ -182,14 +188,14 @@
182188

183189
/* Light Mode Gradient */
184190
.hbx-bg-gradient::before {
185-
background-image: radial-gradient(at 20% 25%, hsla(212, 80%, 95%, 1) 0px, transparent 50%),
186-
radial-gradient(at 75% 30%, hsla(160, 80%, 95%, 1) 0px, transparent 50%), radial-gradient(at 25% 80%, hsla(280, 80%, 95%, 1) 0px, transparent 50%),
187-
radial-gradient(at 75% 85%, hsla(30, 80%, 95%, 1) 0px, transparent 50%);
191+
background-image:
192+
radial-gradient(at 20% 25%, hsla(212, 80%, 95%, 1) 0px, transparent 50%), radial-gradient(at 75% 30%, hsla(160, 80%, 95%, 1) 0px, transparent 50%),
193+
radial-gradient(at 25% 80%, hsla(280, 80%, 95%, 1) 0px, transparent 50%), radial-gradient(at 75% 85%, hsla(30, 80%, 95%, 1) 0px, transparent 50%);
188194
}
189195

190196
/* Dark Mode Gradient */
191197
.dark .hbx-bg-gradient::before {
192-
background-image: radial-gradient(at 20% 25%, hsla(212, 35%, 15%, 1) 0px, transparent 50%),
193-
radial-gradient(at 75% 30%, hsla(160, 35%, 15%, 1) 0px, transparent 50%), radial-gradient(at 25% 80%, hsla(280, 35%, 15%, 1) 0px, transparent 50%),
194-
radial-gradient(at 75% 85%, hsla(30, 35%, 15%, 1) 0px, transparent 50%);
198+
background-image:
199+
radial-gradient(at 20% 25%, hsla(212, 35%, 15%, 1) 0px, transparent 50%), radial-gradient(at 75% 30%, hsla(160, 35%, 15%, 1) 0px, transparent 50%),
200+
radial-gradient(at 25% 80%, hsla(280, 35%, 15%, 1) 0px, transparent 50%), radial-gradient(at 75% 85%, hsla(30, 35%, 15%, 1) 0px, transparent 50%);
195201
}

modules/blox-tailwind/assets/css/blox/navbar.css

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -69,17 +69,17 @@ input#nav-toggle:checked ~ #nav-menu {
6969
@apply pointer-events-none;
7070
}
7171

72-
.nav-dropdown.active .nav-dropdown-list {
73-
@apply block lg:visible lg:opacity-100;
74-
}
75-
7672
.nav-dropdown-list {
7773
@apply bg-white dark:bg-slate-900 z-10 min-w-[180px] rounded py-4 shadow hidden lg:invisible lg:absolute lg:block lg:opacity-0;
7874
/* Ensure dropdown appears above content and under header */
7975
top: 100%;
8076
left: 0;
8177
}
8278

79+
.nav-dropdown.active .nav-dropdown-list {
80+
@apply block lg:visible lg:opacity-100;
81+
}
82+
8383
/* Ensure hover opens dropdown in desktop (CSS-driven) */
8484
@media (min-width: 1024px) {
8585
.nav-dropdown:hover > .nav-dropdown-list {
@@ -88,15 +88,15 @@ input#nav-toggle:checked ~ #nav-menu {
8888
}
8989

9090
.nav-dropdown-item {
91-
@apply px-4 [&:not(:last-child)]:mb-2;
91+
@apply px-4 [&:not(:last-child)]:mb-2;
9292
}
9393

9494
.dark .nav-dropdown-item:hover {
9595
background-color: var(--color-primary-500);
9696
}
9797

9898
.nav-dropdown-link {
99-
@apply dark:text-white dark:hover:text-white block py-1 font-semibold transition;
99+
@apply dark:text-white dark:hover:text-white block py-1 font-semibold transition;
100100
}
101101

102102
.nav-dropdown-link:hover {

modules/blox-tailwind/assets/css/chroma.css

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,5 +22,6 @@
2222
.chroma .language-latex *,
2323
.chroma .language-tex,
2424
.chroma .language-tex * {
25+
/* biome-ignore lint/complexity/noImportantStyles: Required to override Chroma's default italic for LaTeX/TeX */
2526
font-style: normal !important;
2627
}

modules/blox-tailwind/assets/css/components/author-notes.css

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
/* Hide elements with x-cloak until Alpine.js initializes */
44
[x-cloak] {
5+
/* biome-ignore lint/complexity/noImportantStyles: Required to reliably hide until Alpine initializes */
56
display: none !important;
67
}
78

modules/blox-tailwind/assets/css/components/cards.css

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -44,16 +44,16 @@
4444
@apply line-clamp-3 text-sm font-normal text-gray-500 dark:text-gray-400 px-4 mb-4 mt-2;
4545
}
4646

47-
.hb-card:hover svg {
48-
color: currentcolor;
49-
}
50-
5147
.hb-card svg {
5248
color: var(--color-neutral-700);
5349
width: 1.5rem;
5450
transition: color 0.3s ease;
5551
}
5652

53+
.hb-card:hover svg {
54+
color: currentcolor;
55+
}
56+
5757
.hb-card p {
5858
margin-top: 0.5rem;
5959
}

modules/blox-tailwind/assets/css/components/copy.css

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,18 +6,14 @@
66
@apply relative z-0;
77
}
88

9-
.highlight:hover > .copy-button {
10-
@apply visible;
9+
.copy-button {
10+
@apply invisible absolute right-0 top-0 z-10 w-20 py-1 cursor-pointer font-mono text-sm whitespace-nowrap rounded-bl-md rounded-tr-md bg-neutral-200 text-neutral-700 opacity-90 dark:bg-neutral-600 dark:text-neutral-200;
1111
}
1212

1313
/* Copy Button */
1414

15-
.copy-button {
16-
@apply invisible absolute right-0 top-0 z-10 w-20 py-1
17-
cursor-pointer font-mono text-sm whitespace-nowrap
18-
rounded-bl-md rounded-tr-md
19-
bg-neutral-200 text-neutral-700 opacity-90
20-
dark:bg-neutral-600 dark:text-neutral-200;
15+
.highlight:hover > .copy-button {
16+
@apply visible;
2117
}
2218

2319
.copy-button:hover,

modules/blox-tailwind/assets/css/components/glassmorphism.css

Lines changed: 29 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -106,11 +106,17 @@
106106
}
107107

108108
.glass-shadow {
109-
box-shadow: 0 25px 50px -12px rgb(0 0 0 / 0.25), 0 0 0 1px rgb(255 255 255 / 0.1), inset 0 1px 0 rgb(255 255 255 / 0.1);
109+
box-shadow:
110+
0 25px 50px -12px rgb(0 0 0 / 0.25),
111+
0 0 0 1px rgb(255 255 255 / 0.1),
112+
inset 0 1px 0 rgb(255 255 255 / 0.1);
110113
}
111114

112115
.dark .glass-shadow {
113-
box-shadow: 0 25px 50px -12px rgb(0 0 0 / 0.5), 0 0 0 1px rgb(255 255 255 / 0.05), inset 0 1px 0 rgb(255 255 255 / 0.05);
116+
box-shadow:
117+
0 25px 50px -12px rgb(0 0 0 / 0.5),
118+
0 0 0 1px rgb(255 255 255 / 0.05),
119+
inset 0 1px 0 rgb(255 255 255 / 0.05);
114120
}
115121

116122
/* ==========================================================================
@@ -137,7 +143,9 @@
137143

138144
/* Modern border and shadow for light mode */
139145
border: 1px solid rgb(255 255 255 / calc(var(--glassmorphism-opacity) + 0.1));
140-
box-shadow: 0 32px 64px -12px rgb(0 0 0 / 0.25), inset 0 1px 0 rgb(255 255 255 / calc(var(--glassmorphism-opacity) + 0.05));
146+
box-shadow:
147+
0 32px 64px -12px rgb(0 0 0 / 0.25),
148+
inset 0 1px 0 rgb(255 255 255 / calc(var(--glassmorphism-opacity) + 0.05));
141149
}
142150

143151
.cta-glassmorphism:hover {
@@ -150,7 +158,9 @@
150158
);
151159

152160
border: 1px solid rgb(255 255 255 / calc(var(--glassmorphism-opacity) + 0.2));
153-
box-shadow: 0 40px 80px -16px rgb(0 0 0 / 0.3), inset 0 1px 0 rgb(255 255 255 / calc(var(--glassmorphism-opacity) + 0.1));
161+
box-shadow:
162+
0 40px 80px -16px rgb(0 0 0 / 0.3),
163+
inset 0 1px 0 rgb(255 255 255 / calc(var(--glassmorphism-opacity) + 0.1));
154164
}
155165

156166
/* Dark mode adjustments for CTA glassmorphism */
@@ -163,7 +173,9 @@
163173
);
164174

165175
border: 1px solid rgb(255 255 255 / var(--glassmorphism-opacity));
166-
box-shadow: 0 32px 64px -12px rgb(0 0 0 / 0.4), inset 0 1px 0 rgb(255 255 255 / calc(var(--glassmorphism-opacity) * 0.5));
176+
box-shadow:
177+
0 32px 64px -12px rgb(0 0 0 / 0.4),
178+
inset 0 1px 0 rgb(255 255 255 / calc(var(--glassmorphism-opacity) * 0.5));
167179
}
168180

169181
.dark .cta-glassmorphism:hover {
@@ -196,20 +208,29 @@
196208
/* Light mode button background */
197209
background: rgb(255 255 255 / 0.9);
198210
border: 1px solid rgb(0 0 0 / 0.1);
199-
box-shadow: 0 10px 25px -5px rgb(0 0 0 / 0.1), 0 4px 6px -2px rgb(0 0 0 / 0.1), inset 0 1px 0 rgb(255 255 255 / 0.3);
211+
box-shadow:
212+
0 10px 25px -5px rgb(0 0 0 / 0.1),
213+
0 4px 6px -2px rgb(0 0 0 / 0.1),
214+
inset 0 1px 0 rgb(255 255 255 / 0.3);
200215
}
201216

202217
.dark .cta-glassmorphism .group > div:first-child {
203218
/* Dark mode button background */
204219
background: rgb(0 0 0 / 0.4);
205220
border: 1px solid rgb(255 255 255 / 0.2);
206-
box-shadow: 0 10px 25px -5px rgb(0 0 0 / 0.3), 0 4px 6px -2px rgb(0 0 0 / 0.2), inset 0 1px 0 rgb(255 255 255 / 0.1);
221+
box-shadow:
222+
0 10px 25px -5px rgb(0 0 0 / 0.3),
223+
0 4px 6px -2px rgb(0 0 0 / 0.2),
224+
inset 0 1px 0 rgb(255 255 255 / 0.1);
207225
}
208226

209227
.cta-glassmorphism .group:hover > div:first-child {
210228
background: rgb(255 255 255);
211229
border: 1px solid rgb(0 0 0 / 0.15);
212-
box-shadow: 0 20px 40px -8px rgb(0 0 0 / 0.15), 0 8px 12px -4px rgb(0 0 0 / 0.1), inset 0 1px 0 rgb(255 255 255 / 0.4);
230+
box-shadow:
231+
0 20px 40px -8px rgb(0 0 0 / 0.15),
232+
0 8px 12px -4px rgb(0 0 0 / 0.1),
233+
inset 0 1px 0 rgb(255 255 255 / 0.4);
213234
}
214235

215236
.dark .cta-glassmorphism .group:hover > div:first-child {

modules/blox-tailwind/assets/css/framework/components.css

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,11 @@
2929

3030
/* 2025 Glassmorphism texture support - disable conflicting defaults */
3131
.home-section-bg.bg-image[style*="background-size"][style*="background-repeat"] {
32+
/* biome-ignore lint/complexity/noImportantStyles: Required to override inline background-size for glass textures */
3233
background-size: revert !important;
34+
/* biome-ignore lint/complexity/noImportantStyles: Required to override inline background-repeat for glass textures */
3335
background-repeat: revert !important;
36+
/* biome-ignore lint/complexity/noImportantStyles: Required to override inline background-position for glass textures */
3437
background-position: revert !important;
3538
}
3639

0 commit comments

Comments
 (0)