From 2dda68c462a5df96fda8b8061704bc8351d341ae Mon Sep 17 00:00:00 2001 From: Nawaz Dhandala Date: Thu, 2 Oct 2025 11:57:39 +0100 Subject: [PATCH] refactor: update comment styles for consistency across ProjectAPI, DataPoint, and ComponentCode --- Common/Server/API/ProjectAPI.ts | 6 ++++-- Common/UI/Components/Charts/Utils/DataPoint.ts | 14 ++++++++------ Workflow/API/ComponentCode.ts | 6 ++++-- eslint.config.js | 4 ++-- 4 files changed, 18 insertions(+), 12 deletions(-) diff --git a/Common/Server/API/ProjectAPI.ts b/Common/Server/API/ProjectAPI.ts index 358a4c1f3c..2bd3f71921 100644 --- a/Common/Server/API/ProjectAPI.ts +++ b/Common/Server/API/ProjectAPI.ts @@ -25,8 +25,10 @@ export default class ProjectAPI extends BaseAPI { public constructor() { super(Project, ProjectService); - /// This API lists all the projects where user is its team member. - /// This API is usually used to show project selector dropdown in the UI + /* + * This API lists all the projects where user is its team member. + * This API is usually used to show project selector dropdown in the UI + */ this.router.post( `${new this.entityType() .getCrudApiPath() diff --git a/Common/UI/Components/Charts/Utils/DataPoint.ts b/Common/UI/Components/Charts/Utils/DataPoint.ts index 2675f6a9d3..00bc7a5c1a 100644 --- a/Common/UI/Components/Charts/Utils/DataPoint.ts +++ b/Common/UI/Components/Charts/Utils/DataPoint.ts @@ -1,9 +1,11 @@ -/// ChartDataPoint is in the format of: -// { -// date: "Feb 22", -// SolarPanels: 2756, -// Inverters: 2103, -// } +/* + * ChartDataPoint is in the format of: + * { + * date: "Feb 22", + * SolarPanels: 2756, + * Inverters: 2103, + * } + */ import BadDataException from "../../../../Types/Exception/BadDataException"; import ChartDataPoint from "../ChartLibrary/Types/ChartDataPoint"; diff --git a/Workflow/API/ComponentCode.ts b/Workflow/API/ComponentCode.ts index 5ab19a54f2..c294f39192 100644 --- a/Workflow/API/ComponentCode.ts +++ b/Workflow/API/ComponentCode.ts @@ -16,8 +16,10 @@ export default class ComponentCodeAPI { } public init(): void { - // init all component code. - /// Get all the components. + /* + * init all component code. + * Get all the components. + */ for (const key in Components) { const ComponentCode: ComponentCode | undefined = Components[key]; diff --git a/eslint.config.js b/eslint.config.js index 0ee6c601e6..87fff296d3 100644 --- a/eslint.config.js +++ b/eslint.config.js @@ -59,8 +59,8 @@ export default tseslint.config( "@typescript-eslint/no-var-requires": "off", // TODO: Remove this rule "@typescript-eslint/no-duplicate-enum-values": "off", // TODO: Remove this rule "no-constant-binary-expression": "off", // TODO: Remove this rule - "@typescript-eslint/ban-ts-comment": "off", // TODO: Remove this rule - "multiline-comment-style": "error", // TODO: Remove this rule + "@typescript-eslint/ban-ts-comment": "off", + "multiline-comment-style": "error", "@typescript-eslint/no-floating-promises": "off", // TODO: Remove this rule "no-fallthrough": "error", "no-unreachable": "error",