Skip to content

Commit

Permalink
Merge pull request #66 from IABTechLab/ajy-UID2-Fix-lint-errors
Browse files Browse the repository at this point in the history
Fix lint errors and lint commands
  • Loading branch information
alex-yau-ttd authored Aug 15, 2024
2 parents 7de2770 + 6f153fb commit 15debc4
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 7 deletions.
3 changes: 3 additions & 0 deletions .trivyignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,6 @@
# for more details
# e.g.
# CVE-2022-3996

# https://atlassian.thetradedesk.com/jira/browse/UID2-3953
CVE-2022-25883
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@
"start:debug": "yarn build -- --build && cross-env NODE_ENV=development node -r dotenv/config ./build/bin/www",
"uid2": "cross-env NODE_ENV=development VIEW_FOLDER=../views_uid2/ ID_TYPE=UID2 LOCALE_FOLDER=../public/locales_uid2 nodemon -r dotenv/config --watch ./src ./src/bin/www.ts",
"euid": "cross-env NODE_ENV=development VIEW_FOLDER=../views_euid/ ID_TYPE=EUID LOCALE_FOLDER=../public/locales_euid nodemon -r dotenv/config --watch ./src ./src/bin/www.ts",
"lint": "eslint '**/*.ts'",
"lint": "eslint .",
"lint-fix": "eslint --fix .",
"build": "tsc",
"test": "jest"
},
Expand Down
11 changes: 5 additions & 6 deletions src/routes/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -142,15 +142,14 @@ const defaultRouteHandler: RequestHandler<{}, {}, z.infer<typeof DefaultRouteReq

try {
step = DefaultRouteRequest.parse(req.body).step;
}
catch (e) {
logger.log('error', `error while parsing the request`);
return;
} catch (e) {
logger.log('error', 'error while parsing the request');
return;
}

if (!step) {
logger.log('error', `no step`);
return;
logger.log('error', 'no step');
return;
}

const handler = Object.prototype.hasOwnProperty.call(steps, step) && steps[step];
Expand Down

0 comments on commit 15debc4

Please sign in to comment.