Feat: Run eslint when the project is running to standardize everyone's code #9377 (#9379)

### What problem does this PR solve?

Feat: Run eslint when the project is running to standardize everyone's
code #9377

### Type of change


- [x] New Feature (non-breaking change which adds functionality)
This commit is contained in:
balibabu
2025-08-11 15:31:38 +08:00
committed by GitHub
parent f022504ef9
commit a060672b31
62 changed files with 330 additions and 179 deletions

View File

@ -39,7 +39,7 @@ const CommandInput = React.forwardRef<
React.ElementRef<typeof CommandPrimitive.Input>,
React.ComponentPropsWithoutRef<typeof CommandPrimitive.Input>
>(({ className, ...props }, ref) => (
<div className="flex items-center border-b px-3" cmdk-input-wrapper="">
<div className="flex items-center border-b px-3" data-cmdk-input-wrapper="">
<Search className="mr-2 h-4 w-4 shrink-0 opacity-50" />
<CommandPrimitive.Input
ref={ref}

View File

@ -196,7 +196,7 @@ export const MultiSelect = React.forwardRef<
animation = 0,
maxCount = 3,
modalPopover = false,
asChild = false,
// asChild = false,
className,
showSelectAll = true,
...props

View File

@ -26,7 +26,7 @@ const SIDEBAR_WIDTH_MOBILE = '18rem';
const SIDEBAR_WIDTH_ICON = '3rem';
const SIDEBAR_KEYBOARD_SHORTCUT = 'b';
type SidebarContext = {
type SidebarContextType = {
state: 'expanded' | 'collapsed';
open: boolean;
setOpen: (open: boolean) => void;
@ -36,7 +36,7 @@ type SidebarContext = {
toggleSidebar: () => void;
};
const SidebarContext = React.createContext<SidebarContext | null>(null);
const SidebarContext = React.createContext<SidebarContextType | null>(null);
function useSidebar() {
const context = React.useContext(SidebarContext);
@ -116,7 +116,7 @@ const SidebarProvider = React.forwardRef<
// This makes it easier to style the sidebar with Tailwind classes.
const state = open ? 'expanded' : 'collapsed';
const contextValue = React.useMemo<SidebarContext>(
const contextValue = React.useMemo<SidebarContextType>(
() => ({
state,
open,
@ -580,11 +580,8 @@ const SidebarMenuButton = React.forwardRef<
return button;
}
if (typeof tooltip === 'string') {
tooltip = {
children: tooltip,
};
}
const tooltipContent =
typeof tooltip === 'string' ? { children: tooltip } : tooltip;
return (
<Tooltip>
@ -593,7 +590,7 @@ const SidebarMenuButton = React.forwardRef<
side="right"
align="center"
hidden={state !== 'collapsed' || isMobile}
{...tooltip}
{...tooltipContent}
/>
</Tooltip>
);