]> Piment Noir Git Repositories - e-mobility-charging-stations-simulator.git/commitdiff
chore: silence linter
authorJérôme Benoit <jerome.benoit@piment-noir.org>
Mon, 17 Nov 2025 12:24:43 +0000 (13:24 +0100)
committerJérôme Benoit <jerome.benoit@piment-noir.org>
Mon, 17 Nov 2025 12:24:43 +0000 (13:24 +0100)
Signed-off-by: Jérôme Benoit <jerome.benoit@piment-noir.org>
.vscode/settings.json
eslint.config.js
src/charging-station/ocpp/2.0/OCPP20IncomingRequestService.ts
src/types/UUID.ts
src/types/ocpp/2.0/Common.ts
src/worker/WorkerTypes.ts

index 7ca8bd7339ebe9a0026f597268def6e247f9f0f4..eaa924c3fd40e2530f88528ce09d9e6386fda6c8 100644 (file)
@@ -41,6 +41,7 @@
     "measurands",
     "mikro",
     "MILLI",
+    "MILLIWATT",
     "mnemonist",
     "neostandard",
     "ocpp",
index 72c72c406c99cf881207eefefcf6183809e0a8c6..cd9d52e279645f922acb021a34a8597065218a2f 100644 (file)
@@ -23,6 +23,7 @@ export default defineConfig([
               'DECI',
               'CENTI',
               'MILLI',
+              'MILLIWATT',
               'Benoit',
               'chargingstations',
               'ctrlr',
index 316a47bdc8b9ef7d425a891883b8c2871a359e2e..fea34f18f87838681b093e3d65d36d63628ac6f2 100644 (file)
@@ -1308,15 +1308,15 @@ export class OCPP20IncomingRequestService extends OCPPIncomingRequestService {
     chargingStation: ChargingStation,
     commandPayload: OCPP20RequestStopTransactionRequest
   ): Promise<OCPP20RequestStopTransactionResponse> {
+    // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
     const { transactionId } = commandPayload
     logger.info(
-      `${chargingStation.logPrefix()} ${moduleName}.handleRequestStopTransaction: Remote stop transaction request received for transaction ID ${transactionId}`
+      `${chargingStation.logPrefix()} ${moduleName}.handleRequestStopTransaction: Remote stop transaction request received for transaction ID ${transactionId as string}`
     )
 
     if (!validateUUID(transactionId)) {
       logger.warn(
-        // eslint-disable-next-line @typescript-eslint/restrict-template-expressions
-        `${chargingStation.logPrefix()} ${moduleName}.handleRequestStopTransaction: Invalid transaction ID format (expected UUID): ${transactionId}`
+        `${chargingStation.logPrefix()} ${moduleName}.handleRequestStopTransaction: Invalid transaction ID format (expected UUID): ${transactionId as string}`
       )
       return {
         status: RequestStartStopStatusEnumType.Rejected,
@@ -1326,7 +1326,7 @@ export class OCPP20IncomingRequestService extends OCPPIncomingRequestService {
     const evseId = chargingStation.getEvseIdByTransactionId(transactionId)
     if (evseId == null) {
       logger.warn(
-        `${chargingStation.logPrefix()} ${moduleName}.handleRequestStopTransaction: Transaction ID ${transactionId} does not exist on any EVSE`
+        `${chargingStation.logPrefix()} ${moduleName}.handleRequestStopTransaction: Transaction ID ${transactionId as string} does not exist on any EVSE`
       )
       return {
         status: RequestStartStopStatusEnumType.Rejected,
@@ -1336,7 +1336,7 @@ export class OCPP20IncomingRequestService extends OCPPIncomingRequestService {
     const connectorId = chargingStation.getConnectorIdByTransactionId(transactionId)
     if (connectorId == null) {
       logger.warn(
-        `${chargingStation.logPrefix()} ${moduleName}.handleRequestStopTransaction: Transaction ID ${transactionId} does not exist on any connector`
+        `${chargingStation.logPrefix()} ${moduleName}.handleRequestStopTransaction: Transaction ID ${transactionId as string} does not exist on any connector`
       )
       return {
         status: RequestStartStopStatusEnumType.Rejected,
@@ -1352,7 +1352,7 @@ export class OCPP20IncomingRequestService extends OCPPIncomingRequestService {
 
       if (stopResponse.status === GenericStatus.Accepted) {
         logger.info(
-          `${chargingStation.logPrefix()} ${moduleName}.handleRequestStopTransaction: Remote stop transaction ACCEPTED for transactionId '${transactionId}'`
+          `${chargingStation.logPrefix()} ${moduleName}.handleRequestStopTransaction: Remote stop transaction ACCEPTED for transactionId '${transactionId as string}'`
         )
         return {
           status: RequestStartStopStatusEnumType.Accepted,
@@ -1360,14 +1360,14 @@ export class OCPP20IncomingRequestService extends OCPPIncomingRequestService {
       }
 
       logger.warn(
-        `${chargingStation.logPrefix()} ${moduleName}.handleRequestStopTransaction: Remote stop transaction REJECTED for transactionId '${transactionId}'`
+        `${chargingStation.logPrefix()} ${moduleName}.handleRequestStopTransaction: Remote stop transaction REJECTED for transactionId '${transactionId as string}'`
       )
       return {
         status: RequestStartStopStatusEnumType.Rejected,
       }
     } catch (error) {
       logger.error(
-        `${chargingStation.logPrefix()} ${moduleName}.handleRequestStopTransaction: Error occurred during remote stop transaction for transaction ID ${transactionId} on connector ${connectorId.toString()}:`,
+        `${chargingStation.logPrefix()} ${moduleName}.handleRequestStopTransaction: Error occurred during remote stop transaction for transaction ID ${transactionId as string} on connector ${connectorId.toString()}:`,
         error
       )
       return {
index bb2a5d871f739022b4939ea04bdabe85b65d326b..ce4042f10d3937da5595ad931a71d2c2c40fc0bb 100644 (file)
@@ -1,5 +1,6 @@
 /**
  * UUIDv4 type representing a standard UUID format
+ * cspell:ignore yxxx
  * Pattern: xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx
  * where x is any hexadecimal digit and y is one of 8, 9, A, or B
  */
index 0c54de3c7c165fa41ae68b2c094f20889a7a4764..8102dc2683d5466705cfdcf102b576dd5cb5bd47 100644 (file)
@@ -169,7 +169,7 @@ export enum OCPP20UnitEnumType {
   CELSIUS = 'Celsius',
   CHARS = 'chars', // Custom extension for character count measurements
   DECIBEL = 'dB',
-  DECIBEL_MILLIWATT = 'dBm', // cspell:ignore MILLIWATT
+  DECIBEL_MILLIWATT = 'dBm',
   DEGREES = 'Deg',
   FAHRENHEIT = 'Fahrenheit',
   HERTZ = 'Hz',
index b4410cc0467277232130a2fb27bf60edb6e86307..a233d6dfe38a46c104c0d3c19d48561ebf195b01 100644 (file)
@@ -35,6 +35,7 @@ export interface SetInfo {
 
 /**
  * UUIDv4 type representing a standard UUID format
+ * cspell:ignore yxxx
  * Pattern: xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx
  * where x is any hexadecimal digit and y is one of 8, 9, A, or B
  */