mirror of
https://github.com/Psychotoxical/psysonic.git
synced 2026-07-22 07:15:47 +00:00
chore(eslint): add ESLint toolchain and clean src to strict 0/0 (#1165)
* chore(eslint): add eslint toolchain and configs * fix(eslint): resolve gradual-config errors (rules-of-hooks, no-empty, prefer-const, …) * chore(eslint): clear unused vars in config, contexts, app and test * chore(eslint): clear unused vars in api and music-network * chore(eslint): clear unused vars in utils * chore(eslint): clear unused vars in store * chore(eslint): clear unused vars in cover and hooks * chore(eslint): clear unused vars in components * chore(eslint): clear unused vars in pages * chore(eslint): remove explicit any in src * chore(eslint): align react-hooks exhaustive-deps * chore(eslint): zero gradual config on src * chore(eslint): strict hook rules in store and utils * chore(eslint): strict hook rules in hooks and cover * chore(eslint): strict hook rules in components * chore(eslint): strict hook rules in pages and contexts * chore(eslint): document scripts ignore in eslint config * chore(eslint): add lint script and zero strict findings * chore(eslint): address review round 1 (gradual 0/0, per-site disable reasons) * chore(eslint): tighten two set-state disable comments (review round 2 LOW) * chore(nix): sync npmDepsHash with package-lock.json * docs(changelog): add Under the Hood entry for ESLint setup (PR #1165) --------- Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
This commit is contained in:
@@ -4,8 +4,6 @@ import {
|
||||
MOOD_GROUPS,
|
||||
OXIMEDIA_MOOD_TAG_IDS,
|
||||
TOP_OXIMEDIA_MOOD_TAG_TEST_SCORES,
|
||||
moodScoresFromValenceArousal,
|
||||
topDistinctOximediaMoodTagIds,
|
||||
topDistinctOximediaMoodTagIdsFromValenceArousal,
|
||||
topOximediaMoodTagIds,
|
||||
} from './moodGroups';
|
||||
|
||||
@@ -1,7 +1,9 @@
|
||||
// Shared types for the shortcut-action subsystem. The contract overview lives
|
||||
// in the barrel, `shortcutActions.ts`.
|
||||
|
||||
export type TranslateLike = (key: string, options?: any) => string;
|
||||
import type { NavigateOptions } from 'react-router-dom';
|
||||
|
||||
export type TranslateLike = (key: string, options?: Record<string, unknown>) => string;
|
||||
|
||||
/** One bindable slot (in-app OR global). `defaultBinding` is the out-of-box
|
||||
* chord, or `null` for "unbound by default". `hidden` keeps the action out of
|
||||
@@ -12,15 +14,15 @@ export type ShortcutSlot = { defaultBinding: string | null; hidden?: boolean };
|
||||
* track-preview is interrupted: 'stop' for explicit UI / in-app keys, 'ignore'
|
||||
* for hardware media keys. */
|
||||
export type ActionContext = {
|
||||
navigate: (to: string, options?: any) => void;
|
||||
navigate: (to: string, options?: NavigateOptions) => void;
|
||||
previewPolicy: 'stop' | 'ignore';
|
||||
};
|
||||
|
||||
/** Passed to `executeCliPlayerCommand` — the raw `cli:player-command` payload
|
||||
* plus a navigate fn. */
|
||||
export type CliContext = {
|
||||
navigate: (to: string, options?: any) => void;
|
||||
payload: any;
|
||||
navigate: (to: string, options?: NavigateOptions) => void;
|
||||
payload: Record<string, unknown>;
|
||||
};
|
||||
|
||||
/** Registry entry for one shortcut action. `inApp` / `global` /
|
||||
|
||||
Reference in New Issue
Block a user