Skip to content

Commit d8d4930

Browse files
committed
misc: format all files with biome
1 parent 4d3f911 commit d8d4930

File tree

173 files changed

+918
-975
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

173 files changed

+918
-975
lines changed

docs/style/fonts.css

Lines changed: 27 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,53 +1,64 @@
11
/* hebrew */
22
@font-face {
3-
font-family: 'Heebo';
3+
font-family: "Heebo";
44
font-style: normal;
55
font-weight: 400;
6-
src: url(https://fonts.gstatic.com/s/heebo/v9/NGS6v5_NC0k9P9H0TbFhsqMA6aw.woff2) format('woff2');
6+
src: url(https://fonts.gstatic.com/s/heebo/v9/NGS6v5_NC0k9P9H0TbFhsqMA6aw.woff2)
7+
format("woff2");
78
unicode-range: U+0590-05FF, U+20AA, U+25CC, U+FB1D-FB4F;
89
}
910

1011
/* latin */
1112
@font-face {
12-
font-family: 'Heebo';
13+
font-family: "Heebo";
1314
font-style: normal;
1415
font-weight: 400;
15-
src: url(https://fonts.gstatic.com/s/heebo/v9/NGS6v5_NC0k9P9H2TbFhsqMA.woff2) format('woff2');
16-
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
16+
src: url(https://fonts.gstatic.com/s/heebo/v9/NGS6v5_NC0k9P9H2TbFhsqMA.woff2)
17+
format("woff2");
18+
unicode-range:
19+
U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
1720
}
1821

1922
/* hebrew */
2023
@font-face {
21-
font-family: 'Heebo';
24+
font-family: "Heebo";
2225
font-style: normal;
2326
font-weight: 700;
24-
src: url(https://fonts.gstatic.com/s/heebo/v9/NGS6v5_NC0k9P9H0TbFhsqMA6aw.woff2) format('woff2');
27+
src: url(https://fonts.gstatic.com/s/heebo/v9/NGS6v5_NC0k9P9H0TbFhsqMA6aw.woff2)
28+
format("woff2");
2529
unicode-range: U+0590-05FF, U+20AA, U+25CC, U+FB1D-FB4F;
2630
}
2731

2832
/* latin */
2933
@font-face {
30-
font-family: 'Heebo';
34+
font-family: "Heebo";
3135
font-style: normal;
3236
font-weight: 700;
33-
src: url(https://fonts.gstatic.com/s/heebo/v9/NGS6v5_NC0k9P9H2TbFhsqMA.woff2) format('woff2');
34-
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
37+
src: url(https://fonts.gstatic.com/s/heebo/v9/NGS6v5_NC0k9P9H2TbFhsqMA.woff2)
38+
format("woff2");
39+
unicode-range:
40+
U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
3541
}
3642

3743
/* latin-ext */
3844
@font-face {
39-
font-family: 'Oxygen';
45+
font-family: "Oxygen";
4046
font-style: normal;
4147
font-weight: 700;
42-
src: url(https://fonts.gstatic.com/s/oxygen/v10/2sDcZG1Wl4LcnbuCNWgzZmW5Kb8VZBHR.woff2) format('woff2');
43-
unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF;
48+
src: url(https://fonts.gstatic.com/s/oxygen/v10/2sDcZG1Wl4LcnbuCNWgzZmW5Kb8VZBHR.woff2)
49+
format("woff2");
50+
unicode-range:
51+
U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113,
52+
U+2C60-2C7F, U+A720-A7FF;
4453
}
4554

4655
/* latin */
4756
@font-face {
48-
font-family: 'Oxygen';
57+
font-family: "Oxygen";
4958
font-style: normal;
5059
font-weight: 700;
51-
src: url(https://fonts.gstatic.com/s/oxygen/v10/2sDcZG1Wl4LcnbuCNWgzaGW5Kb8VZA.woff2) format('woff2');
52-
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
60+
src: url(https://fonts.gstatic.com/s/oxygen/v10/2sDcZG1Wl4LcnbuCNWgzaGW5Kb8VZA.woff2)
61+
format("woff2");
62+
unicode-range:
63+
U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
5364
}

docs/style/style.css

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1431,17 +1431,20 @@ label {
14311431
}
14321432

14331433
.has-animations.is-loaded .hero-title {
1434-
-webkit-animation: heroContent 0.6s cubic-bezier(0.215, 0.61, 0.355, 1) forwards 0.15s;
1434+
-webkit-animation: heroContent 0.6s cubic-bezier(0.215, 0.61, 0.355, 1)
1435+
forwards 0.15s;
14351436
animation: heroContent 0.6s cubic-bezier(0.215, 0.61, 0.355, 1) forwards 0.15s;
14361437
}
14371438

14381439
.has-animations.is-loaded .hero-paragraph {
1439-
-webkit-animation: heroContent 0.6s cubic-bezier(0.215, 0.61, 0.355, 1) forwards 0.3s;
1440+
-webkit-animation: heroContent 0.6s cubic-bezier(0.215, 0.61, 0.355, 1)
1441+
forwards 0.3s;
14401442
animation: heroContent 0.6s cubic-bezier(0.215, 0.61, 0.355, 1) forwards 0.3s;
14411443
}
14421444

14431445
.has-animations.is-loaded .hero-cta {
1444-
-webkit-animation: heroContent 0.6s cubic-bezier(0.215, 0.61, 0.355, 1) forwards 0.45s;
1446+
-webkit-animation: heroContent 0.6s cubic-bezier(0.215, 0.61, 0.355, 1)
1447+
forwards 0.45s;
14451448
animation: heroContent 0.6s cubic-bezier(0.215, 0.61, 0.355, 1) forwards 0.45s;
14461449
}
14471450

electron.vite.config.mts

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,14 @@
11
import { dirname, join, resolve } from 'node:path';
22
import { fileURLToPath } from 'node:url';
3-
4-
import { defineConfig, defineViteConfig } from 'electron-vite';
53
import builtinModules from 'builtin-modules';
6-
4+
import { defineConfig, defineViteConfig } from 'electron-vite';
5+
import { type UserConfig, withFilter } from 'vite';
76
import Inspect from 'vite-plugin-inspect';
8-
import solidPlugin from 'vite-plugin-solid';
97
import viteResolve from 'vite-plugin-resolve';
10-
11-
import { withFilter, type UserConfig } from 'vite';
12-
8+
import solidPlugin from 'vite-plugin-solid';
9+
import { i18nImporter } from './vite-plugins/i18n-importer.mjs';
1310
import { pluginVirtualModuleGenerator } from './vite-plugins/plugin-importer.mjs';
1411
import pluginLoader from './vite-plugins/plugin-loader.mjs';
15-
import { i18nImporter } from './vite-plugins/i18n-importer.mjs';
1612

1713
const __dirname = dirname(fileURLToPath(import.meta.url));
1814

@@ -36,8 +32,8 @@ export default defineConfig({
3632
],
3733
publicDir: 'assets',
3834
define: {
39-
'__dirname': 'import.meta.dirname',
40-
'__filename': 'import.meta.filename',
35+
__dirname: 'import.meta.dirname',
36+
__filename: 'import.meta.filename',
4137
},
4238
build: {
4339
lib: {

src/config/defaults.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ export interface DefaultConfig {
1212
'window-size': WindowSizeConfig;
1313
'window-maximized': boolean;
1414
'window-position': WindowPositionConfig;
15-
'url': string;
16-
'options': {
15+
url: string;
16+
options: {
1717
language?: string;
1818
tray: boolean;
1919
appVisible: boolean;
@@ -37,7 +37,7 @@ export interface DefaultConfig {
3737
themes: string[];
3838
customWindowTitle?: string;
3939
};
40-
'plugins': Record<string, unknown>;
40+
plugins: Record<string, unknown>;
4141
}
4242

4343
export const defaultConfig: DefaultConfig = {
@@ -50,8 +50,8 @@ export const defaultConfig: DefaultConfig = {
5050
x: -1,
5151
y: -1,
5252
},
53-
'url': 'https://music.youtube.com',
54-
'options': {
53+
url: 'https://music.youtube.com',
54+
options: {
5555
tray: false,
5656
appVisible: true,
5757
autoUpdates: true,
@@ -72,5 +72,5 @@ export const defaultConfig: DefaultConfig = {
7272
usePodcastParticipantAsArtist: false,
7373
themes: [],
7474
},
75-
'plugins': {},
75+
plugins: {},
7676
};

src/config/index.ts

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
11
import { deepmergeCustom } from 'deepmerge-ts';
2-
3-
import { store, type IStore } from './store';
42
import { restart } from '@/providers/app-controls';
5-
6-
import type { defaultConfig } from './defaults';
3+
import { type defaultConfig } from './defaults';
4+
import { type IStore, store } from './store';
75

86
const deepmerge = deepmergeCustom({
97
mergeArrays: false,
@@ -75,10 +73,12 @@ type Paths<T, D extends number = 10> = [D] extends [never]
7573
: '';
7674

7775
type SplitKey<K> = K extends `${infer A}.${infer B}` ? [A, B] : [K, string];
78-
type PathValue<T, K extends string> =
79-
SplitKey<K> extends [infer A extends keyof T, infer B extends string]
80-
? PathValue<T[A], B>
81-
: T;
76+
type PathValue<T, K extends string> = SplitKey<K> extends [
77+
infer A extends keyof T,
78+
infer B extends string,
79+
]
80+
? PathValue<T[A], B>
81+
: T;
8282

8383
export const get = <Key extends Paths<typeof defaultConfig>>(key: Key) =>
8484
store.get(key) as PathValue<typeof defaultConfig, typeof key>;

src/config/plugins.ts

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,8 @@
1-
import { deepmerge } from 'deepmerge-ts';
21
import { allPlugins } from 'virtual:plugins';
3-
4-
import { store } from './store';
5-
2+
import { deepmerge } from 'deepmerge-ts';
63
import { restart } from '@/providers/app-controls';
7-
8-
import type { PluginConfig } from '@/types/plugins';
4+
import { type PluginConfig } from '@/types/plugins';
5+
import { store } from './store';
96

107
export function getPlugins() {
118
return store.get('plugins') as Record<string, PluginConfig>;
@@ -33,7 +30,7 @@ export function setOptions<T>(
3330
const plugins = store.get('plugins') as Record<string, T>;
3431
// HACK: This is a workaround for preventing changed options from being overwritten
3532
exclude.forEach((key) => {
36-
if (Object.prototype.hasOwnProperty.call(options, key)) {
33+
if (Object.hasOwn(options, key)) {
3734
delete options[key as keyof T];
3835
}
3936
});

src/i18n/index.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
1-
import i18next, { init, t as i18t, changeLanguage } from 'i18next';
2-
31
import { languageResources } from 'virtual:i18n';
2+
import i18next, { changeLanguage, t as i18t, init } from 'i18next';
43

54
export const loadI18n = async () =>
65
await init({

src/i18n/resources/@types/index.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@ export interface LanguageResources {
22
[lang: string]: {
33
translation: Record<string, unknown> & {
44
language?: {
5-
'name': string;
5+
name: string;
66
'local-name': string;
7-
'code': string;
7+
code: string;
88
};
99
};
1010
};

src/loader/menu.ts

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,14 @@
1-
import { deepmerge } from 'deepmerge-ts';
21
import { allPlugins } from 'virtual:plugins';
3-
2+
import { deepmerge } from 'deepmerge-ts';
3+
import { type BrowserWindow, type MenuItemConstructorOptions } from 'electron';
44
import * as config from '@/config';
5+
import { t } from '@/i18n';
56
import { setApplicationMenu } from '@/menu';
67

8+
import { type MenuContext } from '@/types/contexts';
9+
import { type PluginConfig } from '@/types/plugins';
710
import { LoggerPrefix } from '@/utils';
811

9-
import { t } from '@/i18n';
10-
11-
import type { MenuContext } from '@/types/contexts';
12-
import type { BrowserWindow, MenuItemConstructorOptions } from 'electron';
13-
import type { PluginConfig } from '@/types/plugins';
14-
1512
const menuTemplateMap: Record<string, MenuItemConstructorOptions[]> = {};
1613
const createContext = (
1714
id: string,

src/loader/preload.ts

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,10 @@
1-
import { deepmerge } from 'deepmerge-ts';
21
import { allPlugins, preloadPlugins } from 'virtual:plugins';
3-
4-
import { LoggerPrefix, startPlugin, stopPlugin } from '@/utils';
5-
2+
import { deepmerge } from 'deepmerge-ts';
63
import * as config from '@/config';
7-
84
import { t } from '@/i18n';
9-
10-
import type { PreloadContext } from '@/types/contexts';
11-
import type { PluginConfig, PluginDef } from '@/types/plugins';
5+
import { type PreloadContext } from '@/types/contexts';
6+
import { type PluginConfig, type PluginDef } from '@/types/plugins';
7+
import { LoggerPrefix, startPlugin, stopPlugin } from '@/utils';
128

139
const loadedPluginMap: Record<
1410
string,

0 commit comments

Comments
 (0)