Skip to content

Commit

Permalink
fix linting issues
Browse files Browse the repository at this point in the history
  • Loading branch information
mat-ng committed Mar 21, 2024
1 parent 8dd6aa3 commit a7488d1
Showing 1 changed file with 21 additions and 17 deletions.
38 changes: 21 additions & 17 deletions backend/typescript/delegation-algorithm/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { sequelize } from "../../models";
import { sequelize } from '../../models';

Check failure on line 1 in backend/typescript/delegation-algorithm/src/index.ts

View workflow job for this annotation

GitHub Actions / run-lint

Replace `'../../models'` with `"../../models"`

import Application from '../../models/application.model';

Check failure on line 3 in backend/typescript/delegation-algorithm/src/index.ts

View workflow job for this annotation

GitHub Actions / run-lint

Replace `'../../models/application.model'` with `"../../models/application.model"`
import ApplicationDashboardModel from '../../models/applicationDashboard.model';

Check failure on line 4 in backend/typescript/delegation-algorithm/src/index.ts

View workflow job for this annotation

GitHub Actions / run-lint

Replace `'../../models/applicationDashboard.model'` with `"../../models/applicationDashboard.model"`
Expand All @@ -16,22 +16,26 @@ async function delegationAlgorithm() {
const uniquePairs = roundRobinPairs(reviewers);
const totalPairs = assignApplicationsToPairs(uniquePairs, applications);

await Promise.all(applications.map(async function (application, i) {
return Promise.all(totalPairs[i].map(async function (reviewer) {
await ApplicationDashboardModel.create({
applicationId: application.id,
reviewerId: reviewer.id,
reviewerEmail: reviewer.email,
passionFSG: 0,
teamPlayer: 0,
desireToLearn: 0,
skill: 0,
skillCategory: 'junior',
reviewerComments: '',
recommendedSecondChoice: 'N/A'
});
}));
}));
await Promise.all(
applications.map(async function (application, i) {

Check warning on line 20 in backend/typescript/delegation-algorithm/src/index.ts

View workflow job for this annotation

GitHub Actions / run-lint

Unexpected unnamed async function
return Promise.all(
totalPairs[i].map(async function (reviewer) {

Check warning on line 22 in backend/typescript/delegation-algorithm/src/index.ts

View workflow job for this annotation

GitHub Actions / run-lint

Unexpected unnamed async function
await ApplicationDashboardModel.create({
applicationId: application.id,
reviewerId: reviewer.id,
reviewerEmail: reviewer.email,
passionFSG: 0,
teamPlayer: 0,
desireToLearn: 0,
skill: 0,
skillCategory: 'junior',

Check failure on line 31 in backend/typescript/delegation-algorithm/src/index.ts

View workflow job for this annotation

GitHub Actions / run-lint

Replace `'junior'` with `"junior"`
reviewerComments: '',

Check failure on line 32 in backend/typescript/delegation-algorithm/src/index.ts

View workflow job for this annotation

GitHub Actions / run-lint

Replace `''` with `""`
recommendedSecondChoice: 'N/A'

Check failure on line 33 in backend/typescript/delegation-algorithm/src/index.ts

View workflow job for this annotation

GitHub Actions / run-lint

Replace `'N/A'` with `"N/A",`
});
})
);
})
);
}

async function loadReviewers(): Promise<User[]> {
Expand Down

0 comments on commit a7488d1

Please sign in to comment.