Skip to content

Commit

Permalink
wip: fixing error after lint rule of no any type
Browse files Browse the repository at this point in the history
refs: BLAIS5-3514
  • Loading branch information
motalm committed Oct 13, 2023
1 parent 758c6e4 commit d5dc155
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
3 changes: 3 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,9 @@
"error",
"always"
],
"@typescript-eslint/no-explicit-any": "error",
"react/react-in-jsx-scope": "off",
"react/require-default-props": "off",
"no-undef": "off"
},
"overrides": [
Expand Down
4 changes: 2 additions & 2 deletions server/Functions.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
function isNumber(n: any) {
return !isNaN(parseFloat(n)) && isFinite(n);
function isNumber(n: number | string) {
return !isNaN(parseFloat(String(n))) && isFinite(Number(n));
}

function fieldPeriodFromInstrument(instrument_name: string): string {
Expand Down
4 changes: 2 additions & 2 deletions server/tests/server.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import supertest from "supertest";
import MockAdapter from "axios-mock-adapter";
import axios from "axios";
import { IMock, Mock } from "typemoq";
import BlaiseApiClient from "blaise-api-node-client";
import BlaiseApiClient, { Survey } from "blaise-api-node-client";
import nodeServer from "../server";
import { QuestionnaireHelper } from "./helpers/questionnaire-helper";
require("jest-extended");
Expand Down Expand Up @@ -206,7 +206,7 @@ const feature = loadFeature("./src/features/TO_Interviewer_Happy_Path.feature",

defineFeature(feature, test => {
//Scenario 3b
let response:any;
let response:Survey;
const liveDateUrl = new RegExp(`${process.env.BIMS_API_URL}/tostartdate/.*`);
const questionnaireName = "OPN2007T";

Expand Down

0 comments on commit d5dc155

Please sign in to comment.