From d6972cf982d776f07133abe4ce39df7fd4196423 Mon Sep 17 00:00:00 2001 From: yassinedorbozgithub Date: Mon, 10 Feb 2025 16:30:27 +0100 Subject: [PATCH] fix(widget): introduce ESLint no-multiple-empty-lines rule --- widget/.eslintrc.json | 3 ++- widget/src/ChatWidget.tsx | 1 - widget/src/UiChatWidget.tsx | 1 - widget/src/components/UserSubscription.tsx | 1 - widget/src/utils/SocketIoClient.ts | 1 - widget/src/utils/attachment.ts | 1 - 6 files changed, 2 insertions(+), 6 deletions(-) diff --git a/widget/.eslintrc.json b/widget/.eslintrc.json index 1f2632d5..8cc1efb1 100644 --- a/widget/.eslintrc.json +++ b/widget/.eslintrc.json @@ -65,7 +65,8 @@ " " ], 2 - ] + ], + "no-multiple-empty-lines": ["error", { "max": 1 }] }, "settings": { "react": { diff --git a/widget/src/ChatWidget.tsx b/widget/src/ChatWidget.tsx index ac8853f8..72ad551a 100644 --- a/widget/src/ChatWidget.tsx +++ b/widget/src/ChatWidget.tsx @@ -6,7 +6,6 @@ * 2. All derivative works must include clear attribution to the original creator and software, Hexastack and Hexabot, in a prominent location (e.g., in the software's "About" section, documentation, and README file). */ - import "normalize.css"; import "./ChatWidget.css"; import Launcher from "./components/Launcher"; diff --git a/widget/src/UiChatWidget.tsx b/widget/src/UiChatWidget.tsx index 32290344..bf8be895 100644 --- a/widget/src/UiChatWidget.tsx +++ b/widget/src/UiChatWidget.tsx @@ -6,7 +6,6 @@ * 2. All derivative works must include clear attribution to the original creator and software, Hexastack and Hexabot, in a prominent location (e.g., in the software's "About" section, documentation, and README file). */ - import { PropsWithChildren } from "react"; import Launcher from "./components/Launcher"; diff --git a/widget/src/components/UserSubscription.tsx b/widget/src/components/UserSubscription.tsx index 487be242..56b7c7aa 100644 --- a/widget/src/components/UserSubscription.tsx +++ b/widget/src/components/UserSubscription.tsx @@ -6,7 +6,6 @@ * 2. All derivative works must include clear attribution to the original creator and software, Hexastack and Hexabot, in a prominent location (e.g., in the software's "About" section, documentation, and README file). */ - import React, { SyntheticEvent, useCallback, diff --git a/widget/src/utils/SocketIoClient.ts b/widget/src/utils/SocketIoClient.ts index 9a9f55a0..958a8d77 100644 --- a/widget/src/utils/SocketIoClient.ts +++ b/widget/src/utils/SocketIoClient.ts @@ -6,7 +6,6 @@ * 2. All derivative works must include clear attribution to the original creator and software, Hexastack and Hexabot, in a prominent location (e.g., in the software's "About" section, documentation, and README file). */ - import { io, ManagerOptions, Socket, SocketOptions } from "socket.io-client"; import { Config } from "../types/config.types"; diff --git a/widget/src/utils/attachment.ts b/widget/src/utils/attachment.ts index 80c47c94..4bbf4efd 100644 --- a/widget/src/utils/attachment.ts +++ b/widget/src/utils/attachment.ts @@ -6,7 +6,6 @@ * 2. All derivative works must include clear attribution to the original creator and software, Hexastack and Hexabot, in a prominent location (e.g., in the software's "About" section, documentation, and README file). */ - import { FileType } from "../types/message.types"; export function getFileType(mimeType: string): FileType {