fix prettier/lint
This commit is contained in:
parent
121b036aaf
commit
271be93a96
26 changed files with 133 additions and 103 deletions
19
package-lock.json
generated
19
package-lock.json
generated
|
@ -136,7 +136,7 @@
|
|||
"postcss-scss": "^4.0.4",
|
||||
"postcss-styled-syntax": "^0.5.0",
|
||||
"postcss-syntax": "^0.36.2",
|
||||
"prettier": "^2.6.2",
|
||||
"prettier": "^3.3.3",
|
||||
"react-refresh": "^0.12.0",
|
||||
"react-refresh-typescript": "^2.0.4",
|
||||
"react-test-renderer": "^18.0.0",
|
||||
|
@ -18752,15 +18752,16 @@
|
|||
}
|
||||
},
|
||||
"node_modules/prettier": {
|
||||
"version": "2.6.2",
|
||||
"resolved": "https://registry.npmjs.org/prettier/-/prettier-2.6.2.tgz",
|
||||
"integrity": "sha512-PkUpF+qoXTqhOeWL9fu7As8LXsIUZ1WYaJiY/a7McAQzxjk82OF0tibkFXVCDImZtWxbvojFjerkiLb0/q8mew==",
|
||||
"version": "3.3.3",
|
||||
"resolved": "https://registry.npmjs.org/prettier/-/prettier-3.3.3.tgz",
|
||||
"integrity": "sha512-i2tDNA0O5IrMO757lfrdQZCc2jPNDVntV0m/+4whiDfWaTKfMNgR7Qz0NAeGz/nRqF4m5/6CLzbP4/liHt12Ew==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"bin": {
|
||||
"prettier": "bin-prettier.js"
|
||||
"prettier": "bin/prettier.cjs"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=10.13.0"
|
||||
"node": ">=14"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://github.com/prettier/prettier?sponsor=1"
|
||||
|
@ -37375,9 +37376,9 @@
|
|||
"dev": true
|
||||
},
|
||||
"prettier": {
|
||||
"version": "2.6.2",
|
||||
"resolved": "https://registry.npmjs.org/prettier/-/prettier-2.6.2.tgz",
|
||||
"integrity": "sha512-PkUpF+qoXTqhOeWL9fu7As8LXsIUZ1WYaJiY/a7McAQzxjk82OF0tibkFXVCDImZtWxbvojFjerkiLb0/q8mew==",
|
||||
"version": "3.3.3",
|
||||
"resolved": "https://registry.npmjs.org/prettier/-/prettier-3.3.3.tgz",
|
||||
"integrity": "sha512-i2tDNA0O5IrMO757lfrdQZCc2jPNDVntV0m/+4whiDfWaTKfMNgR7Qz0NAeGz/nRqF4m5/6CLzbP4/liHt12Ew==",
|
||||
"dev": true
|
||||
},
|
||||
"prettier-linter-helpers": {
|
||||
|
|
|
@ -261,7 +261,7 @@
|
|||
"postcss-scss": "^4.0.4",
|
||||
"postcss-styled-syntax": "^0.5.0",
|
||||
"postcss-syntax": "^0.36.2",
|
||||
"prettier": "^2.6.2",
|
||||
"prettier": "^3.3.3",
|
||||
"react-refresh": "^0.12.0",
|
||||
"react-refresh-typescript": "^2.0.4",
|
||||
"react-test-renderer": "^18.0.0",
|
||||
|
|
|
@ -44,7 +44,7 @@ export const WrapperSlider = ({ leftLabel, rightLabel, value, ...props }: Wrappe
|
|||
{...props}
|
||||
min={0}
|
||||
size={6}
|
||||
value={!isSeeking ? value ?? 0 : seek}
|
||||
value={!isSeeking ? (value ?? 0) : seek}
|
||||
w="100%"
|
||||
onChange={(e) => {
|
||||
setIsSeeking(true);
|
||||
|
|
|
@ -24,7 +24,10 @@ const StyledButton = styled(MantineButton)<StyledButtonProps>`
|
|||
background: ${(props) => `var(--btn-${props.variant}-bg)`};
|
||||
border: ${(props) => `var(--btn-${props.variant}-border)`};
|
||||
border-radius: ${(props) => `var(--btn-${props.variant}-radius)`};
|
||||
transition: background 0.2s ease-in-out, color 0.2s ease-in-out, border 0.2s ease-in-out;
|
||||
transition:
|
||||
background 0.2s ease-in-out,
|
||||
color 0.2s ease-in-out,
|
||||
border 0.2s ease-in-out;
|
||||
|
||||
svg {
|
||||
fill: ${(props) => `var(--btn-${props.variant}-fg)`};
|
||||
|
|
|
@ -17,7 +17,9 @@ const CardWrapper = styled.div<{
|
|||
cursor: ${({ link }) => link && 'pointer'};
|
||||
background: var(--card-default-bg);
|
||||
border-radius: var(--card-default-radius);
|
||||
transition: border 0.2s ease-in-out, background 0.2s ease-in-out;
|
||||
transition:
|
||||
border 0.2s ease-in-out,
|
||||
background 0.2s ease-in-out;
|
||||
|
||||
&:hover {
|
||||
background: var(--card-default-bg-hover);
|
||||
|
|
|
@ -9,7 +9,9 @@ const StyledPagination = styled(MantinePagination)<PaginationProps>`
|
|||
color: var(--btn-default-fg);
|
||||
background-color: var(--btn-default-bg);
|
||||
border: none;
|
||||
transition: background 0.2s ease-in-out, color 0.2s ease-in-out;
|
||||
transition:
|
||||
background 0.2s ease-in-out,
|
||||
color 0.2s ease-in-out;
|
||||
|
||||
&[data-active] {
|
||||
color: var(--btn-primary-fg);
|
||||
|
|
|
@ -32,7 +32,9 @@ const StyledTabs = styled(MantineTabs)`
|
|||
background: var(--btn-subtle-bg-hover);
|
||||
}
|
||||
|
||||
transition: background 0.2s ease-in-out, color 0.2s ease-in-out;
|
||||
transition:
|
||||
background 0.2s ease-in-out,
|
||||
color 0.2s ease-in-out;
|
||||
}
|
||||
|
||||
button[data-active] {
|
||||
|
|
|
@ -287,13 +287,16 @@ export const ContextMenuProvider = ({ children }: ContextMenuProviderProps) => {
|
|||
if (ctx.dataNodes) {
|
||||
const nodesToFavorite = ctx.dataNodes.filter((item) => !item.data.userFavorite);
|
||||
|
||||
const nodesByServerId = nodesToFavorite.reduce((acc, node) => {
|
||||
const nodesByServerId = nodesToFavorite.reduce(
|
||||
(acc, node) => {
|
||||
if (!acc[node.data.serverId]) {
|
||||
acc[node.data.serverId] = [];
|
||||
}
|
||||
acc[node.data.serverId].push(node);
|
||||
return acc;
|
||||
}, {} as Record<string, RowNode<any>[]>);
|
||||
},
|
||||
{} as Record<string, RowNode<any>[]>,
|
||||
);
|
||||
|
||||
for (const serverId of Object.keys(nodesByServerId)) {
|
||||
const nodes = nodesByServerId[serverId];
|
||||
|
@ -324,13 +327,16 @@ export const ContextMenuProvider = ({ children }: ContextMenuProviderProps) => {
|
|||
}
|
||||
} else {
|
||||
const itemsToFavorite = ctx.data.filter((item) => !item.userFavorite);
|
||||
const itemsByServerId = (itemsToFavorite as any[]).reduce((acc, item) => {
|
||||
const itemsByServerId = (itemsToFavorite as any[]).reduce(
|
||||
(acc, item) => {
|
||||
if (!acc[item.serverId]) {
|
||||
acc[item.serverId] = [];
|
||||
}
|
||||
acc[item.serverId].push(item);
|
||||
return acc;
|
||||
}, {} as Record<string, AnyLibraryItems>);
|
||||
},
|
||||
{} as Record<string, AnyLibraryItems>,
|
||||
);
|
||||
|
||||
for (const serverId of Object.keys(itemsByServerId)) {
|
||||
const items = itemsByServerId[serverId];
|
||||
|
@ -361,13 +367,16 @@ export const ContextMenuProvider = ({ children }: ContextMenuProviderProps) => {
|
|||
|
||||
if (ctx.dataNodes) {
|
||||
const nodesToUnfavorite = ctx.dataNodes.filter((item) => item.data.userFavorite);
|
||||
const nodesByServerId = nodesToUnfavorite.reduce((acc, node) => {
|
||||
const nodesByServerId = nodesToUnfavorite.reduce(
|
||||
(acc, node) => {
|
||||
if (!acc[node.data.serverId]) {
|
||||
acc[node.data.serverId] = [];
|
||||
}
|
||||
acc[node.data.serverId].push(node);
|
||||
return acc;
|
||||
}, {} as Record<string, RowNode<any>[]>);
|
||||
},
|
||||
{} as Record<string, RowNode<any>[]>,
|
||||
);
|
||||
|
||||
for (const serverId of Object.keys(nodesByServerId)) {
|
||||
const idsToUnfavorite = nodesByServerId[serverId].map((node) => node.data.id);
|
||||
|
@ -390,13 +399,16 @@ export const ContextMenuProvider = ({ children }: ContextMenuProviderProps) => {
|
|||
}
|
||||
} else {
|
||||
const itemsToUnfavorite = ctx.data.filter((item) => item.userFavorite);
|
||||
const itemsByServerId = (itemsToUnfavorite as any[]).reduce((acc, item) => {
|
||||
const itemsByServerId = (itemsToUnfavorite as any[]).reduce(
|
||||
(acc, item) => {
|
||||
if (!acc[item.serverId]) {
|
||||
acc[item.serverId] = [];
|
||||
}
|
||||
acc[item.serverId].push(item);
|
||||
return acc;
|
||||
}, {} as Record<string, AnyLibraryItems>);
|
||||
},
|
||||
{} as Record<string, AnyLibraryItems>,
|
||||
);
|
||||
|
||||
for (const serverId of Object.keys(itemsByServerId)) {
|
||||
const idsToUnfavorite = itemsByServerId[serverId].map(
|
||||
|
|
|
@ -17,7 +17,9 @@ const StyledText = styled(TextTitle)<TitleProps & { $alignment: string; $fontSiz
|
|||
text-align: ${(props) => props.$alignment};
|
||||
opacity: 0.5;
|
||||
|
||||
transition: opacity 0.3s ease-in-out, transform 0.3s ease-in-out;
|
||||
transition:
|
||||
opacity 0.3s ease-in-out,
|
||||
transform 0.3s ease-in-out;
|
||||
|
||||
&.active {
|
||||
opacity: 1;
|
||||
|
|
|
@ -25,8 +25,8 @@ const SynchronizedLyricsContainer = styled.div<{ $gap: number }>`
|
|||
height: 100%;
|
||||
padding: 10vh 0 50vh;
|
||||
overflow: scroll;
|
||||
transform: translateY(-2rem);
|
||||
word-break: break-word;
|
||||
transform: translateY(-2rem);
|
||||
|
||||
-webkit-mask-image: linear-gradient(
|
||||
180deg,
|
||||
|
@ -180,9 +180,12 @@ export const SynchronizedLyrics = ({
|
|||
|
||||
const elapsed = performance.now() - start;
|
||||
|
||||
lyricTimer.current = setTimeout(() => {
|
||||
lyricTimer.current = setTimeout(
|
||||
() => {
|
||||
setCurrentLyric(nextTime, nextEpoch, index + 1);
|
||||
}, nextTime - timeInMs - elapsed);
|
||||
},
|
||||
nextTime - timeInMs - elapsed,
|
||||
);
|
||||
}
|
||||
},
|
||||
[],
|
||||
|
|
|
@ -18,7 +18,7 @@ import { LibraryItem } from '/@/renderer/api/types';
|
|||
import { usePlayQueueAdd } from '/@/renderer/features/player';
|
||||
|
||||
interface CommandPaletteProps {
|
||||
modalProps: typeof useDisclosure['arguments'];
|
||||
modalProps: (typeof useDisclosure)['arguments'];
|
||||
}
|
||||
|
||||
const CustomModal = styled(Modal)`
|
||||
|
|
|
@ -200,7 +200,8 @@ export const HotkeyManagerSettings = () => {
|
|||
);
|
||||
|
||||
const duplicateHotkeyMap = useMemo(() => {
|
||||
const countPerHotkey = Object.values(bindings).reduce((acc, key) => {
|
||||
const countPerHotkey = Object.values(bindings).reduce(
|
||||
(acc, key) => {
|
||||
const hotkey = key.hotkey;
|
||||
if (!hotkey) return acc;
|
||||
|
||||
|
@ -211,7 +212,9 @@ export const HotkeyManagerSettings = () => {
|
|||
}
|
||||
|
||||
return acc;
|
||||
}, {} as Record<string, number>);
|
||||
},
|
||||
{} as Record<string, number>,
|
||||
);
|
||||
|
||||
const duplicateKeys = Object.keys(countPerHotkey).filter((key) => countPerHotkey[key] > 1);
|
||||
|
||||
|
|
Reference in a new issue