diff --git a/api/.eslintrc.js b/api/.eslintrc.js index 317391e4..0340c221 100644 --- a/api/.eslintrc.js +++ b/api/.eslintrc.js @@ -89,5 +89,6 @@ module.exports = { ], 2, ], + 'no-multiple-empty-lines': ['error', { max: 1 }], }, }; diff --git a/frontend/.eslintrc.js b/frontend/.eslintrc.js index 779cc483..eebea971 100644 --- a/frontend/.eslintrc.js +++ b/frontend/.eslintrc.js @@ -70,6 +70,7 @@ module.exports = { ], 2, ], + "no-multiple-empty-lines": ["error", { max: 1 }], }, settings: { react: { diff --git a/frontend/src/app-components/attachment/AttachmentInput.tsx b/frontend/src/app-components/attachment/AttachmentInput.tsx index f3fb71dc..e17587c5 100644 --- a/frontend/src/app-components/attachment/AttachmentInput.tsx +++ b/frontend/src/app-components/attachment/AttachmentInput.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 { Box, FormHelperText, FormLabel } from "@mui/material"; import { forwardRef } from "react"; diff --git a/frontend/src/app-components/attachment/MultipleAttachmentInput.tsx b/frontend/src/app-components/attachment/MultipleAttachmentInput.tsx index fb4accc7..013706c5 100644 --- a/frontend/src/app-components/attachment/MultipleAttachmentInput.tsx +++ b/frontend/src/app-components/attachment/MultipleAttachmentInput.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 { Box, Button, FormHelperText, FormLabel } from "@mui/material"; import { forwardRef, useState } from "react"; diff --git a/frontend/src/app-components/inputs/AvatarInput.tsx b/frontend/src/app-components/inputs/AvatarInput.tsx index 6141c62f..1c5864a1 100644 --- a/frontend/src/app-components/inputs/AvatarInput.tsx +++ b/frontend/src/app-components/inputs/AvatarInput.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 { Avatar, Box, FormHelperText, FormLabel } from "@mui/material"; import { forwardRef, useState } from "react"; diff --git a/frontend/src/app-components/inputs/FileInput.tsx b/frontend/src/app-components/inputs/FileInput.tsx index c6da510b..23b28fb8 100644 --- a/frontend/src/app-components/inputs/FileInput.tsx +++ b/frontend/src/app-components/inputs/FileInput.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 UploadIcon from "@mui/icons-material/Upload"; import { Button, CircularProgress } from "@mui/material"; import { ChangeEvent, forwardRef } from "react"; diff --git a/frontend/src/app-components/tables/columns/renderPicture.tsx b/frontend/src/app-components/tables/columns/renderPicture.tsx index d723a31e..5e4803b9 100644 --- a/frontend/src/app-components/tables/columns/renderPicture.tsx +++ b/frontend/src/app-components/tables/columns/renderPicture.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 { Grid } from "@mui/material"; import { GridRenderCellParams } from "@mui/x-data-grid"; diff --git a/frontend/src/components/content-types/components/FieldInput.tsx b/frontend/src/components/content-types/components/FieldInput.tsx index 74455ac4..42057e96 100644 --- a/frontend/src/components/content-types/components/FieldInput.tsx +++ b/frontend/src/components/content-types/components/FieldInput.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 DeleteOutlineIcon from "@mui/icons-material/DeleteOutline"; import { MenuItem } from "@mui/material"; import { useEffect } from "react"; diff --git a/frontend/src/components/inbox/components/Carousel.tsx b/frontend/src/components/inbox/components/Carousel.tsx index d1e57c40..328e91f4 100644 --- a/frontend/src/components/inbox/components/Carousel.tsx +++ b/frontend/src/components/inbox/components/Carousel.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 ArrowBackIosNewIcon from "@mui/icons-material/ArrowBackIosNew"; import ArrowForwardIosIcon from "@mui/icons-material/ArrowForwardIos"; import { diff --git a/frontend/src/components/inbox/components/ConversationsList.tsx b/frontend/src/components/inbox/components/ConversationsList.tsx index 88ef4c5f..7f230daf 100644 --- a/frontend/src/components/inbox/components/ConversationsList.tsx +++ b/frontend/src/components/inbox/components/ConversationsList.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 { Avatar, Conversation, diff --git a/frontend/src/components/labels/index.tsx b/frontend/src/components/labels/index.tsx index 152f12cb..6eebf7b5 100644 --- a/frontend/src/components/labels/index.tsx +++ b/frontend/src/components/labels/index.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 { faTags } from "@fortawesome/free-solid-svg-icons"; import AddIcon from "@mui/icons-material/Add"; import { Button, Grid, Paper } from "@mui/material"; diff --git a/frontend/src/components/media-library/index.tsx b/frontend/src/components/media-library/index.tsx index 4602b557..15ea6854 100644 --- a/frontend/src/components/media-library/index.tsx +++ b/frontend/src/components/media-library/index.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 DriveFolderUploadIcon from "@mui/icons-material/DriveFolderUpload"; import { Box, Grid, Paper } from "@mui/material"; import { GridColDef, GridEventListener } from "@mui/x-data-grid"; diff --git a/frontend/src/components/nlp/components/NlpEntity.tsx b/frontend/src/components/nlp/components/NlpEntity.tsx index 71ef8119..097f1db5 100644 --- a/frontend/src/components/nlp/components/NlpEntity.tsx +++ b/frontend/src/components/nlp/components/NlpEntity.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 AddIcon from "@mui/icons-material/Add"; import DeleteIcon from "@mui/icons-material/Delete"; import { Button, Chip, Grid } from "@mui/material"; diff --git a/frontend/src/components/nlp/components/NlpSample.tsx b/frontend/src/components/nlp/components/NlpSample.tsx index 84a5697b..da28d1a3 100644 --- a/frontend/src/components/nlp/components/NlpSample.tsx +++ b/frontend/src/components/nlp/components/NlpSample.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 CircleIcon from "@mui/icons-material/Circle"; import ClearIcon from "@mui/icons-material/Clear"; import DeleteIcon from "@mui/icons-material/Delete"; diff --git a/frontend/src/components/nlp/index.tsx b/frontend/src/components/nlp/index.tsx index b8e7a755..fbf4b5fe 100644 --- a/frontend/src/components/nlp/index.tsx +++ b/frontend/src/components/nlp/index.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 { faGraduationCap } from "@fortawesome/free-solid-svg-icons"; import { Grid, Paper, Tab, Tabs } from "@mui/material"; import dynamic from "next/dynamic"; diff --git a/frontend/src/components/profile/profile.tsx b/frontend/src/components/profile/profile.tsx index 2723d102..5b30b99b 100644 --- a/frontend/src/components/profile/profile.tsx +++ b/frontend/src/components/profile/profile.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 CheckIcon from "@mui/icons-material/Check"; import EmailIcon from "@mui/icons-material/Email"; import KeyIcon from "@mui/icons-material/Key"; diff --git a/frontend/src/components/settings/SettingInput.tsx b/frontend/src/components/settings/SettingInput.tsx index 3bd53e85..b6df2348 100644 --- a/frontend/src/components/settings/SettingInput.tsx +++ b/frontend/src/components/settings/SettingInput.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 KeyIcon from "@mui/icons-material/Key"; import { FormControlLabel, MenuItem, Switch } from "@mui/material"; import { ControllerRenderProps } from "react-hook-form"; diff --git a/frontend/src/components/visual-editor/constants.ts b/frontend/src/components/visual-editor/constants.ts index 2dcc132d..cdd4349b 100644 --- a/frontend/src/components/visual-editor/constants.ts +++ b/frontend/src/components/visual-editor/constants.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 { IBlockAttributes } from "@/types/block.types"; import { ButtonType, diff --git a/frontend/src/components/visual-editor/form/AttachmentMessageForm.tsx b/frontend/src/components/visual-editor/form/AttachmentMessageForm.tsx index 13cb4877..d823549d 100644 --- a/frontend/src/components/visual-editor/form/AttachmentMessageForm.tsx +++ b/frontend/src/components/visual-editor/form/AttachmentMessageForm.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 { Controller, useFormContext } from "react-hook-form"; import AttachmentInput from "@/app-components/attachment/AttachmentInput"; diff --git a/frontend/src/components/visual-editor/form/inputs/triggers/PatternInput.tsx b/frontend/src/components/visual-editor/form/inputs/triggers/PatternInput.tsx index cfbc86a4..0dbc6be9 100644 --- a/frontend/src/components/visual-editor/form/inputs/triggers/PatternInput.tsx +++ b/frontend/src/components/visual-editor/form/inputs/triggers/PatternInput.tsx @@ -1,5 +1,5 @@ /* - * Copyright © 2024 Hexastack. All rights reserved. + * Copyright © 2025 Hexastack. All rights reserved. * * Licensed under the GNU Affero General Public License v3.0 (AGPLv3) with the following additional terms: * 1. The name "Hexabot" is a trademark of Hexastack. You may not use this name in derivative works without express written permission. @@ -25,7 +25,6 @@ import { import { PostbackInput } from "./PostbackInput"; - const isRegex = (str: Pattern) => { return typeof str === "string" && str.startsWith("/") && str.endsWith("/"); }; diff --git a/frontend/src/components/visual-editor/v2/AdvancedLink/AdvancedLinkFactory.tsx b/frontend/src/components/visual-editor/v2/AdvancedLink/AdvancedLinkFactory.tsx index 969c03b8..7d9a6882 100644 --- a/frontend/src/components/visual-editor/v2/AdvancedLink/AdvancedLinkFactory.tsx +++ b/frontend/src/components/visual-editor/v2/AdvancedLink/AdvancedLinkFactory.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 { css, keyframes } from "@emotion/react"; import styled from "@emotion/styled"; import { diff --git a/frontend/src/components/visual-editor/v2/CustomCanvasWidget.tsx b/frontend/src/components/visual-editor/v2/CustomCanvasWidget.tsx index 5435932a..3ce9b93d 100644 --- a/frontend/src/components/visual-editor/v2/CustomCanvasWidget.tsx +++ b/frontend/src/components/visual-editor/v2/CustomCanvasWidget.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 styled from "@emotion/styled"; import { CanvasEngine, diff --git a/frontend/src/components/visual-editor/v2/CustomDiagramNodes/NodeWidget.tsx b/frontend/src/components/visual-editor/v2/CustomDiagramNodes/NodeWidget.tsx index f0db023b..d08f9e0b 100644 --- a/frontend/src/components/visual-editor/v2/CustomDiagramNodes/NodeWidget.tsx +++ b/frontend/src/components/visual-editor/v2/CustomDiagramNodes/NodeWidget.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 BrokenImageOutlinedIcon from "@mui/icons-material/BrokenImageOutlined"; import ChatBubbleOutlineOutlinedIcon from "@mui/icons-material/ChatBubbleOutlineOutlined"; import ExtensionOutlinedIcon from "@mui/icons-material/ExtensionOutlined"; diff --git a/frontend/src/hooks/useHasPermission.ts b/frontend/src/hooks/useHasPermission.ts index 0d9079c6..bd115747 100644 --- a/frontend/src/hooks/useHasPermission.ts +++ b/frontend/src/hooks/useHasPermission.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 { useCallback, useContext } from "react"; import { PermissionContext } from "@/contexts/permission.context"; diff --git a/frontend/src/layout/themes/theme.ts b/frontend/src/layout/themes/theme.ts index 84e9e0ef..4cf3a6c4 100644 --- a/frontend/src/layout/themes/theme.ts +++ b/frontend/src/layout/themes/theme.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 { Color, SimplePaletteColorOptions } from "@mui/material"; import { grey, teal } from "@mui/material/colors"; import { createTheme } from "@mui/material/styles"; diff --git a/frontend/src/pages/_app.tsx b/frontend/src/pages/_app.tsx index ca640433..6695c13c 100644 --- a/frontend/src/pages/_app.tsx +++ b/frontend/src/pages/_app.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 { CssBaseline } from "@mui/material"; import { StyledEngineProvider, ThemeProvider } from "@mui/material/styles"; import type { NextPage } from "next"; diff --git a/frontend/src/services/api.class.ts b/frontend/src/services/api.class.ts index 444d1acc..c31e3cb4 100644 --- a/frontend/src/services/api.class.ts +++ b/frontend/src/services/api.class.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 { AxiosInstance, AxiosResponse } from "axios"; import { AttachmentResourceRef } from "@/types/attachment.types"; diff --git a/frontend/src/services/entities.ts b/frontend/src/services/entities.ts index d3e955d6..7984adff 100644 --- a/frontend/src/services/entities.ts +++ b/frontend/src/services/entities.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 { schema } from "normalizr"; import { IBaseSchema } from "@/types/base.types"; @@ -305,7 +304,6 @@ export const LlmHelperEntity = new schema.Entity( }, ); - export const StorageHelperEntity = new schema.Entity( EntityType.STORAGE_HELPER, undefined, diff --git a/frontend/src/services/types.ts b/frontend/src/services/types.ts index be04592e..af357e02 100644 --- a/frontend/src/services/types.ts +++ b/frontend/src/services/types.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 { UseMutationOptions } from "react-query"; export enum EntityType { diff --git a/frontend/src/types/attachment.types.ts b/frontend/src/types/attachment.types.ts index 22a6c7ff..eb0962bb 100644 --- a/frontend/src/types/attachment.types.ts +++ b/frontend/src/types/attachment.types.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 { EntityType, Format } from "@/services/types"; import { IBaseSchema, IFormat, OmitPopulate } from "./base.types"; diff --git a/frontend/src/types/base.types.ts b/frontend/src/types/base.types.ts index 30239595..510189a3 100644 --- a/frontend/src/types/base.types.ts +++ b/frontend/src/types/base.types.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 { GridPaginationModel, GridSortModel } from "@mui/x-data-grid"; import { EntityType, Format } from "@/services/types"; diff --git a/frontend/src/types/block.types.ts b/frontend/src/types/block.types.ts index 2b40d51f..cda2a834 100644 --- a/frontend/src/types/block.types.ts +++ b/frontend/src/types/block.types.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 { EntityType, Format } from "@/services/types"; import { IBaseSchema, IFormat, OmitPopulate } from "./base.types"; diff --git a/frontend/src/types/model.types.ts b/frontend/src/types/model.types.ts index 51bccd40..cbb3391f 100644 --- a/frontend/src/types/model.types.ts +++ b/frontend/src/types/model.types.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 { EntityType, Format } from "@/services/types"; import { IBaseSchema, IFormat, OmitPopulate } from "./base.types"; diff --git a/frontend/src/types/user.types.ts b/frontend/src/types/user.types.ts index d9aa763e..49366818 100644 --- a/frontend/src/types/user.types.ts +++ b/frontend/src/types/user.types.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 { EntityType, Format } from "@/services/types"; import { IAttachment } from "./attachment.types"; 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 {