mirror of
https://github.com/th-ch/youtube-music.git
synced 2026-01-11 18:41:47 +00:00
fix: fixed issues identified in eslint
This commit is contained in:
@ -7,7 +7,6 @@ import maximizeRaw from './assets/maximize.svg?inline';
|
||||
import unmaximizeRaw from './assets/unmaximize.svg?inline';
|
||||
|
||||
import type { Menu } from 'electron';
|
||||
import * as electron from 'electron';
|
||||
|
||||
function $<E extends Element = Element>(selector: string) {
|
||||
return document.querySelector<E>(selector);
|
||||
|
||||
4
src/plugins/shortcuts/mpris-service.d.ts
vendored
4
src/plugins/shortcuts/mpris-service.d.ts
vendored
@ -1,7 +1,7 @@
|
||||
declare module '@jellybrick/mpris-service' {
|
||||
import { EventEmitter } from 'events';
|
||||
|
||||
import dbus from 'dbus-next';
|
||||
import { interface as dbusInterface } from 'dbus-next';
|
||||
|
||||
|
||||
interface RootInterfaceOptions {
|
||||
@ -101,7 +101,7 @@ declare module '@jellybrick/mpris-service' {
|
||||
static LOOP_STATUS_PLAYLIST: 'Playlist';
|
||||
}
|
||||
|
||||
interface MprisInterface extends dbus.interface.Interface {
|
||||
interface MprisInterface extends dbusInterface.Interface {
|
||||
setProperty(property: string, valuePlain: unknown): void;
|
||||
}
|
||||
|
||||
|
||||
@ -1,3 +1,5 @@
|
||||
/* eslint-disable @typescript-eslint/no-var-requires */
|
||||
|
||||
const { test, expect } = require('@playwright/test');
|
||||
|
||||
const { sortSegments } = require('../segments');
|
||||
|
||||
@ -8,13 +8,13 @@ export abstract class Visualizer<T> {
|
||||
abstract visualizer: T;
|
||||
|
||||
protected constructor(
|
||||
audioContext: AudioContext,
|
||||
audioSource: MediaElementAudioSourceNode,
|
||||
visualizerContainer: HTMLElement,
|
||||
canvas: HTMLCanvasElement,
|
||||
audioNode: GainNode,
|
||||
stream: MediaStream,
|
||||
options: ConfigType<'visualizer'>,
|
||||
_audioContext: AudioContext,
|
||||
_audioSource: MediaElementAudioSourceNode,
|
||||
_visualizerContainer: HTMLElement,
|
||||
_canvas: HTMLCanvasElement,
|
||||
_audioNode: GainNode,
|
||||
_stream: MediaStream,
|
||||
_options: ConfigType<'visualizer'>,
|
||||
) {}
|
||||
|
||||
abstract resize(width: number, height: number): void;
|
||||
|
||||
@ -22,7 +22,7 @@ enabledPluginNameAndOptions.forEach(async ([plugin, options]) => {
|
||||
if (Object.hasOwn(preloadPluginList, plugin)) {
|
||||
const handler = preloadPluginList[plugin];
|
||||
try {
|
||||
await handler?.();
|
||||
await handler?.(options);
|
||||
} catch (error) {
|
||||
console.error(`Error in plugin "${plugin}": ${String(error)}`);
|
||||
}
|
||||
|
||||
4
src/virtual-module.d.ts
vendored
4
src/virtual-module.d.ts
vendored
@ -14,7 +14,9 @@ declare module 'virtual:MenuPlugins' {
|
||||
}
|
||||
|
||||
declare module 'virtual:PreloadPlugins' {
|
||||
export const pluginList: Record<string, () => Promise<void>>;
|
||||
import type { ConfigType } from './config/dynamic';
|
||||
|
||||
export const pluginList: Record<string, (options: ConfigType) => Promise<void>>;
|
||||
}
|
||||
|
||||
declare module 'virtual:RendererPlugins' {
|
||||
|
||||
Reference in New Issue
Block a user