fix: eslint fixes and file formatting
This commit is contained in:
parent
473dfc7a5b
commit
53ddef1cd5
954 changed files with 3921 additions and 3809 deletions
|
|
@ -1,10 +1,10 @@
|
|||
// helpers
|
||||
import { Tooltip } from "@plane/ui";
|
||||
import { cn } from "helpers/common.helper";
|
||||
import { cn } from "@/helpers/common.helper";
|
||||
// types
|
||||
import { usePlatformOS } from "@/hooks/use-platform-os";
|
||||
import { BACKGROUND_BUTTON_VARIANTS, BORDER_BUTTON_VARIANTS } from "./constants";
|
||||
import { TButtonVariants } from "./types";
|
||||
import { usePlatformOS } from "hooks/use-platform-os";
|
||||
|
||||
export type DropdownButtonProps = {
|
||||
children: React.ReactNode;
|
||||
|
|
@ -51,7 +51,12 @@ const BorderButton: React.FC<ButtonProps> = (props) => {
|
|||
const { isMobile } = usePlatformOS();
|
||||
|
||||
return (
|
||||
<Tooltip tooltipHeading={tooltipHeading} tooltipContent={tooltipContent} disabled={!showTooltip} isMobile={isMobile}>
|
||||
<Tooltip
|
||||
tooltipHeading={tooltipHeading}
|
||||
tooltipContent={tooltipContent}
|
||||
disabled={!showTooltip}
|
||||
isMobile={isMobile}
|
||||
>
|
||||
<div
|
||||
className={cn(
|
||||
"h-full flex items-center gap-1.5 border-[0.5px] border-custom-border-300 hover:bg-custom-background-80 rounded text-xs px-2 py-0.5",
|
||||
|
|
@ -69,7 +74,12 @@ const BackgroundButton: React.FC<ButtonProps> = (props) => {
|
|||
const { children, className, tooltipContent, tooltipHeading, showTooltip } = props;
|
||||
const { isMobile } = usePlatformOS();
|
||||
return (
|
||||
<Tooltip tooltipHeading={tooltipHeading} tooltipContent={tooltipContent} disabled={!showTooltip} isMobile={isMobile}>
|
||||
<Tooltip
|
||||
tooltipHeading={tooltipHeading}
|
||||
tooltipContent={tooltipContent}
|
||||
disabled={!showTooltip}
|
||||
isMobile={isMobile}
|
||||
>
|
||||
<div
|
||||
className={cn(
|
||||
"h-full flex items-center gap-1.5 rounded text-xs px-2 py-0.5 bg-custom-background-80",
|
||||
|
|
@ -86,7 +96,12 @@ const TransparentButton: React.FC<ButtonProps> = (props) => {
|
|||
const { children, className, isActive, tooltipContent, tooltipHeading, showTooltip } = props;
|
||||
const { isMobile } = usePlatformOS();
|
||||
return (
|
||||
<Tooltip tooltipHeading={tooltipHeading} tooltipContent={tooltipContent} disabled={!showTooltip} isMobile={isMobile}>
|
||||
<Tooltip
|
||||
tooltipHeading={tooltipHeading}
|
||||
tooltipContent={tooltipContent}
|
||||
disabled={!showTooltip}
|
||||
isMobile={isMobile}
|
||||
>
|
||||
<div
|
||||
className={cn(
|
||||
"h-full flex items-center gap-1.5 rounded text-xs px-2 py-0.5 hover:bg-custom-background-80",
|
||||
|
|
|
|||
|
|
@ -3,15 +3,15 @@ import { Placement } from "@popperjs/core";
|
|||
import { observer } from "mobx-react";
|
||||
import { usePopper } from "react-popper";
|
||||
// components
|
||||
import { Check, Search } from "lucide-react";
|
||||
import { Combobox } from "@headlessui/react";
|
||||
// icon
|
||||
import { Check, Search } from "lucide-react";
|
||||
import { TCycleGroups } from "@plane/types";
|
||||
// ui
|
||||
import { ContrastIcon, CycleGroupIcon } from "@plane/ui";
|
||||
// store hooks
|
||||
import { useApplication, useCycle } from "hooks/store";
|
||||
import { useApplication, useCycle } from "@/hooks/store";
|
||||
// types
|
||||
import { TCycleGroups } from "@plane/types";
|
||||
|
||||
type DropdownOptions =
|
||||
| {
|
||||
|
|
|
|||
|
|
@ -1,13 +1,13 @@
|
|||
import { Fragment, ReactNode, useRef, useState } from "react";
|
||||
import { observer } from "mobx-react-lite";
|
||||
import { Combobox } from "@headlessui/react";
|
||||
import { ChevronDown } from "lucide-react";
|
||||
import { Combobox } from "@headlessui/react";
|
||||
// hooks
|
||||
import { ContrastIcon } from "@plane/ui";
|
||||
import { cn } from "helpers/common.helper";
|
||||
import { useCycle } from "hooks/store";
|
||||
import { useDropdownKeyDown } from "hooks/use-dropdown-key-down";
|
||||
import useOutsideClickDetector from "hooks/use-outside-click-detector";
|
||||
import { cn } from "@/helpers/common.helper";
|
||||
import { useCycle } from "@/hooks/store";
|
||||
import { useDropdownKeyDown } from "@/hooks/use-dropdown-key-down";
|
||||
import useOutsideClickDetector from "@/hooks/use-outside-click-detector";
|
||||
// components
|
||||
import { DropdownButton } from "../buttons";
|
||||
// icons
|
||||
|
|
|
|||
|
|
@ -2,17 +2,17 @@ import React, { useEffect, useRef, useState } from "react";
|
|||
import { Placement } from "@popperjs/core";
|
||||
import { DateRange, DayPicker, Matcher } from "react-day-picker";
|
||||
import { usePopper } from "react-popper";
|
||||
import { Combobox } from "@headlessui/react";
|
||||
import { ArrowRight, CalendarDays } from "lucide-react";
|
||||
import { Combobox } from "@headlessui/react";
|
||||
// hooks
|
||||
// components
|
||||
// ui
|
||||
import { Button } from "@plane/ui";
|
||||
// helpers
|
||||
import { cn } from "helpers/common.helper";
|
||||
import { renderFormattedDate } from "helpers/date-time.helper";
|
||||
import { useDropdownKeyDown } from "hooks/use-dropdown-key-down";
|
||||
import useOutsideClickDetector from "hooks/use-outside-click-detector";
|
||||
import { cn } from "@/helpers/common.helper";
|
||||
import { renderFormattedDate } from "@/helpers/date-time.helper";
|
||||
import { useDropdownKeyDown } from "@/hooks/use-dropdown-key-down";
|
||||
import useOutsideClickDetector from "@/hooks/use-outside-click-detector";
|
||||
import { DropdownButton } from "./buttons";
|
||||
// types
|
||||
import { TButtonVariants } from "./types";
|
||||
|
|
|
|||
|
|
@ -1,14 +1,14 @@
|
|||
import React, { useRef, useState } from "react";
|
||||
import { DayPicker, Matcher } from "react-day-picker";
|
||||
import { usePopper } from "react-popper";
|
||||
import { Combobox } from "@headlessui/react";
|
||||
import { CalendarDays, X } from "lucide-react";
|
||||
import { Combobox } from "@headlessui/react";
|
||||
// helpers
|
||||
import { cn } from "helpers/common.helper";
|
||||
import { renderFormattedDate, getDate } from "helpers/date-time.helper";
|
||||
import { cn } from "@/helpers/common.helper";
|
||||
import { renderFormattedDate, getDate } from "@/helpers/date-time.helper";
|
||||
// hooks
|
||||
import { useDropdownKeyDown } from "hooks/use-dropdown-key-down";
|
||||
import useOutsideClickDetector from "hooks/use-outside-click-detector";
|
||||
import { useDropdownKeyDown } from "@/hooks/use-dropdown-key-down";
|
||||
import useOutsideClickDetector from "@/hooks/use-outside-click-detector";
|
||||
// components
|
||||
import { DropdownButton } from "./buttons";
|
||||
// types
|
||||
|
|
|
|||
|
|
@ -2,13 +2,13 @@ import { Fragment, ReactNode, useEffect, useRef, useState } from "react";
|
|||
import sortBy from "lodash/sortBy";
|
||||
import { observer } from "mobx-react-lite";
|
||||
import { usePopper } from "react-popper";
|
||||
import { Combobox } from "@headlessui/react";
|
||||
import { Check, ChevronDown, Search, Triangle } from "lucide-react";
|
||||
import { Combobox } from "@headlessui/react";
|
||||
// hooks
|
||||
import { cn } from "helpers/common.helper";
|
||||
import { useApplication, useEstimate } from "hooks/store";
|
||||
import { useDropdownKeyDown } from "hooks/use-dropdown-key-down";
|
||||
import useOutsideClickDetector from "hooks/use-outside-click-detector";
|
||||
import { cn } from "@/helpers/common.helper";
|
||||
import { useApplication, useEstimate } from "@/hooks/store";
|
||||
import { useDropdownKeyDown } from "@/hooks/use-dropdown-key-down";
|
||||
import useOutsideClickDetector from "@/hooks/use-outside-click-detector";
|
||||
// components
|
||||
import { DropdownButton } from "./buttons";
|
||||
// helpers
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
import { observer } from "mobx-react-lite";
|
||||
// hooks
|
||||
import { Avatar, AvatarGroup, UserGroupIcon } from "@plane/ui";
|
||||
import { useMember } from "hooks/store";
|
||||
import { useMember } from "@/hooks/store";
|
||||
// ui
|
||||
|
||||
type AvatarProps = {
|
||||
|
|
|
|||
|
|
@ -1,12 +1,12 @@
|
|||
import { Fragment, useRef, useState } from "react";
|
||||
import { observer } from "mobx-react-lite";
|
||||
import { Combobox } from "@headlessui/react";
|
||||
import { ChevronDown } from "lucide-react";
|
||||
import { Combobox } from "@headlessui/react";
|
||||
// hooks
|
||||
import { cn } from "helpers/common.helper";
|
||||
import { useMember } from "hooks/store";
|
||||
import { useDropdownKeyDown } from "hooks/use-dropdown-key-down";
|
||||
import useOutsideClickDetector from "hooks/use-outside-click-detector";
|
||||
import { cn } from "@/helpers/common.helper";
|
||||
import { useMember } from "@/hooks/store";
|
||||
import { useDropdownKeyDown } from "@/hooks/use-dropdown-key-down";
|
||||
import useOutsideClickDetector from "@/hooks/use-outside-click-detector";
|
||||
// components
|
||||
import { DropdownButton } from "../buttons";
|
||||
import { BUTTON_VARIANTS_WITH_TEXT } from "../constants";
|
||||
|
|
|
|||
|
|
@ -2,12 +2,12 @@ import { useEffect, useRef, useState } from "react";
|
|||
import { Placement } from "@popperjs/core";
|
||||
import { observer } from "mobx-react";
|
||||
import { usePopper } from "react-popper";
|
||||
import { Check, Search } from "lucide-react";
|
||||
import { Combobox } from "@headlessui/react";
|
||||
//components
|
||||
import { Check, Search } from "lucide-react";
|
||||
import { Avatar } from "@plane/ui";
|
||||
//store
|
||||
import { useApplication, useMember, useUser } from "hooks/store";
|
||||
import { useApplication, useMember, useUser } from "@/hooks/store";
|
||||
//hooks
|
||||
//icon
|
||||
//types
|
||||
|
|
|
|||
|
|
@ -1,14 +1,14 @@
|
|||
import { Fragment, ReactNode, useEffect, useRef, useState } from "react";
|
||||
import { observer } from "mobx-react-lite";
|
||||
import { Combobox } from "@headlessui/react";
|
||||
import { ChevronDown, X } from "lucide-react";
|
||||
import { Combobox } from "@headlessui/react";
|
||||
// hooks
|
||||
import { DiceIcon, Tooltip } from "@plane/ui";
|
||||
import { cn } from "helpers/common.helper";
|
||||
import { useModule } from "hooks/store";
|
||||
import { useDropdownKeyDown } from "hooks/use-dropdown-key-down";
|
||||
import useOutsideClickDetector from "hooks/use-outside-click-detector";
|
||||
import { usePlatformOS } from "hooks/use-platform-os";
|
||||
import { cn } from "@/helpers/common.helper";
|
||||
import { useModule } from "@/hooks/store";
|
||||
import { useDropdownKeyDown } from "@/hooks/use-dropdown-key-down";
|
||||
import useOutsideClickDetector from "@/hooks/use-outside-click-detector";
|
||||
import { usePlatformOS } from "@/hooks/use-platform-os";
|
||||
// components
|
||||
import { DropdownButton } from "../buttons";
|
||||
// icons
|
||||
|
|
@ -94,7 +94,12 @@ const ButtonContent: React.FC<ButtonContentProps> = (props) => {
|
|||
>
|
||||
{!hideIcon && <DiceIcon className="h-2.5 w-2.5 flex-shrink-0" />}
|
||||
{!hideText && (
|
||||
<Tooltip tooltipHeading="Title" tooltipContent={moduleDetails?.name} disabled={!showTooltip} isMobile={isMobile}>
|
||||
<Tooltip
|
||||
tooltipHeading="Title"
|
||||
tooltipContent={moduleDetails?.name}
|
||||
disabled={!showTooltip}
|
||||
isMobile={isMobile}
|
||||
>
|
||||
<span className="max-w-40 flex-grow truncate text-xs font-medium">{moduleDetails?.name}</span>
|
||||
</Tooltip>
|
||||
)}
|
||||
|
|
|
|||
|
|
@ -2,13 +2,13 @@ import { useEffect, useRef, useState } from "react";
|
|||
import { Placement } from "@popperjs/core";
|
||||
import { observer } from "mobx-react";
|
||||
import { usePopper } from "react-popper";
|
||||
import { Check, Search } from "lucide-react";
|
||||
import { Combobox } from "@headlessui/react";
|
||||
//components
|
||||
import { Check, Search } from "lucide-react";
|
||||
import { DiceIcon } from "@plane/ui";
|
||||
//store
|
||||
import { cn } from "helpers/common.helper";
|
||||
import { useApplication, useModule } from "hooks/store";
|
||||
import { cn } from "@/helpers/common.helper";
|
||||
import { useApplication, useModule } from "@/hooks/store";
|
||||
//hooks
|
||||
//icon
|
||||
//types
|
||||
|
|
|
|||
|
|
@ -1,19 +1,19 @@
|
|||
import { Fragment, ReactNode, useEffect, useRef, useState } from "react";
|
||||
import { useTheme } from "next-themes";
|
||||
import { usePopper } from "react-popper";
|
||||
import { Combobox } from "@headlessui/react";
|
||||
import { Check, ChevronDown, Search } from "lucide-react";
|
||||
import { Combobox } from "@headlessui/react";
|
||||
import { TIssuePriorities } from "@plane/types";
|
||||
// hooks
|
||||
import { PriorityIcon, Tooltip } from "@plane/ui";
|
||||
import { ISSUE_PRIORITIES } from "constants/issue";
|
||||
import { cn } from "helpers/common.helper";
|
||||
import { useDropdownKeyDown } from "hooks/use-dropdown-key-down";
|
||||
import useOutsideClickDetector from "hooks/use-outside-click-detector";
|
||||
import { usePlatformOS } from "hooks/use-platform-os";
|
||||
import { ISSUE_PRIORITIES } from "@/constants/issue";
|
||||
import { cn } from "@/helpers/common.helper";
|
||||
import { useDropdownKeyDown } from "@/hooks/use-dropdown-key-down";
|
||||
import useOutsideClickDetector from "@/hooks/use-outside-click-detector";
|
||||
import { usePlatformOS } from "@/hooks/use-platform-os";
|
||||
// icons
|
||||
// helpers
|
||||
// types
|
||||
import { TIssuePriorities } from "@plane/types";
|
||||
import { BACKGROUND_BUTTON_VARIANTS, BORDER_BUTTON_VARIANTS, BUTTON_VARIANTS_WITHOUT_TEXT } from "./constants";
|
||||
import { TDropdownProps } from "./types";
|
||||
// constants
|
||||
|
|
@ -65,7 +65,12 @@ const BorderButton = (props: ButtonProps) => {
|
|||
const { isMobile } = usePlatformOS();
|
||||
|
||||
return (
|
||||
<Tooltip tooltipHeading="Priority" tooltipContent={priorityDetails?.title ?? "None"} disabled={!showTooltip} isMobile={isMobile}>
|
||||
<Tooltip
|
||||
tooltipHeading="Priority"
|
||||
tooltipContent={priorityDetails?.title ?? "None"}
|
||||
disabled={!showTooltip}
|
||||
isMobile={isMobile}
|
||||
>
|
||||
<div
|
||||
className={cn(
|
||||
"h-full flex items-center gap-1.5 border-[0.5px] rounded text-xs px-2 py-0.5",
|
||||
|
|
@ -136,7 +141,12 @@ const BackgroundButton = (props: ButtonProps) => {
|
|||
const { isMobile } = usePlatformOS();
|
||||
|
||||
return (
|
||||
<Tooltip tooltipHeading="Priority" tooltipContent={priorityDetails?.title ?? "None"} disabled={!showTooltip} isMobile={isMobile}>
|
||||
<Tooltip
|
||||
tooltipHeading="Priority"
|
||||
tooltipContent={priorityDetails?.title ?? "None"}
|
||||
disabled={!showTooltip}
|
||||
isMobile={isMobile}
|
||||
>
|
||||
<div
|
||||
className={cn(
|
||||
"h-full flex items-center gap-1.5 rounded text-xs px-2 py-0.5",
|
||||
|
|
@ -208,7 +218,12 @@ const TransparentButton = (props: ButtonProps) => {
|
|||
const { isMobile } = usePlatformOS();
|
||||
|
||||
return (
|
||||
<Tooltip tooltipHeading="Priority" tooltipContent={priorityDetails?.title ?? "None"} disabled={!showTooltip} isMobile={isMobile}>
|
||||
<Tooltip
|
||||
tooltipHeading="Priority"
|
||||
tooltipContent={priorityDetails?.title ?? "None"}
|
||||
disabled={!showTooltip}
|
||||
isMobile={isMobile}
|
||||
>
|
||||
<div
|
||||
className={cn(
|
||||
"h-full flex items-center gap-1.5 rounded text-xs px-2 py-0.5 hover:bg-custom-background-80",
|
||||
|
|
|
|||
|
|
@ -1,21 +1,21 @@
|
|||
import { Fragment, ReactNode, useEffect, useRef, useState } from "react";
|
||||
import { observer } from "mobx-react-lite";
|
||||
import { usePopper } from "react-popper";
|
||||
import { Combobox } from "@headlessui/react";
|
||||
import { Check, ChevronDown, Search } from "lucide-react";
|
||||
import { Combobox } from "@headlessui/react";
|
||||
import { IProject } from "@plane/types";
|
||||
// hooks
|
||||
import { cn } from "helpers/common.helper";
|
||||
import { useProject } from "hooks/store";
|
||||
import { useDropdownKeyDown } from "hooks/use-dropdown-key-down";
|
||||
import useOutsideClickDetector from "hooks/use-outside-click-detector";
|
||||
import { ProjectLogo } from "@/components/project";
|
||||
import { cn } from "@/helpers/common.helper";
|
||||
import { useProject } from "@/hooks/store";
|
||||
import { useDropdownKeyDown } from "@/hooks/use-dropdown-key-down";
|
||||
import useOutsideClickDetector from "@/hooks/use-outside-click-detector";
|
||||
// components
|
||||
import { DropdownButton } from "./buttons";
|
||||
import { ProjectLogo } from "components/project";
|
||||
// helpers
|
||||
// types
|
||||
import { BUTTON_VARIANTS_WITH_TEXT } from "./constants";
|
||||
import { TDropdownProps } from "./types";
|
||||
import { IProject } from "@plane/types";
|
||||
// constants
|
||||
|
||||
type Props = TDropdownProps & {
|
||||
|
|
|
|||
|
|
@ -1,14 +1,14 @@
|
|||
import { Fragment, ReactNode, useEffect, useRef, useState } from "react";
|
||||
import { observer } from "mobx-react-lite";
|
||||
import { usePopper } from "react-popper";
|
||||
import { Combobox } from "@headlessui/react";
|
||||
import { Check, ChevronDown, Search } from "lucide-react";
|
||||
import { Combobox } from "@headlessui/react";
|
||||
// hooks
|
||||
import { StateGroupIcon } from "@plane/ui";
|
||||
import { cn } from "helpers/common.helper";
|
||||
import { useApplication, useProjectState } from "hooks/store";
|
||||
import { useDropdownKeyDown } from "hooks/use-dropdown-key-down";
|
||||
import useOutsideClickDetector from "hooks/use-outside-click-detector";
|
||||
import { cn } from "@/helpers/common.helper";
|
||||
import { useApplication, useProjectState } from "@/hooks/store";
|
||||
import { useDropdownKeyDown } from "@/hooks/use-dropdown-key-down";
|
||||
import useOutsideClickDetector from "@/hooks/use-outside-click-detector";
|
||||
// components
|
||||
import { DropdownButton } from "./buttons";
|
||||
// icons
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue