Move ts-node configurations to tsconfig.json
authorJérôme Benoit <jerome.benoit@sap.com>
Wed, 19 Oct 2022 15:45:23 +0000 (17:45 +0200)
committerJérôme Benoit <jerome.benoit@sap.com>
Wed, 19 Oct 2022 15:45:23 +0000 (17:45 +0200)
Signed-off-by: Jérôme Benoit <jerome.benoit@sap.com>
package.json
src/charging-station/SharedLRUCache.ts
tsconfig.json

index 805a3b8be6fabcb0cb0ec7c5ff89391f993a3a88..c1d45f71deb697d1473d5a1af3defe7348f139c2 100644 (file)
@@ -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",
index e02f6ac6b6cdb29ba1e8f352ef689859b75b316b..048068534103ea6f5bdd5afec5940dd2753fc1dd 100644 (file)
@@ -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
     );
   }
 }
index ff3ae353b3441c685ddf1d2a1c606cbb69566e9d..9e4fe44ec96fbddde23720e5ca009878b5b276de 100644 (file)
     /* 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"
+    }
   }
 }