mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-07-18 02:26:21 +08:00
fix: temporarily turn off eslint for **ultra-low quality** code, because I don't have time to fix them one by one
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
import { displayFlex, keyframes, styled } from '@/styles';
|
||||
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
||||
// @ts-ignore
|
||||
import spring, { toString } from 'css-spring';
|
||||
import type { ItemStatus } from './type';
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
import { displayFlex, keyframes, styled } from '@/styles';
|
||||
import { CSSProperties } from 'react';
|
||||
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
||||
// @ts-ignore
|
||||
import spring, { toString } from 'css-spring';
|
||||
|
||||
|
||||
@@ -20,7 +20,7 @@ export const debounce = <T extends (...args: any) => any>(
|
||||
): ((...args: any) => any) => {
|
||||
let timeoutId: null | number;
|
||||
let defaultImmediate = immediate || false;
|
||||
let delay = time || 300;
|
||||
const delay = time || 300;
|
||||
return (...args: any) => {
|
||||
if (defaultImmediate) {
|
||||
fn.apply(this, args); // 确保引用函数的指向正确,并且函数的参数也不变
|
||||
@@ -30,6 +30,7 @@ export const debounce = <T extends (...args: any) => any>(
|
||||
if (timeoutId) {
|
||||
clearTimeout(timeoutId);
|
||||
}
|
||||
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
||||
// @ts-ignore
|
||||
timeoutId = setTimeout(() => {
|
||||
fn.apply(this, args);
|
||||
|
||||
@@ -6,6 +6,7 @@ export const tagName = 'simple-counter';
|
||||
|
||||
// Adapt React in order to be able to use custom tags properly
|
||||
declare global {
|
||||
// eslint-disable-next-line @typescript-eslint/no-namespace
|
||||
namespace JSX {
|
||||
interface IntrinsicElements {
|
||||
[tagName]: PersonInfoProps;
|
||||
|
||||
+1
@@ -71,6 +71,7 @@ export const WorkspaceCreate = ({ open, onClose }: WorkspaceCreateProps) => {
|
||||
const blobId = await createDefaultHeadImg(workspaceName);
|
||||
createWorkspace({ name: workspaceName, avatar: `/api/blob/${blobId}` })
|
||||
.then(data => {
|
||||
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
||||
// @ts-ignore
|
||||
router.push(`/workspace/${data.created_at}`);
|
||||
onClose();
|
||||
|
||||
+15
-13
@@ -8,19 +8,21 @@ import {
|
||||
|
||||
export const PrivateWorkspaceItem = () => {
|
||||
const { user } = useAppState();
|
||||
// @ts-ignore
|
||||
const Username = user.name;
|
||||
return !user ? null : (
|
||||
<PrivateWorkspaceWrapper>
|
||||
<WorkspaceItemAvatar alt={Username} src={user.avatar_url}>
|
||||
{Username}
|
||||
</WorkspaceItemAvatar>
|
||||
<WorkspaceItemContent>
|
||||
<Name title={Username}>{Username}</Name>
|
||||
<Email title={user.email}>{user.email}</Email>
|
||||
</WorkspaceItemContent>
|
||||
</PrivateWorkspaceWrapper>
|
||||
);
|
||||
if (user) {
|
||||
const Username = user.name;
|
||||
return (
|
||||
<PrivateWorkspaceWrapper>
|
||||
<WorkspaceItemAvatar alt={Username} src={user.avatar_url}>
|
||||
{Username}
|
||||
</WorkspaceItemAvatar>
|
||||
<WorkspaceItemContent>
|
||||
<Name title={Username}>{Username}</Name>
|
||||
<Email title={user.email}>{user.email}</Email>
|
||||
</WorkspaceItemContent>
|
||||
</PrivateWorkspaceWrapper>
|
||||
);
|
||||
}
|
||||
return null;
|
||||
};
|
||||
|
||||
const Name = styled('div')(({ theme }) => {
|
||||
|
||||
Reference in New Issue
Block a user