chore: enable no-unused vars (#2181)

This commit is contained in:
Himself65
2023-04-28 00:41:06 -05:00
committed by GitHub
parent b6ca2aa063
commit 70fbbb39c1
70 changed files with 206 additions and 225 deletions

View File

@@ -6,7 +6,7 @@ import {
} from '@affine/component';
import { Button } from '@affine/component';
export const StyledSplitLine = styled('div')(({ theme }) => {
export const StyledSplitLine = styled('div')(() => {
return {
width: '1px',
height: '20px',
@@ -15,7 +15,7 @@ export const StyledSplitLine = styled('div')(({ theme }) => {
};
});
export const StyleWorkspaceInfo = styled('div')(({ theme }) => {
export const StyleWorkspaceInfo = styled('div')(() => {
return {
marginLeft: '15px',
width: '202px',
@@ -36,7 +36,7 @@ export const StyleWorkspaceInfo = styled('div')(({ theme }) => {
};
});
export const StyleWorkspaceTitle = styled('div')(({ theme }) => {
export const StyleWorkspaceTitle = styled('div')(() => {
return {
fontSize: 'var(--affine-font-base)',
fontWeight: 600,
@@ -54,7 +54,7 @@ export const StyledFooter = styled('div')({
...displayFlex('space-between', 'center'),
});
export const StyleUserInfo = styled('div')(({ theme }) => {
export const StyleUserInfo = styled('div')(() => {
return {
textAlign: 'left',
marginLeft: '16px',
@@ -73,14 +73,14 @@ export const StyleUserInfo = styled('div')(({ theme }) => {
export const StyledModalHeaderLeft = styled('div')(() => {
return { ...displayFlex('flex-start', 'center') };
});
export const StyledModalTitle = styled('div')(({ theme }) => {
export const StyledModalTitle = styled('div')(() => {
return {
fontWeight: 600,
fontSize: 'var(--affine-font-h6)',
};
});
export const StyledHelperContainer = styled('div')(({ theme }) => {
export const StyledHelperContainer = styled('div')(() => {
return {
color: 'var(--affine-icon-color)',
marginLeft: '15px',
@@ -128,7 +128,7 @@ export const StyledModalHeader = styled('div')(() => {
};
});
export const StyledSignInButton = styled(Button)(({ theme }) => {
export const StyledSignInButton = styled(Button)(() => {
return {
fontWeight: 600,
paddingLeft: 0,

View File

@@ -2,7 +2,7 @@ import { displayFlex, positionAbsolute, styled } from '@affine/component';
export const StyledIsland = styled('div')<{
spread: boolean;
}>(({ theme, spread }) => {
}>(({ spread }) => {
return {
transition: 'box-shadow 0.2s',
width: '44px',
@@ -31,7 +31,7 @@ export const StyledIsland = styled('div')<{
},
};
});
export const StyledIconWrapper = styled('div')(({ theme }) => {
export const StyledIconWrapper = styled('div')(() => {
return {
color: 'var(--affine-icon-color)',
...displayFlex('center', 'center'),
@@ -57,7 +57,7 @@ export const StyledAnimateWrapper = styled('div')(() => ({
export const StyledTriggerWrapper = styled('div')<{
spread?: boolean;
}>(({ theme, spread }) => {
}>(({ spread }) => {
return {
width: '36px',
height: '36px',

View File

@@ -3,7 +3,7 @@ import { IconButton } from '@affine/component';
import { styled } from '@affine/component';
import { ArrowDownSmallIcon } from '@blocksuite/icons';
const StyledIconButtonWithAnimate = styled(IconButton)(({ theme }) => {
const StyledIconButtonWithAnimate = styled(IconButton)(() => {
return {
svg: {
transition: 'transform 0.15s ease-in-out',

View File

@@ -1,6 +1,6 @@
import { displayFlex, styled, textEllipsis } from '@affine/component';
export const StyledNavigationPathContainer = styled('div')(({ theme }) => {
export const StyledNavigationPathContainer = styled('div')(() => {
return {
height: '46px',
...displayFlex('flex-start', 'center'),
@@ -24,7 +24,7 @@ export const StyledNavigationPathContainer = styled('div')(({ theme }) => {
});
export const StyledNavPathLink = styled('div')<{ active?: boolean }>(
({ theme, active }) => {
({ active }) => {
return {
color: active
? 'var(--affine-text-primary-color)'
@@ -45,7 +45,7 @@ export const StyledNavPathLink = styled('div')<{ active?: boolean }>(
);
export const StyledNavPathExtendContainer = styled('div')<{ show: boolean }>(
({ show, theme }) => {
({ show }) => {
return {
position: 'absolute',
left: '0',

View File

@@ -1,6 +1,6 @@
import { displayFlex, styled, textEllipsis } from '@affine/component';
export const StyledContent = styled('div')(({ theme }) => {
export const StyledContent = styled('div')(() => {
return {
minHeight: '290px',
maxHeight: '70vh',
@@ -35,7 +35,7 @@ export const StyledContent = styled('div')(({ theme }) => {
},
};
});
export const StyledJumpTo = styled('div')(({ theme }) => {
export const StyledJumpTo = styled('div')(() => {
return {
...displayFlex('center', 'start'),
flexDirection: 'column',
@@ -47,7 +47,7 @@ export const StyledJumpTo = styled('div')(({ theme }) => {
},
};
});
export const StyledNotFound = styled('div')(({ theme }) => {
export const StyledNotFound = styled('div')(() => {
return {
width: '612px',
...displayFlex('center', 'center'),
@@ -68,7 +68,7 @@ export const StyledNotFound = styled('div')(({ theme }) => {
},
};
});
export const StyledInputContent = styled('div')(({ theme }) => {
export const StyledInputContent = styled('div')(() => {
return {
...displayFlex('space-between', 'center'),
input: {
@@ -85,7 +85,7 @@ export const StyledInputContent = styled('div')(({ theme }) => {
},
};
});
export const StyledShortcut = styled('div')(({ theme }) => {
export const StyledShortcut = styled('div')(() => {
return {
color: 'var(--affine-placeholder-color)',
fontSize: 'var(--affine-font-sm)',
@@ -93,7 +93,7 @@ export const StyledShortcut = styled('div')(({ theme }) => {
};
});
export const StyledLabel = styled('label')(({ theme }) => {
export const StyledLabel = styled('label')(() => {
return {
width: '20px',
height: '20px',
@@ -109,7 +109,7 @@ export const StyledModalHeader = styled('div')(() => {
...displayFlex('space-between', 'center'),
};
});
export const StyledModalDivider = styled('div')(({ theme }) => {
export const StyledModalDivider = styled('div')(() => {
return {
width: 'auto',
height: '0',
@@ -118,7 +118,7 @@ export const StyledModalDivider = styled('div')(({ theme }) => {
};
});
export const StyledModalFooter = styled('div')(({ theme }) => {
export const StyledModalFooter = styled('div')(() => {
return {
fontSize: 'inherit',
lineHeight: '22px',
@@ -142,7 +142,7 @@ export const StyledModalFooter = styled('div')(({ theme }) => {
},
};
});
export const StyledModalFooterContent = styled('button')(({ theme }) => {
export const StyledModalFooterContent = styled('button')(() => {
return {
width: '600px',
height: '32px',

View File

@@ -1,6 +1,6 @@
import { displayFlex, styled } from '@affine/component';
export const StyledShortcutsModal = styled('div')(({ theme }) => ({
export const StyledShortcutsModal = styled('div')(() => ({
width: '288px',
height: '74vh',
paddingBottom: '28px',
@@ -16,7 +16,7 @@ export const StyledShortcutsModal = styled('div')(({ theme }) => ({
margin: 'auto',
zIndex: 'var(--affine-z-index-modal)',
}));
export const StyledTitle = styled('div')(({ theme }) => ({
export const StyledTitle = styled('div')(() => ({
color: 'var(--affine-text-primary-color)',
fontWeight: '500',
fontSize: 'var(--affine-font-sm)',
@@ -28,7 +28,7 @@ export const StyledTitle = styled('div')(({ theme }) => ({
color: 'var(--affine-primary-color)',
},
}));
export const StyledSubTitle = styled('div')(({ theme }) => ({
export const StyledSubTitle = styled('div')(() => ({
fontWeight: '500',
fontSize: 'var(--affine-font-sm)',
height: '34px',
@@ -49,7 +49,7 @@ export const StyledModalHeader = styled('div')(() => ({
transition: 'background-color 0.5s',
}));
export const StyledListItem = styled('div')(({ theme }) => ({
export const StyledListItem = styled('div')(() => ({
height: '34px',
...displayFlex('space-between', 'center'),
fontSize: 'var(--affine-font-sm)',

View File

@@ -56,7 +56,7 @@ export const LanguageMenu: React.FC = () => {
);
};
const ListItem = styled(MenuItem)(({ theme }) => ({
const ListItem = styled(MenuItem)(() => ({
height: '38px',
fontSize: 'var(--affine-font-base)',
textTransform: 'capitalize',

View File

@@ -1,6 +1,6 @@
import { displayFlex, styled, textEllipsis } from '@affine/component';
export const StyledSplitLine = styled('div')(({ theme }) => {
export const StyledSplitLine = styled('div')(() => {
return {
width: '1px',
height: '20px',
@@ -9,7 +9,7 @@ export const StyledSplitLine = styled('div')(({ theme }) => {
};
});
export const StyleWorkspaceInfo = styled('div')(({ theme }) => {
export const StyleWorkspaceInfo = styled('div')(() => {
return {
marginLeft: '15px',
width: '202px',
@@ -30,7 +30,7 @@ export const StyleWorkspaceInfo = styled('div')(({ theme }) => {
};
});
export const StyleWorkspaceTitle = styled('div')(({ theme }) => {
export const StyleWorkspaceTitle = styled('div')(() => {
return {
fontSize: 'var(--affine-font-base)',
fontWeight: 600,
@@ -41,7 +41,7 @@ export const StyleWorkspaceTitle = styled('div')(({ theme }) => {
};
});
export const StyledCreateWorkspaceCard = styled('div')(({ theme }) => {
export const StyledCreateWorkspaceCard = styled('div')(() => {
return {
width: '310px',
height: '124px',
@@ -68,14 +68,14 @@ export const StyledCreateWorkspaceCard = styled('div')(({ theme }) => {
export const StyledModalHeaderLeft = styled('div')(() => {
return { ...displayFlex('flex-start', 'center') };
});
export const StyledModalTitle = styled('div')(({ theme }) => {
export const StyledModalTitle = styled('div')(() => {
return {
fontWeight: 600,
fontSize: 'var(--affine-font-h6)',
};
});
export const StyledHelperContainer = styled('div')(({ theme }) => {
export const StyledHelperContainer = styled('div')(() => {
return {
color: 'var(--affine-icon-color)',
marginLeft: '15px',

View File

@@ -1,6 +1,6 @@
import { displayFlex, textEllipsis } from '@affine/component';
import { styled } from '@affine/component';
export const StyledSelectorContainer = styled('div')(({ theme }) => {
export const StyledSelectorContainer = styled('div')(() => {
return {
height: '58px',
display: 'flex',
@@ -32,7 +32,7 @@ export const StyledWorkspaceName = styled('div')(() => {
};
});
export const StyledWorkspaceStatus = styled('div')(({ theme }) => {
export const StyledWorkspaceStatus = styled('div')(() => {
return {
height: '22px',
...displayFlex('flex-start', 'center'),

View File

@@ -37,7 +37,7 @@ export const StyledLink = styled(Link)(() => {
'-webkit-app-region': 'no-drag',
};
});
export const StyledNewPageButton = styled('button')(({ theme }) => {
export const StyledNewPageButton = styled('button')(() => {
return {
height: '52px',
...displayFlex('flex-start', 'center'),
@@ -56,7 +56,7 @@ export const StyledNewPageButton = styled('button')(({ theme }) => {
};
});
export const StyledSliderModalBackground = styled('div')<{ active: boolean }>(
({ theme, active }) => {
({ active }) => {
return {
transition: 'opacity .15s',
pointerEvents: active ? 'auto' : 'none',
@@ -74,7 +74,7 @@ export const StyledSliderModalBackground = styled('div')<{ active: boolean }>(
export const StyledScrollWrapper = styled('div')<{
showTopBorder: boolean;
}>(({ showTopBorder, theme }) => {
}>(({ showTopBorder }) => {
return {
maxHeight: '50%',
overflowY: 'auto',