mirror of
https://github.com/hexastack/hexabot
synced 2025-01-22 18:45:57 +00:00
Merge pull request #237 from Hexastack/236-issue-frontend-imports-order
fix(frontend): eslint imports order
This commit is contained in:
commit
96fe7faabc
@ -20,7 +20,8 @@
|
||||
"unknown", // <- unknown
|
||||
"index", // <- index imports
|
||||
"internal", // <- Absolute imports
|
||||
["sibling", "parent"] // <- Relative imports, the sibling and parent types they can be mingled together
|
||||
"parent", // <- Relative imports, the sibling and parent types they can be mingled together
|
||||
"sibling"
|
||||
],
|
||||
"newlines-between": "always",
|
||||
"alphabetize": {
|
||||
|
@ -34,9 +34,10 @@ import { EntityType } from "@/services/types";
|
||||
import { PermissionAction } from "@/types/permission.types";
|
||||
import { getDateTimeFormatter } from "@/utils/date";
|
||||
|
||||
import { CategoryDialog } from "./CategoryDialog";
|
||||
import { ICategory } from "../../types/category.types";
|
||||
|
||||
import { CategoryDialog } from "./CategoryDialog";
|
||||
|
||||
export const Categories = () => {
|
||||
const { t } = useTranslate();
|
||||
const { toast } = useToast();
|
||||
|
@ -23,8 +23,6 @@ import { useConfig } from "@/hooks/useConfig";
|
||||
import { useTranslate } from "@/hooks/useTranslate";
|
||||
import { EntityType } from "@/services/types";
|
||||
|
||||
import { ChatActions } from "./ChatActions";
|
||||
import { ChatHeader } from "./ChatHeader";
|
||||
import {
|
||||
getAvatarSrc,
|
||||
getMessageContent,
|
||||
@ -33,6 +31,9 @@ import {
|
||||
import { useChat } from "../hooks/ChatContext";
|
||||
import { useInfinitedLiveMessages } from "../hooks/useInfiniteLiveMessages";
|
||||
|
||||
import { ChatActions } from "./ChatActions";
|
||||
import { ChatHeader } from "./ChatHeader";
|
||||
|
||||
export function Chat() {
|
||||
const { apiUrl } = useConfig();
|
||||
const { t, i18n } = useTranslate();
|
||||
|
@ -14,9 +14,10 @@ import { useNormalizedInfiniteQuery } from "@/hooks/crud/useNormalizedInfiniteQu
|
||||
import { EntityType, QueryType } from "@/services/types";
|
||||
import { useSubscribe } from "@/websocket/socket-hooks";
|
||||
|
||||
import { useChat } from "./ChatContext";
|
||||
import { SocketMessageEvents } from "../types";
|
||||
|
||||
import { useChat } from "./ChatContext";
|
||||
|
||||
export const useInfinitedLiveMessages = () => {
|
||||
const { subscriber: activeChat } = useChat();
|
||||
const queryClient = useQueryClient();
|
||||
|
@ -35,11 +35,12 @@ import { useTranslate } from "@/hooks/useTranslate";
|
||||
import { EntityType } from "@/services/types";
|
||||
import { OutgoingMessageFormat } from "@/types/message.types";
|
||||
|
||||
import { IBlockAttributes, IBlock } from "../../types/block.types";
|
||||
|
||||
import BlockFormProvider from "./form/BlockFormProvider";
|
||||
import { MessageForm } from "./form/MessageForm";
|
||||
import { OptionsForm } from "./form/OptionsForm";
|
||||
import { TriggersForm } from "./form/TriggersForm";
|
||||
import { IBlockAttributes, IBlock } from "../../types/block.types";
|
||||
|
||||
export type BlockDialogProps = DialogControlProps<IBlock>;
|
||||
type TSelectedTab = "triggers" | "options" | "messages";
|
||||
|
@ -17,9 +17,10 @@ import { Pattern } from "@/types/block.types";
|
||||
import { SXStyleOptions } from "@/utils/SXStyleOptions";
|
||||
import { createValueWithId, ValueWithId } from "@/utils/valueWithId";
|
||||
|
||||
import PatternInput from "./PatternInput";
|
||||
import { getInputControls } from "../../utils/inputControls";
|
||||
|
||||
import PatternInput from "./PatternInput";
|
||||
|
||||
type PatternsInputProps = {
|
||||
value: Pattern[];
|
||||
onChange: (patterns: Pattern[]) => void;
|
||||
|
@ -52,11 +52,12 @@ import { IBlock } from "@/types/block.types";
|
||||
import { ICategory } from "@/types/category.types";
|
||||
import { BlockPorts } from "@/types/visual-editor.types";
|
||||
|
||||
import { AdvancedLinkModel } from "./AdvancedLink/AdvancedLinkModel";
|
||||
import BlockDialog from "../BlockDialog";
|
||||
import { ZOOM_LEVEL } from "../constants";
|
||||
import { useVisualEditor } from "../hooks/useVisualEditor";
|
||||
|
||||
import { AdvancedLinkModel } from "./AdvancedLink/AdvancedLinkModel";
|
||||
|
||||
const Diagrams = () => {
|
||||
const { t } = useTranslate();
|
||||
const [model, setModel] = useState<
|
||||
|
@ -11,9 +11,10 @@ import { useMutation, useQueryClient } from "react-query";
|
||||
import { QueryType, TMutationOptions } from "@/services/types";
|
||||
import { IBaseSchema, IDynamicProps, TType } from "@/types/base.types";
|
||||
|
||||
import { isSameEntity, useNormalizeAndCache } from "./helpers";
|
||||
import { useEntityApiClient } from "../useApiClient";
|
||||
|
||||
import { isSameEntity, useNormalizeAndCache } from "./helpers";
|
||||
|
||||
export const useCreate = <
|
||||
TEntity extends IDynamicProps["entity"],
|
||||
TAttr = TType<TEntity>["attributes"],
|
||||
|
@ -16,9 +16,10 @@ import {
|
||||
TType,
|
||||
} from "@/types/base.types";
|
||||
|
||||
import { isSameEntity } from "./helpers";
|
||||
import { useEntityApiClient } from "../useApiClient";
|
||||
|
||||
import { isSameEntity } from "./helpers";
|
||||
|
||||
export const useDelete = <
|
||||
TEntity extends IDynamicProps["entity"],
|
||||
TAttr = TType<TEntity>["attributes"],
|
||||
|
@ -11,9 +11,10 @@ import { useMutation, useQueryClient } from "react-query";
|
||||
import { QueryType, TMutationOptions } from "@/services/types";
|
||||
import { IBaseSchema, IDynamicProps, TType } from "@/types/base.types";
|
||||
|
||||
import { isSameEntity } from "./helpers";
|
||||
import { useEntityApiClient } from "../useApiClient";
|
||||
|
||||
import { isSameEntity } from "./helpers";
|
||||
|
||||
export const useDeleteMany = <
|
||||
TEntity extends IDynamicProps["entity"],
|
||||
TAttr = TType<TEntity>["attributes"],
|
||||
|
@ -23,11 +23,12 @@ import {
|
||||
TType,
|
||||
} from "@/types/base.types";
|
||||
|
||||
import { useEntityApiClient } from "../useApiClient";
|
||||
import { usePagination } from "../usePagination";
|
||||
|
||||
import { useNormalizeAndCache } from "./helpers";
|
||||
import { useCount } from "./useCount";
|
||||
import { useGetFromCache } from "./useGet";
|
||||
import { useEntityApiClient } from "../useApiClient";
|
||||
import { usePagination } from "../usePagination";
|
||||
|
||||
export const useFind = <
|
||||
TDynamicProps extends IDynamicProps,
|
||||
|
@ -18,9 +18,10 @@ import {
|
||||
TType,
|
||||
} from "@/types/base.types";
|
||||
|
||||
import { useNormalizeAndCache } from "./helpers";
|
||||
import { useEntityApiClient } from "../useApiClient";
|
||||
|
||||
import { useNormalizeAndCache } from "./helpers";
|
||||
|
||||
export const useGet = <
|
||||
TDynamicProps extends IDynamicProps,
|
||||
TAttr = TType<TDynamicProps["entity"]>["attributes"],
|
||||
|
@ -23,9 +23,10 @@ import {
|
||||
TType,
|
||||
} from "@/types/base.types";
|
||||
|
||||
import { useEntityApiClient } from "../useApiClient";
|
||||
|
||||
import { useNormalizeAndCache } from "./helpers";
|
||||
import { useGetFromCache } from "./useGet";
|
||||
import { useEntityApiClient } from "../useApiClient";
|
||||
|
||||
export const useInfiniteFind = <
|
||||
TDynamicProps extends IDynamicProps,
|
||||
|
@ -23,11 +23,12 @@ import {
|
||||
TType,
|
||||
} from "@/types/base.types";
|
||||
|
||||
import { useNormalizeAndCache } from "./helpers";
|
||||
import { useGetFromCache } from "./useGet";
|
||||
import { useEntityApiClient } from "../useApiClient";
|
||||
import { toPageQueryPayload } from "../usePagination";
|
||||
|
||||
import { useNormalizeAndCache } from "./helpers";
|
||||
import { useGetFromCache } from "./useGet";
|
||||
|
||||
const PAGE_SIZE = 20;
|
||||
|
||||
export const useNormalizedInfiniteQuery = <
|
||||
|
@ -17,9 +17,10 @@ import {
|
||||
} from "@/types/base.types";
|
||||
import { merge } from "@/utils/object";
|
||||
|
||||
import { useEntityApiClient } from "../useApiClient";
|
||||
|
||||
import { useNormalizeAndCache } from "./helpers";
|
||||
import { useGetFromCache } from "./useGet";
|
||||
import { useEntityApiClient } from "../useApiClient";
|
||||
|
||||
export const useUpdate = <
|
||||
TEntity extends IDynamicProps["entity"],
|
||||
|
@ -11,9 +11,10 @@ import { useMutation, useQueryClient } from "react-query";
|
||||
import { QueryType, TMutationOptions } from "@/services/types";
|
||||
import { IBaseSchema, IDynamicProps, TType } from "@/types/base.types";
|
||||
|
||||
import { isSameEntity, useNormalizeAndCache } from "./helpers";
|
||||
import { useEntityApiClient } from "../useApiClient";
|
||||
|
||||
import { isSameEntity, useNormalizeAndCache } from "./helpers";
|
||||
|
||||
export const useUpload = <
|
||||
TEntity extends IDynamicProps["entity"],
|
||||
TAttr = TType<TEntity>["attributes"],
|
||||
|
Loading…
Reference in New Issue
Block a user