From 42f331849ea30557749162cc37b0c4658933cf93 Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=A9r=C3=B4me=20Benoit?= Date: Fri, 23 Aug 2024 21:00:50 +0200 Subject: [PATCH] refactor: revert overzealous enums ordering MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Jérôme Benoit --- src/charging-station/Bootstrap.ts | 9 ++++++--- src/types/WebSocket.ts | 21 +++++++++++---------- src/types/ocpp/MessageType.ts | 5 +++-- 3 files changed, 20 insertions(+), 15 deletions(-) diff --git a/src/charging-station/Bootstrap.ts b/src/charging-station/Bootstrap.ts index 2603de82..b7178ad4 100644 --- a/src/charging-station/Bootstrap.ts +++ b/src/charging-station/Bootstrap.ts @@ -51,11 +51,14 @@ import { UIServerFactory } from './ui-server/UIServerFactory.js' const moduleName = 'Bootstrap' enum exitCodes { - duplicateChargingStationTemplateUrls = 2, - gracefulShutdownError = 4, + succeeded = 0, + // eslint-disable-next-line perfectionist/sort-enums missingChargingStationsConfiguration = 1, + // eslint-disable-next-line perfectionist/sort-enums + duplicateChargingStationTemplateUrls = 2, noChargingStationTemplates = 3, - succeeded = 0 + // eslint-disable-next-line perfectionist/sort-enums + gracefulShutdownError = 4 } export class Bootstrap extends EventEmitter { diff --git a/src/types/WebSocket.ts b/src/types/WebSocket.ts index 753c2268..94b85c86 100644 --- a/src/types/WebSocket.ts +++ b/src/types/WebSocket.ts @@ -1,3 +1,4 @@ +/* eslint-disable perfectionist/sort-enums */ export const WebSocketCloseEventStatusString: Record = Object.freeze({ 1000: 'Normal Closure', @@ -19,22 +20,22 @@ export const WebSocketCloseEventStatusString: Record