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:
@@ -17,15 +17,21 @@
|
||||
// IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
||||
// CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
|
||||
interface AlsaSequencerPortSelectionJson {
|
||||
id: string;
|
||||
name: string;
|
||||
sortOrder: number;
|
||||
}
|
||||
|
||||
export class AlsaSequencerPortSelection {
|
||||
deserialize(json: any) {
|
||||
deserialize(json: AlsaSequencerPortSelectionJson) {
|
||||
this.id = json.id;
|
||||
this.name = json.name;
|
||||
this.sortOrder = json.sortOrder;
|
||||
return this;
|
||||
};
|
||||
static deserialize_array(input: any): AlsaSequencerPortSelection[] {
|
||||
let result: AlsaSequencerPortSelection[] = [];
|
||||
static deserialize_array(input: AlsaSequencerPortSelectionJson[]): AlsaSequencerPortSelection[] {
|
||||
const result: AlsaSequencerPortSelection[] = [];
|
||||
for (let i = 0; i < input.length; ++i) {
|
||||
result[i] = new AlsaSequencerPortSelection().deserialize(input[i]);
|
||||
}
|
||||
@@ -36,13 +42,17 @@ export class AlsaSequencerPortSelection {
|
||||
sortOrder: number = 0;
|
||||
};
|
||||
|
||||
interface AlsaSequencerConfigurationJson {
|
||||
connections: AlsaSequencerPortSelectionJson[];
|
||||
}
|
||||
|
||||
export class AlsaSequencerConfiguration {
|
||||
deserialize(input: any) {
|
||||
deserialize(input: AlsaSequencerConfigurationJson) {
|
||||
this.connections = AlsaSequencerPortSelection.deserialize_array(input.connections);
|
||||
return this;
|
||||
}
|
||||
deserialize_array(input: any): AlsaSequencerConfiguration[] {
|
||||
let result: AlsaSequencerConfiguration[] = [];
|
||||
deserialize_array(input: AlsaSequencerConfigurationJson[]): AlsaSequencerConfiguration[] {
|
||||
const result: AlsaSequencerConfiguration[] = [];
|
||||
for (let i = 0; i < input.length; ++i) {
|
||||
result[i] = new AlsaSequencerConfiguration().deserialize(input[i]);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user