Skip to content

Commit ae1382f

Browse files
committed
eslint
1 parent 1ba1207 commit ae1382f

File tree

6 files changed

+11
-10
lines changed

6 files changed

+11
-10
lines changed

packages/common/src/bulkImport/types.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,9 @@ export interface BulkImportCardData {
2020
/** Card markdown content */
2121
Input: string;
2222
/** Card media uploads */
23-
Uploads: any[];
23+
Uploads: unknown[];
2424
/** Any additional fields can be added as needed */
25-
[key: string]: any;
25+
[key: string]: unknown;
2626
}
2727

2828
// ImportResult and BulkCardProcessorConfig have been moved to @vue-skuilder/db

packages/common/src/elo.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
11
export class EloRanker {
22
constructor(public k: number = 32) {}
33

4-
setKFactor(k: number) {
4+
setKFactor(k: number): void {
55
this.k = k;
66
}
7-
getKFactor() {
7+
getKFactor(): number {
88
return this.k;
99
}
1010

11-
getExpected(a: number, b: number) {
11+
getExpected(a: number, b: number): number {
1212
return 1 / (1 + Math.pow(10, (b - a) / 400));
1313
}
14-
updateRating(expected: number, actual: number, current: number) {
14+
updateRating(expected: number, actual: number, current: number): number {
1515
return Math.round(current + this.k * (actual - expected));
1616
}
1717
}

packages/common/src/interfaces/FieldDefinition.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,5 @@ export interface FieldDefinition {
88
type: FieldType;
99
validator?: Validator;
1010
tagger?: Tagger;
11-
generateELO?: (x: any) => CourseElo;
11+
generateELO?: (x: unknown) => CourseElo;
1212
}

packages/common/src/interfaces/Tagger.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@
22
* A tagger is *some function* that produces a list of tags - ie, strings.
33
*/
44
export interface Tagger {
5-
(x: any): string[];
5+
(x: unknown): string[];
66
}

packages/common/src/logshim.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1-
export const log = (...args: unknown[]) => {
1+
export const log = (...args: unknown[]): void => {
2+
// eslint-disable-next-line no-console
23
console.log(...args);
34
};

packages/common/src/namespacer.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ export class NameSpacer {
1111
};
1212
}
1313
}
14-
public static getDataShapeString(shapeDescription: ShapeDescriptor) {
14+
public static getDataShapeString(shapeDescription: ShapeDescriptor): string {
1515
return `${shapeDescription.course}.datashape.${shapeDescription.dataShape}`;
1616
}
1717

0 commit comments

Comments
 (0)