From: Jérôme Benoit Date: Wed, 19 Oct 2022 15:45:23 +0000 (+0200) Subject: Move ts-node configurations to tsconfig.json X-Git-Tag: v1.1.85~9 X-Git-Url: https://git.piment-noir.org/?a=commitdiff_plain;h=a56d48e76a52c589c7ac4433c15fa028b39345ea;p=e-mobility-charging-stations-simulator.git Move ts-node configurations to tsconfig.json Signed-off-by: Jérôme Benoit --- diff --git a/package.json b/package.json index 805a3b8b..c1d45f71 100644 --- a/package.json +++ b/package.json @@ -60,7 +60,7 @@ "lint": "cross-env TIMING=1 eslint --cache --ext .js,.ts src", "lint:fix": "cross-env TIMING=1 eslint --cache --fix --ext .js,.ts src", "format": "prettier --write .", - "test": "cross-env TS_NODE_COMPILER_OPTIONS={\\\"module\\\":\\\"commonjs\\\"} nyc mocha test/**/*Test.ts", + "test": "nyc mocha test/**/*Test.ts", "coverage": "nyc report --reporter=lcov", "coverage:html": "nyc report --reporter=html", "clinic:clean": "clinic clean", diff --git a/src/charging-station/SharedLRUCache.ts b/src/charging-station/SharedLRUCache.ts index e02f6ac6..04806853 100644 --- a/src/charging-station/SharedLRUCache.ts +++ b/src/charging-station/SharedLRUCache.ts @@ -106,12 +106,12 @@ export default class SharedLRUCache { chargingStationConfiguration: ChargingStationConfiguration ): boolean { return ( - !Utils.isNullOrUndefined(chargingStationConfiguration?.configurationKey) && - !Utils.isNullOrUndefined(chargingStationConfiguration?.stationInfo) && - !Utils.isNullOrUndefined(chargingStationConfiguration?.configurationHash) && - !Utils.isEmptyArray(chargingStationConfiguration?.configurationKey) && - !Utils.isEmptyObject(chargingStationConfiguration?.stationInfo) && - !Utils.isEmptyString(chargingStationConfiguration?.configurationHash) + Utils.isNullOrUndefined(chargingStationConfiguration?.configurationKey) === false && + Utils.isNullOrUndefined(chargingStationConfiguration?.stationInfo) === false && + Utils.isNullOrUndefined(chargingStationConfiguration?.configurationHash) === false && + Utils.isEmptyArray(chargingStationConfiguration?.configurationKey) === false && + Utils.isEmptyObject(chargingStationConfiguration?.stationInfo) === false && + Utils.isEmptyString(chargingStationConfiguration?.configurationHash) === false ); } } diff --git a/tsconfig.json b/tsconfig.json index ff3ae353..9e4fe44e 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -67,5 +67,10 @@ /* Advanced Options */ "skipLibCheck": true, /* Skip type checking of declaration files. */ "forceConsistentCasingInFileNames": true /* Disallow inconsistently-cased references to the same file. */ + }, + "ts-node": { + "compilerOptions": { + "module": "commonjs" + } } }