UI Console Errors and Git Errors Fixes, + recommendations

Converted several variables to constants and removed unused function parameters in the AboutDialog component, addressing lint warnings

Introduced strict JSON interfaces in AlsaDeviceInfo to replace untyped “any” parameters and ensured returned arrays use constants

Simplified styling callbacks and defined props more strictly in App, while using constants for URL parsing

Updated the WithStyles helper to accept unknown argument lists and return types rather than “any”

Added a workflow step so CI runs npm run lint -- --fix inside the vite directory

Testing
This commit is contained in:
Extremesecrecy
2025-07-24 08:11:00 -07:00
parent b3853e1bdb
commit 1e9cd5eb13
11 changed files with 79 additions and 49 deletions
+5 -5
View File
@@ -62,14 +62,14 @@ const AboutDialog = class extends Component<AboutDialogProps, AboutDialogState>
.then(jackStatus => {
this.setState({ jackStatus: jackStatus });
})
.catch(_error => { /* ignore*/ });
.catch(() => { /* ignore*/ });
}
}
timerHandle?: number;
updateNotifications() {
let subscribed = this.mounted && this.props.open;
const subscribed = this.mounted && this.props.open;
if (subscribed !== this.subscribed) {
if (subscribed) {
this.timerHandle = setInterval(() => this.tick(), 1000);
@@ -116,12 +116,12 @@ const AboutDialog = class extends Component<AboutDialogProps, AboutDialogState>
this.mounted = false;
this.updateNotifications();
}
componentDidUpdate(prevProps: Readonly<AboutDialogProps>, prevState: Readonly<AboutDialogState>, snapshot: any): void {
componentDidUpdate(prevProps: Readonly<AboutDialogProps>, prevState: Readonly<AboutDialogState>, snapshot: unknown): void {
super.componentDidUpdate?.(prevProps, prevState, snapshot);
this.updateNotifications();
}
handleDialogClose(_e: SyntheticEvent) {
handleDialogClose() {
this.props.onClose();
}
@@ -129,7 +129,7 @@ const AboutDialog = class extends Component<AboutDialogProps, AboutDialogState>
render() {
let addressKey = 0;
let serverVersion = this.model.serverVersion?.serverVersion ?? "";
let nPos = serverVersion.indexOf(' ');
const nPos = serverVersion.indexOf(' ');
if (nPos !== -1) {
serverVersion = serverVersion.substring(nPos + 1);
}