Skip to content

Commit

Permalink
fixed lint problems
Browse files Browse the repository at this point in the history
  • Loading branch information
hwellmann committed Aug 2, 2024
1 parent 4a5672f commit c92e9b8
Show file tree
Hide file tree
Showing 9 changed files with 25 additions and 10 deletions.
14 changes: 13 additions & 1 deletion .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,18 @@
"prefix": "app",
"style": "kebab-case"
}
],
"@typescript-eslint/no-unused-vars": [
"error",
{
"args": "all",
"argsIgnorePattern": "^_",
"caughtErrors": "all",
"caughtErrorsIgnorePattern": "^_",
"destructuredArrayIgnorePattern": "^_",
"varsIgnorePattern": "^_",
"ignoreRestSiblings": true
}
]
}
},
Expand All @@ -50,4 +62,4 @@
"rules": {}
}
]
}
}
2 changes: 2 additions & 0 deletions src/@types/abcjs/index.d.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
/* eslint-disable @typescript-eslint/no-explicit-any */

declare module 'abcjs' {
//
// Enumerations
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { Component, Inject } from '@angular/core';
import { MAT_DIALOG_DATA, MatDialogRef } from '@angular/material/dialog';

@Component({
selector: 'delete-repertoire-item',
selector: 'app-delete-repertoire-item',
templateUrl: './delete-repertoire-item.component.html'
})
export class DeleteRepertoireItemComponent {
Expand Down
2 changes: 1 addition & 1 deletion src/app/component/record/record.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ export class RecordComponent {
async startRecording() {
const timer = interval(100);

const sub = timer.subscribe((sec) => {
const sub = timer.subscribe((_) => {
this.progressbarValue = this.progress;

if (this.progressbarValue >= 100) {
Expand Down
2 changes: 1 addition & 1 deletion src/app/service/custom-reuse-strategy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ export class CustomReuseStrategy implements RouteReuseStrategy {

private handlers: { [key: string]: DetachedRouteHandle } = {};

shouldDetach(route: ActivatedRouteSnapshot): boolean {
shouldDetach(_: ActivatedRouteSnapshot): boolean {
return true;
}

Expand Down
6 changes: 3 additions & 3 deletions src/app/service/matching/tune-matcher.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ import fs from 'fs';
import { TuneMatcher } from "./tune-matcher-impl";

describe('TuneMatcher', () => {
let log: Logger = getLogger('TuneMatcherSpec');
let d : number[][] = new Array(2);
const log: Logger = getLogger('TuneMatcherSpec');
const d : number[][] = new Array(2);

const MAX = 1000;
for (let i = 0; i < 2; i++) {
Expand All @@ -19,7 +19,7 @@ describe('TuneMatcher', () => {
log.info('loaded JSON');
const matcher = new TuneMatcher();
matcher.setCorpus(json);
matcher.setProgressCallback((x: number) => null);
matcher.setProgressCallback((_: number) => null);
const matches = matcher.findBestMatches('CEGFGEDDCDDDADDFAAFADFAAAFFGAGDGEDCDEGGFGAFDDFEDDCEBBCCEDCEFGEDCDDDEDFAAFADFAEAFGADGEDD');
matches.forEach(match => log.info(`${match.ed} ${match.name}`));
});
Expand Down
4 changes: 2 additions & 2 deletions src/app/service/repertoire-repository.ts
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ export class RepertoireRepository {

async deleteRepertoireItem(tuneRef: TuneReference, repertoireName: string): Promise<string> {
const collection = await this.load();
let repertoire = await this.findRepertoire(repertoireName);
const repertoire = await this.findRepertoire(repertoireName);
if (repertoire !== undefined) {
const index = repertoire.items.findIndex(it => it.referencedBy(tuneRef));
if (index >= 0) {
Expand Down Expand Up @@ -176,7 +176,7 @@ export class RepertoireRepository {
* @param name repertoire name
* @return file ID of updated repertoire file, or empty string
*/
async deleteRepertoire(name: string): Promise<String> {
async deleteRepertoire(name: string): Promise<string> {
const collection = await this.load();
const index = collection.repertoires.findIndex(r => r.name === name);
if (index == -1) {
Expand Down
2 changes: 1 addition & 1 deletion src/app/service/transcription/recorder.ts
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ export class Recorder {
this.input.connect(this.analyser);
}
}
catch (err) {
catch (_) {
this.status = Status.INIT_FAILED;
}
}
Expand Down
1 change: 1 addition & 0 deletions src/test-config.helper.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/* eslint-disable @typescript-eslint/no-explicit-any */
import { TestBed } from '@angular/core/testing';

type CompilerOptions = Partial<{
Expand Down

0 comments on commit c92e9b8

Please sign in to comment.