Skip to content

Commit 702e027

Browse files
authored
style(biome): update schema (#3447)
1 parent 5146df5 commit 702e027

File tree

9 files changed

+27
-22
lines changed

9 files changed

+27
-22
lines changed

CustomApps/lyrics-plus/ProviderNetease.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ const ProviderNetease = (() => {
4646
// ["lyrics"]
4747
// ["[03:10]", "[03:10]", "lyrics"]
4848
// ["[1235,300]", "lyrics"]
49-
const matchResult = line.match(/(\[.*?\])|([^\[\]]+)/g);
49+
const matchResult = line.match(/(\[.*?\])|([^[\]]+)/g);
5050
if (!matchResult?.length || matchResult.length === 1) {
5151
return { text: line };
5252
}

CustomApps/lyrics-plus/Utils.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -280,7 +280,7 @@ const Utils = {
280280
.split("\n");
281281

282282
const syncedTimestamp = /\[([0-9:.]+)\]/;
283-
const karaokeTimestamp = /\<([0-9:.]+)\>/;
283+
const karaokeTimestamp = /<([0-9:.]+)>/;
284284

285285
const unsynced = [];
286286

@@ -291,14 +291,14 @@ const Utils = {
291291
const karaoke = isKaraoke ? [] : null;
292292

293293
function timestampToMs(timestamp) {
294-
const [minutes, seconds] = timestamp.replace(/\[\]\<\>/, "").split(":");
294+
const [minutes, seconds] = timestamp.replace(/\[\]<>/, "").split(":");
295295
return Number(minutes) * 60 * 1000 + Number(seconds) * 1000;
296296
}
297297

298298
function parseKaraokeLine(line, startTime) {
299299
let wordTime = timestampToMs(startTime);
300300
const karaokeLine = [];
301-
const karaoke = line.matchAll(/(\S+ ?)\<([0-9:.]+)\>/g);
301+
const karaoke = line.matchAll(/(\S+ ?)<([0-9:.]+)>/g);
302302
for (const match of karaoke) {
303303
const word = match[1];
304304
const time = match[2];
@@ -311,7 +311,7 @@ const Utils = {
311311
for (const [i, line] of lines.entries()) {
312312
const time = line.match(syncedTimestamp)?.[1];
313313
let lyricContent = line.replace(syncedTimestamp, "").trim();
314-
const lyric = lyricContent.replaceAll(/\<([0-9:.]+)\>/g, "").trim();
314+
const lyric = lyricContent.replaceAll(/<([0-9:.]+)>/g, "").trim();
315315

316316
if (line.trim() !== "") {
317317
if (isKaraoke) {

CustomApps/lyrics-plus/style.css

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -431,7 +431,6 @@ div.lyrics-tabBar-headerItemLink {
431431
max-width: 500px;
432432
height: 42px;
433433
padding: 0 30px 0 12px;
434-
background-color: initial;
435434
cursor: pointer;
436435
appearance: none;
437436
font-size: 18px;

CustomApps/new-releases/style.css

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -140,8 +140,6 @@ option {
140140
border: 0;
141141
border-radius: 500px;
142142
color: var(--spice-sidebar);
143-
display: -webkit-box;
144-
display: -ms-flexbox;
145143
display: flex;
146144
height: 28px;
147145
justify-content: center;
@@ -152,7 +150,9 @@ option {
152150
width: 28px;
153151
visibility: hidden;
154152
opacity: 0;
155-
transition: visibility 0s, opacity 0.3s ease;
153+
transition:
154+
visibility 0s,
155+
opacity 0.3s ease;
156156
}
157157

158158
.main-card-closeButton:active {
@@ -165,7 +165,9 @@ option {
165165
.main-card-card:hover .main-card-closeButton {
166166
visibility: visible;
167167
opacity: 1;
168-
transition: visibility 0s, opacity 0.3s ease;
168+
transition:
169+
visibility 0s,
170+
opacity 0.3s ease;
169171
}
170172

171173
.new-releases-header + .main-gridContainer-gridContainer {

Extensions/bookmark.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -261,7 +261,7 @@
261261
title = idToProperName(contextUri.id);
262262
description = "Application";
263263
} else {
264-
description = contextUri.type.replace(/\-.+$/, "");
264+
description = contextUri.type.replace(/-.+$/, "");
265265
const tail = context.split("/");
266266
if (tail.length > 3) {
267267
description += ` ${tail[3]}`;
@@ -319,7 +319,7 @@
319319

320320
// Utilities
321321
function idToProperName(id) {
322-
const newId = id.replace(/\-/g, " ").replace(/^.|\s./g, (char) => char.toUpperCase());
322+
const newId = id.replace(/-/g, " ").replace(/^.|\s./g, (char) => char.toUpperCase());
323323

324324
return newId;
325325
}

Extensions/fullAppDisplay.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -480,7 +480,7 @@ body.video-full-screen.video-full-screen--hide-ui {
480480
rawTitle = rawTitle
481481
.replace(/\(.+?\)/g, "")
482482
.replace(/\[.+?\]/g, "")
483-
.replace(/\s\-\s.+?$/, "")
483+
.replace(/\s-\s.+?$/, "")
484484
.replace(/,.+?$/, "")
485485
.trim();
486486
}

Extensions/popupLyrics.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -222,7 +222,7 @@ function PopupLyrics() {
222222
// ["[03:10]", "永远高唱我歌"]
223223
// ["永远高唱我歌"]
224224
// ["[03:10]", "[03:10]", "永远高唱我歌"]
225-
const matchResult = line.match(/(\[.*?\])|([^\[\]]+)/g) || [line];
225+
const matchResult = line.match(/(\[.*?\])|([^[\]]+)/g) || [line];
226226
if (!matchResult.length || matchResult.length === 1) {
227227
return;
228228
}
@@ -235,7 +235,7 @@ function PopupLyrics() {
235235
if (text === "纯音乐, 请欣赏") noLyrics = true;
236236
return matchResult.map((slice) => {
237237
const result = {};
238-
const matchResult = slice.match(/[^\[\]]+/g);
238+
const matchResult = slice.match(/[^[\]]+/g);
239239
const [key, value] = matchResult[0].split(":") || [];
240240
const [min, sec] = [Number.parseFloat(key), Number.parseFloat(value)];
241241
if (!Number.isNaN(min) && !Number.isNaN(sec) && !otherInfoRegexp.test(text)) {
@@ -311,8 +311,8 @@ function PopupLyrics() {
311311
const lyrics = lines.map((line) => {
312312
const time = line.match(syncedTimestamp)?.[1];
313313
const lyricContent = line.replace(syncedTimestamp, "").trim();
314-
const lyric = lyricContent.replaceAll(/\<([0-9:.]+)\>/g, "").trim();
315-
const [min, sec] = time.replace(/\[\]\<\>/, "").split(":");
314+
const lyric = lyricContent.replaceAll(/<([0-9:.]+)>/g, "").trim();
315+
const [min, sec] = time.replace(/\[\]<>/, "").split(":");
316316

317317
if (line.trim() !== "" && isSynced && time) {
318318
return { text: lyric || "♪", startTime: Number(min) * 60 + Number(sec) };

biome.json

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,11 @@
11
{
2-
"$schema": "https://biomejs.dev/schemas/1.8.3/schema.json",
3-
"organizeImports": {
4-
"enabled": true
2+
"$schema": "https://biomejs.dev/schemas/2.0.0/schema.json",
3+
"assist": {
4+
"actions": {
5+
"source": {
6+
"organizeImports": "on"
7+
}
8+
}
59
},
610
"linter": {
711
"enabled": true,

jsHelper/spicetifyWrapper.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -688,7 +688,7 @@ applyScrollingFix();
688688
},
689689
Router: functionModules.find((m) => m.toString().includes("navigationType") && m.toString().includes("static")),
690690
Routes: functionModules.find((m) => m.toString().match(/\([\w$]+\)\{let\{children:[\w$]+,location:[\w$]+\}=[\w$]+/)),
691-
Route: functionModules.find((m) => m.toString().match(/^function [\w$]+\([\w$]+\)\{\(0,[\w$]+\.[\w$]+\)\(\!1\)\}$/)),
691+
Route: functionModules.find((m) => m.toString().match(/^function [\w$]+\([\w$]+\)\{\(0,[\w$]+\.[\w$]+\)\(!1\)\}$/)),
692692
StoreProvider: functionModules.find((m) => m.toString().includes("notifyNestedSubs") && m.toString().includes("serverState")),
693693
ScrollableContainer: functionModules.find((m) => m.toString().includes("scrollLeft") && m.toString().includes("showButtons")),
694694
IconComponent: reactComponentsUI.Icon,
@@ -946,7 +946,7 @@ applyScrollingFix();
946946
setTimeout(bindColorExtractor, 10);
947947
return;
948948
}
949-
let imageAnalysis = functionModules.find((m) => m.toString().match(/\![\w$]+\.isFallback|\{extractColor/g));
949+
let imageAnalysis = functionModules.find((m) => m.toString().match(/![\w$]+\.isFallback|\{extractColor/g));
950950
const fallbackPreset = modules.find((m) => m?.colorDark);
951951

952952
// Search chunk in Spotify 1.2.13 or much older because it is impossible to find any distinguishing features

0 commit comments

Comments
 (0)