diff --git a/package.json b/package.json index be0a460f..5fb85a25 100644 --- a/package.json +++ b/package.json @@ -99,7 +99,7 @@ "start:services": "docker-compose up", "build": "yarn typecheck && vite build", "prettier": "prettier --write \"src/**/*.{js,jsx,ts,tsx}\"", - "lint": "eslint src/ cypress/", + "lint": "eslint src cypress --ext .js,.jsx,.ts,.tsx", "fix": "yarn prettier && yarn lint --fix", "test": "yarn test:unit && yarn test:e2e", "test:e2e": "TZ=Etc/GMT-3 start-test 'yarn start:server --port 3030' 3030 'cypress run'", diff --git a/src/components/Avatar.tsx b/src/components/Avatar.tsx index d7810e1a..9a2ff9c3 100644 --- a/src/components/Avatar.tsx +++ b/src/components/Avatar.tsx @@ -17,16 +17,14 @@ interface AvatarProps { url: string | null; } -// eslint-disable-next-line no-unused-vars -const iconSizes: { [key in AvatarSizes]: SizeProp } = { +const iconSizes: Record = { xl: '5x', lg: '5x', md: '3x', sm: '1x', }; -// eslint-disable-next-line no-unused-vars -const imgSizes: { [key in AvatarSizes]: number } = { +const imgSizes: Record = { xl: 300, lg: 128, md: 64, diff --git a/src/components/SearchForm/SearchForm.tsx b/src/components/SearchForm/SearchForm.tsx index 2be93ef9..3cc7639b 100644 --- a/src/components/SearchForm/SearchForm.tsx +++ b/src/components/SearchForm/SearchForm.tsx @@ -1,5 +1,4 @@ import { useState, useEffect, ChangeEvent, useRef } from 'react'; -import { useLocation } from 'react-router-dom'; import { Trans } from 'react-i18next'; import { diff --git a/src/components/UserCard/UserCard.tsx b/src/components/UserCard/UserCard.tsx index 79d404d0..07d35b94 100644 --- a/src/components/UserCard/UserCard.tsx +++ b/src/components/UserCard/UserCard.tsx @@ -17,12 +17,7 @@ type UserCardProps = { export function UserCard({ name, user, isHeading, withLinkToProfile }: UserCardProps) { const externalLink = (
- + Visit profile {' '} diff --git a/src/domains/scrobbleSong/ScrobbleSong.tsx b/src/domains/scrobbleSong/ScrobbleSong.tsx index bd9e26af..2ae8a291 100644 --- a/src/domains/scrobbleSong/ScrobbleSong.tsx +++ b/src/domains/scrobbleSong/ScrobbleSong.tsx @@ -14,7 +14,6 @@ import { clearListOfScrobbles, scrobbleCounterEnabled } from 'store/actions/scro import EmptyScrobbleListFiller from 'components/EmptyScrobbleListFiller'; import ScrobbleList from 'components/ScrobbleList'; -import Spinner from 'components/Spinner'; import { SongForm } from './SongForm'; import { LastFmProfileHistory } from './partials/LastFmProfileHistory'; diff --git a/src/domains/scrobbleUser/partials/UserResultsHeading.tsx b/src/domains/scrobbleUser/partials/UserResultsHeading.tsx index 3ecf7f43..b8a74034 100644 --- a/src/domains/scrobbleUser/partials/UserResultsHeading.tsx +++ b/src/domains/scrobbleUser/partials/UserResultsHeading.tsx @@ -1,9 +1,5 @@ -import { useEffect, useState } from 'react'; -import { useSelector } from 'react-redux'; -import { useParams, useNavigate } from 'react-router-dom'; -import ReactGA from 'react-ga-neo'; -import { keepPreviousData, useQuery, QueryClient, useQueryClient } from '@tanstack/react-query'; -import { get } from 'lodash-es'; +import { useNavigate } from 'react-router-dom'; +import { useQueryClient } from '@tanstack/react-query'; import { Row, Button } from 'reactstrap'; import { Trans, useTranslation } from 'react-i18next'; diff --git a/src/utils/clients/lastfm/transformers/avatar.transformer.ts b/src/utils/clients/lastfm/transformers/avatar.transformer.ts index fda1ba3a..0866ed7c 100644 --- a/src/utils/clients/lastfm/transformers/avatar.transformer.ts +++ b/src/utils/clients/lastfm/transformers/avatar.transformer.ts @@ -7,7 +7,6 @@ const sizeMap = { extralarge: 'xl', }; -// eslint-disable-next-line no-unused-vars export function avatarTransformer(avatars: any[]): Avatar { if (!avatars || avatars.length === 0) return null; diff --git a/src/utils/types/album.ts b/src/utils/types/album.ts index e12648d8..f71ee953 100644 --- a/src/utils/types/album.ts +++ b/src/utils/types/album.ts @@ -1,14 +1,8 @@ -/* eslint-disable no-unused-vars */ - type AlbumCoverSizeSteps = 'sm' | 'lg'; -export type AlbumCover = { - [key in AlbumCoverSizeSteps]: string; -}; +export type AlbumCover = Record; -export type AlbumCoverSizes = { - [key in AlbumCoverSizeSteps]: number; -}; +export type AlbumCoverSizes = Record; export type BaseAlbum = { artist: string; diff --git a/src/utils/types/avatar.ts b/src/utils/types/avatar.ts index 45369041..b416b589 100644 --- a/src/utils/types/avatar.ts +++ b/src/utils/types/avatar.ts @@ -1,7 +1,3 @@ export type AvatarSizes = 'xl' | 'lg' | 'md' | 'sm'; -export type Avatar = - | { - [key in AvatarSizes]: string; - } - | null; +export type Avatar = Record | null;