fix: linting issues and rule changes (#5681)
* fix: lint config package updates * fix: tsconfig changes * fix: lint config setup * fix: lint errors and adding new rules * fix: lint errors * fix: ui and editor lints * fix: build error * fix: editor tsconfig * fix: lint errors * fix: types fixes --------- Co-authored-by: Anmol Singh Bhatia <anmolsinghbhatia@plane.so> Co-authored-by: Aaryan Khandelwal <aaryankhandu123@gmail.com>
This commit is contained in:
parent
e143e0a051
commit
83bfca6f2d
75 changed files with 1583 additions and 2631 deletions
|
|
@ -25,6 +25,7 @@ export interface IBadgeStyling {
|
|||
};
|
||||
}
|
||||
|
||||
// TODO: convert them to objects instead of enums
|
||||
enum badgeSizeStyling {
|
||||
sm = `px-2.5 py-1 font-medium text-xs rounded flex items-center gap-1.5 whitespace-nowrap transition-all justify-center inline`,
|
||||
md = `px-4 py-1.5 font-medium text-sm rounded flex items-center gap-1.5 whitespace-nowrap transition-all justify-center inline`,
|
||||
|
|
@ -32,10 +33,12 @@ enum badgeSizeStyling {
|
|||
xl = `px-5 py-3 font-medium text-sm rounded flex items-center gap-1.5 whitespace-nowrap transition-all justify-center inline`,
|
||||
}
|
||||
|
||||
// TODO: convert them to objects instead of enums
|
||||
enum badgeIconStyling {
|
||||
sm = "h-3 w-3 flex justify-center items-center overflow-hidden flex-shrink-0",
|
||||
md = "h-3.5 w-3.5 flex justify-center items-center overflow-hidden flex-shrink-0",
|
||||
lg = "h-4 w-4 flex justify-center items-center overflow-hidden flex-shrink-0",
|
||||
// eslint-disable-next-line @typescript-eslint/no-duplicate-enum-values
|
||||
xl = "h-4 w-4 flex justify-center items-center overflow-hidden flex-shrink-0",
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -33,7 +33,7 @@ enum buttonIconStyling {
|
|||
sm = "h-3 w-3 flex justify-center items-center overflow-hidden my-0.5 flex-shrink-0",
|
||||
md = "h-3.5 w-3.5 flex justify-center items-center overflow-hidden my-0.5 flex-shrink-0",
|
||||
lg = "h-4 w-4 flex justify-center items-center overflow-hidden my-0.5 flex-shrink-0",
|
||||
xl = "h-4 w-4 flex justify-center items-center overflow-hidden my-0.5 flex-shrink-0",
|
||||
xl = "h-4 w-4 flex justify-center items-center overflow-hidden my-0.5 flex-shrink-0 ",
|
||||
}
|
||||
|
||||
export const buttonStyling: IButtonStyling = {
|
||||
|
|
|
|||
|
|
@ -105,7 +105,6 @@ export const MultiSelectDropdown: FC<IMultiSelectDropdown> = (props) => {
|
|||
(option) => !(value ?? []).includes(option.data[option.value]),
|
||||
() => sortByKey && sortByKey.toLowerCase(),
|
||||
]);
|
||||
// eslint-disable-next-line react-hooks/exhaustive-deps
|
||||
}, [query, options]);
|
||||
|
||||
// hooks
|
||||
|
|
|
|||
|
|
@ -105,7 +105,6 @@ export const Dropdown: FC<ISingleSelectDropdown> = (props) => {
|
|||
(option) => !(value ?? []).includes(option.data[option.value]),
|
||||
() => sortByKey && sortByKey.toLowerCase(),
|
||||
]);
|
||||
// eslint-disable-next-line react-hooks/exhaustive-deps
|
||||
}, [query, options]);
|
||||
|
||||
// hooks
|
||||
|
|
|
|||
|
|
@ -38,7 +38,7 @@ const ComboDropDown = forwardRef((props: Props, ref) => {
|
|||
};
|
||||
|
||||
useEffect(() => {
|
||||
const element = dropDownButtonRef.current;
|
||||
const element = dropDownButtonRef.current as any;
|
||||
|
||||
if (!element) return;
|
||||
|
||||
|
|
@ -58,7 +58,8 @@ const ComboDropDown = forwardRef((props: Props, ref) => {
|
|||
}
|
||||
|
||||
return (
|
||||
// @ts-ignore
|
||||
// eslint-disable-next-line @typescript-eslint/prefer-ts-expect-error, @typescript-eslint/ban-ts-comment
|
||||
// @ts-expect-error
|
||||
<Combobox {...rest} ref={ref}>
|
||||
<Combobox.Button as={Fragment}>{button}</Combobox.Button>
|
||||
{children}
|
||||
|
|
|
|||
|
|
@ -102,7 +102,7 @@ export const CustomEmojiIconPicker: React.FC<TCustomEmojiPicker> = (props) => {
|
|||
type: EmojiIconPickerTypes.EMOJI,
|
||||
value: val,
|
||||
});
|
||||
if (closeOnSelect) close();
|
||||
if (closeOnSelect) handleToggle(false);
|
||||
}}
|
||||
height="20rem"
|
||||
width="100%"
|
||||
|
|
@ -121,7 +121,7 @@ export const CustomEmojiIconPicker: React.FC<TCustomEmojiPicker> = (props) => {
|
|||
type: EmojiIconPickerTypes.ICON,
|
||||
value: val,
|
||||
});
|
||||
if (closeOnSelect) close();
|
||||
if (closeOnSelect) handleToggle(false);
|
||||
}}
|
||||
/>
|
||||
</Tab.Panel>
|
||||
|
|
|
|||
|
|
@ -27,7 +27,7 @@ export const LinearProgressIndicator: React.FC<Props> = ({
|
|||
backgroundColor: item.color,
|
||||
};
|
||||
progress += item.value;
|
||||
if (noTooltip) return <div style={style} />;
|
||||
if (noTooltip) return <div style={style} key={item.id} />;
|
||||
else
|
||||
return (
|
||||
<Tooltip key={item.id} tooltipContent={`${item.name} ${Math.round(item.value)}${inPercentage ? "%" : ""}`}>
|
||||
|
|
|
|||
|
|
@ -54,7 +54,7 @@ export const Tooltip: React.FC<ITooltipProps> = ({
|
|||
};
|
||||
|
||||
useEffect(() => {
|
||||
const element = toolTipRef.current;
|
||||
const element = toolTipRef.current as any;
|
||||
|
||||
if (!element) return;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue