mirror of
https://github.com/th-ch/youtube-music.git
synced 2026-01-11 10:31:47 +00:00
fix: fixed issues identified in eslint
This commit is contained in:
@ -1,2 +1 @@
|
|||||||
.eslintrc.js
|
.eslintrc.js
|
||||||
electron.vite.config.ts
|
|
||||||
|
|||||||
@ -26,7 +26,7 @@ module.exports = {
|
|||||||
'import/newline-after-import': 'error',
|
'import/newline-after-import': 'error',
|
||||||
'import/no-default-export': 'off',
|
'import/no-default-export': 'off',
|
||||||
'import/no-duplicates': 'error',
|
'import/no-duplicates': 'error',
|
||||||
'import/no-unresolved': ['error', { ignore: ['^virtual:'] }],
|
'import/no-unresolved': ['error', { ignore: ['^virtual:', '\\?inline$', '\\?raw$', '\\?asset&asarUnpack', '^youtubei.js$'] }],
|
||||||
'import/order': [
|
'import/order': [
|
||||||
'error',
|
'error',
|
||||||
{
|
{
|
||||||
|
|||||||
@ -148,6 +148,7 @@
|
|||||||
"butterchurn-presets": "3.0.0-beta.4",
|
"butterchurn-presets": "3.0.0-beta.4",
|
||||||
"conf": "10.2.0",
|
"conf": "10.2.0",
|
||||||
"custom-electron-prompt": "1.5.7",
|
"custom-electron-prompt": "1.5.7",
|
||||||
|
"dbus-next": "0.10.2",
|
||||||
"electron-debug": "3.2.0",
|
"electron-debug": "3.2.0",
|
||||||
"electron-is": "3.0.0",
|
"electron-is": "3.0.0",
|
||||||
"electron-localshortcut": "3.2.1",
|
"electron-localshortcut": "3.2.1",
|
||||||
|
|||||||
3
pnpm-lock.yaml
generated
3
pnpm-lock.yaml
generated
@ -55,6 +55,9 @@ dependencies:
|
|||||||
custom-electron-prompt:
|
custom-electron-prompt:
|
||||||
specifier: 1.5.7
|
specifier: 1.5.7
|
||||||
version: 1.5.7(electron@27.0.3)
|
version: 1.5.7(electron@27.0.3)
|
||||||
|
dbus-next:
|
||||||
|
specifier: 0.10.2
|
||||||
|
version: 0.10.2
|
||||||
electron-debug:
|
electron-debug:
|
||||||
specifier: 3.2.0
|
specifier: 3.2.0
|
||||||
version: 3.2.0
|
version: 3.2.0
|
||||||
|
|||||||
@ -7,7 +7,6 @@ import maximizeRaw from './assets/maximize.svg?inline';
|
|||||||
import unmaximizeRaw from './assets/unmaximize.svg?inline';
|
import unmaximizeRaw from './assets/unmaximize.svg?inline';
|
||||||
|
|
||||||
import type { Menu } from 'electron';
|
import type { Menu } from 'electron';
|
||||||
import * as electron from 'electron';
|
|
||||||
|
|
||||||
function $<E extends Element = Element>(selector: string) {
|
function $<E extends Element = Element>(selector: string) {
|
||||||
return document.querySelector<E>(selector);
|
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' {
|
declare module '@jellybrick/mpris-service' {
|
||||||
import { EventEmitter } from 'events';
|
import { EventEmitter } from 'events';
|
||||||
|
|
||||||
import dbus from 'dbus-next';
|
import { interface as dbusInterface } from 'dbus-next';
|
||||||
|
|
||||||
|
|
||||||
interface RootInterfaceOptions {
|
interface RootInterfaceOptions {
|
||||||
@ -101,7 +101,7 @@ declare module '@jellybrick/mpris-service' {
|
|||||||
static LOOP_STATUS_PLAYLIST: 'Playlist';
|
static LOOP_STATUS_PLAYLIST: 'Playlist';
|
||||||
}
|
}
|
||||||
|
|
||||||
interface MprisInterface extends dbus.interface.Interface {
|
interface MprisInterface extends dbusInterface.Interface {
|
||||||
setProperty(property: string, valuePlain: unknown): void;
|
setProperty(property: string, valuePlain: unknown): void;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -1,3 +1,5 @@
|
|||||||
|
/* eslint-disable @typescript-eslint/no-var-requires */
|
||||||
|
|
||||||
const { test, expect } = require('@playwright/test');
|
const { test, expect } = require('@playwright/test');
|
||||||
|
|
||||||
const { sortSegments } = require('../segments');
|
const { sortSegments } = require('../segments');
|
||||||
|
|||||||
@ -8,13 +8,13 @@ export abstract class Visualizer<T> {
|
|||||||
abstract visualizer: T;
|
abstract visualizer: T;
|
||||||
|
|
||||||
protected constructor(
|
protected constructor(
|
||||||
audioContext: AudioContext,
|
_audioContext: AudioContext,
|
||||||
audioSource: MediaElementAudioSourceNode,
|
_audioSource: MediaElementAudioSourceNode,
|
||||||
visualizerContainer: HTMLElement,
|
_visualizerContainer: HTMLElement,
|
||||||
canvas: HTMLCanvasElement,
|
_canvas: HTMLCanvasElement,
|
||||||
audioNode: GainNode,
|
_audioNode: GainNode,
|
||||||
stream: MediaStream,
|
_stream: MediaStream,
|
||||||
options: ConfigType<'visualizer'>,
|
_options: ConfigType<'visualizer'>,
|
||||||
) {}
|
) {}
|
||||||
|
|
||||||
abstract resize(width: number, height: number): void;
|
abstract resize(width: number, height: number): void;
|
||||||
|
|||||||
@ -22,7 +22,7 @@ enabledPluginNameAndOptions.forEach(async ([plugin, options]) => {
|
|||||||
if (Object.hasOwn(preloadPluginList, plugin)) {
|
if (Object.hasOwn(preloadPluginList, plugin)) {
|
||||||
const handler = preloadPluginList[plugin];
|
const handler = preloadPluginList[plugin];
|
||||||
try {
|
try {
|
||||||
await handler?.();
|
await handler?.(options);
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error(`Error in plugin "${plugin}": ${String(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' {
|
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' {
|
declare module 'virtual:RendererPlugins' {
|
||||||
|
|||||||
Reference in New Issue
Block a user