fix eslint type error

This commit is contained in:
oiov
2025-10-20 12:13:14 +08:00
parent b9a80d4df4
commit d75ec5fda2
11 changed files with 19 additions and 2577 deletions

View File

@@ -15,7 +15,9 @@
"tailwindcss/enforces-shorthand": "off",
"react/no-unescaped-entities": "off",
"@next/next/no-img-element": "off",
"@typescript-eslint/no-unused-vars": "off"
"@typescript-eslint/no-unused-vars": "off",
"react-hooks/exhaustive-deps": "off",
"tailwindcss/migration-from-tailwind-2": "off"
},
"settings": {
"tailwindcss": {

View File

@@ -207,7 +207,7 @@ export default function UserFileList({
const renderFileLinks = (file: UserFileData, index: number) => (
<>
<div className="flex items-center gap-2">
<Icons.fileText className="size-3 flex-shrink-0" />
<Icons.fileText className="size-3 shrink-0" />
<p className="line-clamp-1 truncate rounded-md bg-neutral-100 p-1.5 text-xs dark:bg-neutral-800">
{file.path}
</p>
@@ -215,7 +215,7 @@ export default function UserFileList({
</div>
{file.shortUrlId && (
<div className="flex items-center gap-2">
<Icons.unLink className="size-3 flex-shrink-0 text-blue-500" />
<Icons.unLink className="size-3 shrink-0 text-blue-500" />
<Link
href={"https://" + shortLinks[index]}
className="line-clamp-1 truncate rounded-md bg-neutral-100 p-1.5 text-xs hover:text-blue-500 dark:bg-neutral-800"
@@ -230,7 +230,7 @@ export default function UserFileList({
</div>
)}
<div className="flex items-center gap-2">
<Icons.link className="size-3 flex-shrink-0" />
<Icons.link className="size-3 shrink-0" />
<Link
href={getFileUrl(file.path)}
className="line-clamp-1 truncate rounded-md bg-neutral-100 p-1.5 text-xs hover:text-blue-500 dark:bg-neutral-800"
@@ -241,7 +241,7 @@ export default function UserFileList({
<CopyButton className="size-6" value={getFileUrl(file.path)} />
</div>
<div className="flex items-center gap-2">
<Icons.type className="size-3 flex-shrink-0" />
<Icons.type className="size-3 shrink-0" />
<p className="line-clamp-1 truncate rounded-md bg-neutral-100 p-1.5 text-xs hover:text-blue-500 dark:bg-neutral-800">
{`[${file.name}](${getFileUrl(file.path)})`}
</p>
@@ -252,7 +252,7 @@ export default function UserFileList({
</div>
{file.mimeType.startsWith("image/") && (
<div className="flex items-center gap-2">
<Icons.code className="size-3 flex-shrink-0" />
<Icons.code className="size-3 shrink-0" />
<p className="line-clamp-1 truncate rounded-md bg-neutral-100 p-1.5 text-xs hover:text-blue-500 dark:bg-neutral-800">
{`<img src="${getFileUrl(file.path)}" alt="${file.name}">${getFileUrl(file.path)}</img>`}
</p>

View File

@@ -170,7 +170,7 @@ export function CircularStorageIndicator({ bucketUsage, size = 32 }) {
className="relative flex cursor-pointer items-center"
style={{ width: size, height: size }}
>
<svg width={size} height={size} className="-rotate-90 transform">
<svg width={size} height={size} className="-rotate-90">
{/* 背景圆圈 */}
<circle
cx={size / 2}

View File

@@ -304,7 +304,7 @@ export function LandingImages() {
</Collapsible>
</div>
</div>
<div className="overflow-clip rounded-xl border py-4 md:p-3.5 lg:col-span-7">
<div className="text-clip rounded-xl border py-4 md:p-3.5 lg:col-span-7">
<div className="flex size-full items-center justify-center rounded-lg border p-3 md:bg-muted/50">
<Image
className="size-[350px] rounded-lg transition-all hover:border hover:opacity-90 hover:shadow-xl"
@@ -403,7 +403,7 @@ export function LandingImages() {
</Collapsible>
</div>
</div>
<div className="overflow-clip rounded-xl border py-4 md:p-3.5 lg:col-span-7">
<div className="text-clip rounded-xl border py-4 md:p-3.5 lg:col-span-7">
<div className="flex size-full items-center justify-center rounded-lg border p-3 md:bg-muted/50">
<Image
className="size-[350px] rounded-lg transition-all hover:border hover:opacity-90 hover:shadow-xl"
@@ -477,7 +477,7 @@ export function LandingImages() {
</Collapsible>
</div>
</div>
<div className="overflow-clip rounded-xl border py-4 md:p-3.5 lg:col-span-7">
<div className="text-clip rounded-xl border py-4 md:p-3.5 lg:col-span-7">
<div className="flex size-full items-center justify-center rounded-lg border p-3 md:bg-muted/50">
<Image
className="size-[350px] rounded-lg transition-all hover:border hover:opacity-90 hover:shadow-xl"
@@ -585,7 +585,7 @@ export function LandingImages() {
</Collapsible>
</div>
</div>
<div className="overflow-clip rounded-xl border py-4 md:p-3.5 lg:col-span-7">
<div className="text-clip rounded-xl border py-4 md:p-3.5 lg:col-span-7">
<div className="flex size-full items-center justify-center rounded-lg border p-3 md:bg-muted/50">
<Image
className="size-[350px] rounded-lg transition-all hover:border hover:opacity-90 hover:shadow-xl"
@@ -679,7 +679,7 @@ export function LandingImages() {
</Collapsible>
</div>
</div>
<div className="overflow-clip rounded-xl border py-4 md:p-3.5 lg:col-span-7">
<div className="text-clip rounded-xl border py-4 md:p-3.5 lg:col-span-7">
<div className="flex size-full items-center justify-center rounded-lg border p-3 md:bg-muted/50">
<Image
className="size-[350px] rounded-lg transition-all hover:border hover:opacity-90 hover:shadow-xl"
@@ -764,7 +764,7 @@ export function LandingImages() {
</Collapsible>
</div>
</div>
<div className="overflow-clip rounded-xl border py-4 md:p-3.5 lg:col-span-7">
<div className="text-clip rounded-xl border py-4 md:p-3.5 lg:col-span-7">
<div className="flex size-full items-center justify-center rounded-lg border p-3 md:bg-muted/50">
<Image
className="size-[350px] rounded-lg transition-all hover:border hover:opacity-90 hover:shadow-xl"

View File

@@ -47,7 +47,6 @@ export interface ImageUploadNodeOptions {
* @default {}
* @example { class: 'foo' }
*/
// eslint-disable-next-line @typescript-eslint/no-explicit-any
HTMLAttributes: Record<string, any>;
}

View File

@@ -162,10 +162,8 @@ export const TooltipTrigger = React.forwardRef<
const context = useTooltipContext();
const childrenRef = React.isValidElement(children)
? parseInt(React.version, 10) >= 19
? // eslint-disable-next-line @typescript-eslint/no-explicit-any
(children as { props: { ref?: React.Ref<any> } }).props.ref
: // eslint-disable-next-line @typescript-eslint/no-explicit-any
(children as any).ref
? (children as { props: { ref?: React.Ref<any> } }).props.ref
: (children as any).ref
: undefined;
const ref = useMergeRefs([context.refs.setReference, propRef, childrenRef]);

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long