From: Jérôme Benoit Date: Mon, 17 Nov 2025 12:24:43 +0000 (+0100) Subject: chore: silence linter X-Git-Tag: v2~43 X-Git-Url: https://git.piment-noir.org/?a=commitdiff_plain;h=f4eedc4d63e1632205d9644c9d65fd554085ad3a;p=e-mobility-charging-stations-simulator.git chore: silence linter Signed-off-by: Jérôme Benoit --- diff --git a/.vscode/settings.json b/.vscode/settings.json index 7ca8bd73..eaa924c3 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -41,6 +41,7 @@ "measurands", "mikro", "MILLI", + "MILLIWATT", "mnemonist", "neostandard", "ocpp", diff --git a/eslint.config.js b/eslint.config.js index 72c72c40..cd9d52e2 100644 --- a/eslint.config.js +++ b/eslint.config.js @@ -23,6 +23,7 @@ export default defineConfig([ 'DECI', 'CENTI', 'MILLI', + 'MILLIWATT', 'Benoit', 'chargingstations', 'ctrlr', diff --git a/src/charging-station/ocpp/2.0/OCPP20IncomingRequestService.ts b/src/charging-station/ocpp/2.0/OCPP20IncomingRequestService.ts index 316a47bd..fea34f18 100644 --- a/src/charging-station/ocpp/2.0/OCPP20IncomingRequestService.ts +++ b/src/charging-station/ocpp/2.0/OCPP20IncomingRequestService.ts @@ -1308,15 +1308,15 @@ export class OCPP20IncomingRequestService extends OCPPIncomingRequestService { chargingStation: ChargingStation, commandPayload: OCPP20RequestStopTransactionRequest ): Promise { + // 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 { diff --git a/src/types/UUID.ts b/src/types/UUID.ts index bb2a5d87..ce4042f1 100644 --- a/src/types/UUID.ts +++ b/src/types/UUID.ts @@ -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 */ diff --git a/src/types/ocpp/2.0/Common.ts b/src/types/ocpp/2.0/Common.ts index 0c54de3c..8102dc26 100644 --- a/src/types/ocpp/2.0/Common.ts +++ b/src/types/ocpp/2.0/Common.ts @@ -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', diff --git a/src/worker/WorkerTypes.ts b/src/worker/WorkerTypes.ts index b4410cc0..a233d6df 100644 --- a/src/worker/WorkerTypes.ts +++ b/src/worker/WorkerTypes.ts @@ -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 */