Skip to content

Commit

Permalink
chore: linter fix
Browse files Browse the repository at this point in the history
  • Loading branch information
tea-artist committed Oct 12, 2023
1 parent 88519a9 commit 1287e0f
Show file tree
Hide file tree
Showing 67 changed files with 178 additions and 178 deletions.
2 changes: 1 addition & 1 deletion apps/nestjs-backend/src/share-db/share-db.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ import { AuthModule } from '../features/auth/auth.module';
import { CalculationModule } from '../features/calculation/calculation.module';
import { TableModule } from '../features/table/table.module';
import { UserModule } from '../features/user/user.module';
import { WsDerivateService } from './ws-derivate.service';
import { ShareDbService } from './share-db.service';
import { SqliteDbAdapter } from './sqlite.adapter';
import { WsAuthService } from './ws-auth.service';
import { WsDerivateService } from './ws-derivate.service';

@Module({
imports: [TableModule, CalculationModule, AuthModule, UserModule],
Expand Down
2 changes: 1 addition & 1 deletion apps/nextjs-app/src/components/Banner.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ export const Banner: FC<Props> = () => {
<div className="order-3 mt-2 w-full shrink-0 sm:order-2 sm:mt-0 sm:w-auto">
<a
href="#"
className="flex items-center justify-center rounded-md border border-transparent bg-white py-2 px-4 text-sm font-medium text-indigo-600 shadow-sm hover:bg-indigo-50"
className="flex items-center justify-center rounded-md border border-transparent bg-white px-4 py-2 text-sm font-medium text-indigo-600 shadow-sm hover:bg-indigo-50"
>
Learn more
</a>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ export const BaseSideBar = () => {
>
<Link href={href} className="font-normal">
<Icon className="h-4 w-4 shrink-0" />
<p className="overflow-hidden text-ellipsis whitespace-nowrap">{text}</p>
<p className="truncate">{text}</p>
<div className="grow basis-0"></div>
<p className="text-xs text-slate-500">{shortCutKey}</p>
</Link>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ import { SideBarHeader } from './SideBarHeader';

export const SideBar = () => {
return (
<div className="flex h-full flex-col overflow-hidden basis-[300px]">
<div className="flex h-full basis-[300px] flex-col overflow-hidden">
<SideBarHeader />
<div className="divide-base-300 divide-y divide-solid flex flex-col overflow-hidden py-2 gap-2">
<div className="divide-base-300 flex flex-col gap-2 divide-y divide-solid overflow-hidden py-2">
<BaseSideBar />
</div>
<div className="grow basis-0"></div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,12 @@ export const SideBarHeader: React.FC = () => {
};

return (
<div className="flex m-2 gap-1 items-center">
<div className="group w-6 h-6 relative shrink-0 cursor-pointer" onClick={backSpace}>
<TeableNew className="absolute top-0 w-6 h-6 group-hover:opacity-0" />
<ChevronsLeft className="absolute top-0 w-6 h-6 opacity-0 group-hover:opacity-100" />
<div className="m-2 flex items-center gap-1">
<div className="group relative h-6 w-6 shrink-0 cursor-pointer" onClick={backSpace}>
<TeableNew className="absolute top-0 h-6 w-6 group-hover:opacity-0" />
<ChevronsLeft className="absolute top-0 h-6 w-6 opacity-0 group-hover:opacity-100" />
</div>
<p className="text-sm overflow-hidden text-ellipsis whitespace-nowrap">{data?.data.name}</p>
<p className="truncate text-sm">{data?.data.name}</p>
<div className="grow basis-0"></div>
{isHydrated && <ThemePicker className="px-1" />}
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ export const Dashboard = () => {
isBounded
>
{layout.map((v) => (
<div className="border border-slate-600 rounded-lg" key={v.i}>
<div className="rounded-lg border border-slate-600" key={v.i}>
{v.chartInstance && <Chart chartInstance={v.chartInstance} />}
</div>
))}
Expand Down
12 changes: 6 additions & 6 deletions apps/nextjs-app/src/features/app/blocks/graph/Graph.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ export const Graph: React.FC = () => {

return (
<Rnd
className="absolute top-20 right-10 bg-background rounded shadow border"
className="absolute right-10 top-20 rounded border bg-background shadow"
size={{ width, height }}
position={{ x, y }}
onDragStop={(e, d) => {
Expand All @@ -159,22 +159,22 @@ export const Graph: React.FC = () => {
<Button
variant={'ghost'}
size="xs"
className="absolute top-2 right-2"
className="absolute right-2 top-2"
onClick={() => closeGraph()}
>
<X className="w-4 h-4" />
<X className="h-4 w-4" />
</Button>
<div className="absolute top-0 left-0 p-2 flex text-xs gap-2">
<div className="absolute left-0 top-0 flex gap-2 p-2 text-xs">
{tables.map((table) => {
return (
<div key={table.color} className="flex gap-1 justify-center items-center">
<div key={table.color} className="flex items-center justify-center gap-1">
<span>{table.name}</span>
<span className="h-2 w-2" style={{ backgroundColor: table.color }}></span>
</div>
);
})}
</div>
<div ref={ref} className="w-full h-full"></div>
<div ref={ref} className="h-full w-full"></div>
</Rnd>
);
};
Expand Down
2 changes: 1 addition & 1 deletion apps/nextjs-app/src/features/app/blocks/grid/Grid.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,7 @@ const GridBase: ForwardRefRenderFunction<IGridRef, IGridProps> = (props, forward
const { rowInitSize, columnInitSize } = coordInstance;

return (
<div className="w-full h-full" style={style} ref={ref}>
<div className="h-full w-full" style={style} ref={ref}>
<div ref={containerRef} tabIndex={0} className="relative outline-none">
<InteractionLayer
ref={interactionLayerRef}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ const InfiniteScrollerBase: ForwardRefRenderFunction<ScrollerRef, ScrollerProps>
<>
<div
ref={horizontalScrollRef}
className="absolute will-change-transform cursor-pointer overflow-x-scroll overflow-y-hidden h-4 left-0 bottom-[2px] scrollbar scrollbar-h-[10px] scrollbar-thumb-rounded-md scrollbar-thumb-foreground/40"
className="absolute bottom-[2px] left-0 h-4 cursor-pointer overflow-y-hidden overflow-x-scroll will-change-transform scrollbar scrollbar-thumb-foreground/40 scrollbar-thumb-rounded-md scrollbar-h-[10px]"
style={{
left,
width: containerWidth - left,
Expand All @@ -204,14 +204,14 @@ const InfiniteScrollerBase: ForwardRefRenderFunction<ScrollerRef, ScrollerProps>
</div>
<div
ref={verticalScrollRef}
className="absolute will-change-transform cursor-pointer overflow-x-hidden overflow-y-scroll w-4 right-[2px] scrollbar scrollbar-w-[10px] scrollbar-thumb-rounded-md scrollbar-thumb-foreground/40 scrollbar-min-thumb"
className="absolute right-[2px] w-4 cursor-pointer overflow-x-hidden overflow-y-scroll will-change-transform scrollbar scrollbar-thumb-foreground/40 scrollbar-thumb-rounded-md scrollbar-w-[10px] scrollbar-min-thumb"
style={{
top,
height: containerHeight - top,
}}
onScroll={(e) => onScroll(e, 'vertical')}
>
<div className="flex flex-col shrink-0">{placeholderElements}</div>
<div className="flex shrink-0 flex-col">{placeholderElements}</div>
</div>
</>
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -488,7 +488,7 @@ export const InteractionLayerBase: ForwardRefRenderFunction<
>
<div
ref={stageRef}
className="w-full h-full"
className="h-full w-full"
onClick={onSmartClick}
onMouseUp={onMouseUp}
onMouseDown={onMouseDown}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ const BooleanEditorBase: ForwardRefRenderFunction<
};

return (
<div onKeyDown={onKeyDown} className="w-0 h-0">
<input ref={focusRef} className="w-0 h-0 p-0 outline-none border-none shadow-none" />
<div onKeyDown={onKeyDown} className="h-0 w-0">
<input ref={focusRef} className="h-0 w-0 border-none p-0 shadow-none outline-none" />
</div>
);
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,7 @@ export const EditorContainerBase: ForwardRefRenderFunction<
}

return (
<div className="click-outside-ignore absolute top-0 left-0 pointer-events-none">
<div className="click-outside-ignore pointer-events-none absolute left-0 top-0">
<div className="absolute z-10" style={wrapStyle} onKeyDown={onKeyDown}>
{!readonly && (
<>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,8 @@ const RatingEditorBase: ForwardRefRenderFunction<
};

return (
<div onKeyDown={onKeyDown} className="w-0 h-0">
<input ref={focusRef} className="w-0 h-0 p-0 outline-none border-none shadow-none" />
<div onKeyDown={onKeyDown} className="h-0 w-0">
<input ref={focusRef} className="h-0 w-0 border-none p-0 shadow-none outline-none" />
</div>
);
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ const SelectEditorBase: ForwardRefRenderFunction<
};

return (
<Command className="rounded-sm shadow-sm p-2 border" style={style}>
<Command className="rounded-sm border p-2 shadow-sm" style={style}>
<CommandInput ref={inputRef} placeholder="Search" />
<CommandList>
<CommandEmpty>No found.</CommandEmpty>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ const TextEditorBase: ForwardRefRenderFunction<
value={value}
width={'100%'}
height={'100%'}
className="border-2 shadow-none h-full w-full focus-visible:ring-transparent px-2"
className="h-full w-full border-2 px-2 shadow-none focus-visible:ring-transparent"
onChange={onChangeInner}
/>
);
Expand Down
10 changes: 5 additions & 5 deletions apps/nextjs-app/src/features/app/blocks/space/BaseCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -76,14 +76,14 @@ export const BaseCard: FC<IBaseCard> = (props) => {
className={classNames('group cursor-pointer hover:shadow-md', className)}
onClick={intoBase}
>
<CardContent className="w-full h-full flex items-center px-4 py-6">
<Database className="min-w-[3.5rem] w-14 h-14" />
<div className="flex-1 h-full overflow-hidden">
<div className="flex justify-between items-center gap-3 p-0.5">
<CardContent className="flex h-full w-full items-center px-4 py-6">
<Database className="h-14 w-14 min-w-[3.5rem]" />
<div className="h-full flex-1 overflow-hidden">
<div className="flex items-center justify-between gap-3 p-0.5">
{renaming ? (
<Input
ref={inputRef}
className="flex-1 h-7"
className="h-7 flex-1"
value={baseName}
onChange={(e) => setBaseName(e.target.value)}
onBlur={toggleRenameBase}
Expand Down
8 changes: 4 additions & 4 deletions apps/nextjs-app/src/features/app/blocks/space/SpaceCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -76,11 +76,11 @@ export const SpaceCard: FC<ISpaceCard> = (props) => {
return (
<Card className="w-full">
<CardHeader className="pt-5">
<div className="flex justify-between items-center gap-3">
<div className="flex items-center justify-between gap-3">
{renaming ? (
<Input
ref={inputRef}
className="flex-1 h-7"
className="h-7 flex-1"
value={spaceName}
onChange={(e) => setSpaceName(e.target.value)}
onBlur={(e) => toggleUpdateSpace(e)}
Expand Down Expand Up @@ -114,11 +114,11 @@ export const SpaceCard: FC<ISpaceCard> = (props) => {
{bases?.length ? (
<div className="flex flex-wrap gap-4">
{bases.map((base) => (
<BaseCard key={base.id} className="min-w-[17rem] flex-1 h-24" base={base} />
<BaseCard key={base.id} className="h-24 min-w-[17rem] flex-1" base={base} />
))}
</div>
) : (
<div className="w-full h-24 flex items-center justify-center">
<div className="flex h-24 w-full items-center justify-center">
This workspace is empty
</div>
)}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,11 @@ export const SpaceInnerPage: FC = () => {
const space = spaceData?.data;

return (
<div ref={ref} className="w-full h-screen flex flex-col py-8">
<div className="flex px-12 justify-between items-center">
<div ref={ref} className="flex h-screen w-full flex-col py-8">
<div className="flex items-center justify-between px-12">
<h4>{space?.name}</h4>
</div>
<div className="flex-1 px-12 pt-8 space-y-8 overflow-y-auto">
<div className="flex-1 space-y-8 overflow-y-auto px-12 pt-8">
{space && (
<SpaceCard
key={space.id}
Expand Down
8 changes: 4 additions & 4 deletions apps/nextjs-app/src/features/app/blocks/space/SpacePage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -34,14 +34,14 @@ export const SpacePage: FC = () => {
});

return (
<div ref={ref} className="w-full h-screen flex flex-col py-8">
<div className="flex px-12 justify-between items-center">
<div ref={ref} className="flex h-screen w-full flex-col py-8">
<div className="flex items-center justify-between px-12">
<h4>All Workspaces</h4>
<Button size={'sm'} disabled={isLoading} onClick={() => createSpaceMutator({})}>
{isLoading && <Spin className="w-3 h-3" />}Create a workspace
{isLoading && <Spin className="h-3 w-3" />}Create a workspace
</Button>
</div>
<div className="flex-1 px-12 pt-8 space-y-8 overflow-y-auto">
<div className="flex-1 space-y-8 overflow-y-auto px-12 pt-8">
{spaceList?.data.map((space) => (
<SpaceCard
key={space.id}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ import { SpaceSideBar } from './SpaceSideBar';

export const SideBar = () => {
return (
<div className="flex h-full flex-col overflow-hidden basis-[300px]">
<div className="flex h-full basis-[300px] flex-col overflow-hidden">
<SideBarHeader />
<div className="divide-base-300 divide-y divide-solid flex flex-col overflow-hidden py-2 gap-2">
<div className="divide-base-300 flex flex-col gap-2 divide-y divide-solid overflow-hidden py-2">
<SpaceSideBar />
</div>
<div className="grow basis-0"></div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ export const SideBarHeader: React.FC = () => {
const isHydrated = useIsHydrated();

return (
<div className="flex m-2 gap-1 items-center">
<TeableNew className="w-6 h-6 shrink-0" />
<p className="text-sm overflow-hidden text-ellipsis whitespace-nowrap">Table</p>
<div className="m-2 flex items-center gap-1">
<TeableNew className="h-6 w-6 shrink-0" />
<p className="truncate text-sm">Table</p>
<div className="grow basis-0"></div>
{isHydrated && <ThemePicker className="px-1" />}
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@ export const SpaceItem: React.FC<IProps> = ({ space, isActive }) => {
}}
title={name}
>
<Component className="w-4 h-4 shrink-0" />
<p className="grow overflow-hidden text-ellipsis whitespace-nowrap">{' ' + name}</p>
<Component className="h-4 w-4 shrink-0" />
<p className="grow truncate">{' ' + name}</p>
</Link>
</Button>
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ export const SpaceList: FC = () => {
});

return (
<div className="pt-4 flex flex-col overflow-hidden gap-2">
<div className="flex flex-col gap-2 overflow-hidden pt-4">
<div className="px-3">
<Button
variant={'outline'}
Expand All @@ -38,10 +38,10 @@ export const SpaceList: FC = () => {
className="w-full"
onClick={() => addSpace({})}
>
{isLoading ? <Spin className="w-3 h-3" /> : <Plus />}
{isLoading ? <Spin className="h-3 w-3" /> : <Plus />}
</Button>
</div>
<div className="px-3 overflow-y-auto">
<div className="overflow-y-auto px-3">
<ul>
{spaceList?.data.map((space) => (
<li key={space.id}>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ export const SpaceSideBar = () => {
>
<Link href={href} className="font-normal">
<Icon className="h-4 w-4 shrink-0" />
<p className="overflow-hidden text-ellipsis whitespace-nowrap">{text}</p>
<p className="truncate">{text}</p>
<div className="grow basis-0"></div>
<p className="text-xs text-slate-500">{shortCutKey}</p>
</Link>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,13 @@ export const TableList: React.FC = () => {
const addTable = useAddTable();

return (
<div className="pt-4 flex flex-col overflow-hidden gap-2">
<div className="flex flex-col gap-2 overflow-hidden pt-4">
<div className="px-3">
<Button variant={'outline'} size={'xs'} className="w-full" onClick={addTable}>
<AddBoldIcon />
</Button>
</div>
<div className="px-3 overflow-y-auto">
<div className="overflow-y-auto px-3">
{connected ? <DraggableList /> : <NoDraggableList />}
</div>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,9 @@ export const TableListItem: React.FC<IProps> = ({ table, isActive }) => {
}
}}
>
{table.icon || <Table2 className="w-4 h-4 shrink-0" />}
<p className="grow overflow-hidden text-ellipsis whitespace-nowrap">{' ' + table.name}</p>
<DeleteTable tableId={table.id} className="w-4 h-4 hidden group-hover:block shrink-0" />
{table.icon || <Table2 className="h-4 w-4 shrink-0" />}
<p className="grow truncate">{' ' + table.name}</p>
<DeleteTable tableId={table.id} className="hidden h-4 w-4 shrink-0 group-hover:block" />
</Link>
</Button>
{isEditing && (
Expand All @@ -65,7 +65,7 @@ export const TableListItem: React.FC<IProps> = ({ table, isActive }) => {
style={{
boxShadow: 'none',
}}
className="round-none outline-none top-0 left-0 w-full cursor-text absolute h-full px-4 bg-background"
className="round-none absolute left-0 top-0 h-full w-full cursor-text bg-background px-4 outline-none"
// eslint-disable-next-line jsx-a11y/no-autofocus
autoFocus
onBlur={(e) => {
Expand Down
Loading

0 comments on commit 1287e0f

Please sign in to comment.