Reformat code with Prettier's new rules.

This commit is contained in:
Caio Cotts
2023-12-18 14:56:03 -05:00
parent 735d670a5b
commit 86757663d6
82 changed files with 236 additions and 222 deletions
+2 -2
View File
@@ -30,7 +30,7 @@ describe('<LinkToVersion />', () => {
const link = screen.queryByRole('link')
expect(link.href).toBe(
'https://github.com/navidrome/navidrome/releases/tag/v0.40.0'
'https://github.com/navidrome/navidrome/releases/tag/v0.40.0',
)
expect(link.textContent).toBe('0.40.0')
@@ -44,7 +44,7 @@ describe('<LinkToVersion />', () => {
const link = screen.queryByRole('link')
expect(link.href).toBe(
'https://github.com/navidrome/navidrome/compare/v0.40.0...300a0292'
'https://github.com/navidrome/navidrome/compare/v0.40.0...300a0292',
)
expect(link.textContent).toBe('0.40.0-SNAPSHOT')
+2 -2
View File
@@ -72,7 +72,7 @@ export const AddToPlaylistDialog = () => {
const tracks = res.json
if (tracks) {
const dupSng = tracks.filter((song) =>
selectedIds.some((id) => id === song.mediaFileId)
selectedIds.some((id) => id === song.mediaFileId),
)
if (dupSng.length) {
@@ -128,7 +128,7 @@ export const AddToPlaylistDialog = () => {
}
const handleSkip = () => {
const distinctSongs = selectedIds.filter(
(id) => duplicateIds.indexOf(id) < 0
(id) => duplicateIds.indexOf(id) < 0,
)
value.slice(-1).pop().distinctIds = distinctSongs
dispatch(closeDuplicateSongDialog())
+4 -4
View File
@@ -59,7 +59,7 @@ const createTestUtils = (mockDataProvider) =>
>
<AddToPlaylistDialog />
</TestContext>
</DataProviderContext.Provider>
</DataProviderContext.Provider>,
)
jest.mock('../dataProvider', () => ({
@@ -104,7 +104,7 @@ describe('AddToPlaylistDialog', () => {
{
data: { ids: selectedIds },
filter: { playlist_id: 'sample-id1' },
}
},
)
})
await waitFor(() => {
@@ -114,7 +114,7 @@ describe('AddToPlaylistDialog', () => {
{
data: { ids: selectedIds },
filter: { playlist_id: 'sample-id2' },
}
},
)
})
})
@@ -153,7 +153,7 @@ describe('AddToPlaylistDialog', () => {
{
data: { ids: selectedIds },
filter: { playlist_id: 'created-id1' },
}
},
)
})
+1 -1
View File
@@ -14,7 +14,7 @@ import { useTranscodingOptions } from './useTranscodingOptions'
const DownloadMenuDialog = () => {
const { open, record, recordType } = useSelector(
(state) => state.downloadMenuDialog
(state) => state.downloadMenuDialog,
)
const dispatch = useDispatch()
const translate = useTranslate()
+1 -1
View File
@@ -54,7 +54,7 @@ const HelpTable = (props) => {
</TableContainer>
</DialogContent>
</Dialog>,
document.body
document.body,
)
}
+2 -2
View File
@@ -58,7 +58,7 @@ export const ListenBrainzTokenDialog = ({ setLinked }) => {
event.stopPropagation()
})
},
[dispatch, notify, setLinked, token]
[dispatch, notify, setLinked, token],
)
const handleClickClose = (event) => {
@@ -74,7 +74,7 @@ export const ListenBrainzTokenDialog = ({ setLinked }) => {
handleSave(event)
}
},
[token, handleSave]
[token, handleSave],
)
return (
+1 -1
View File
@@ -25,7 +25,7 @@ export const SelectPlaylistInput = ({ onChange }) => {
'playlist',
{ page: 1, perPage: -1 },
{ field: 'name', order: 'ASC' },
{ smart: false }
{ smart: false },
)
const options =
+1 -1
View File
@@ -65,7 +65,7 @@ describe('SelectPlaylistInput', () => {
>
<SelectPlaylistInput onChange={onChangeHandler} />
</TestContext>
</DataProviderContext.Provider>
</DataProviderContext.Provider>,
)
await waitFor(() => {
+3 -3
View File
@@ -33,7 +33,7 @@ export const ShareDialog = () => {
const translate = useTranslate()
const [description, setDescription] = useState('')
const [downloadable, setDownloadable] = useState(
config.defaultDownloadableShare && config.enableDownloads
config.defaultDownloadableShare && config.enableDownloads,
)
useEffect(() => {
setDescription('')
@@ -66,7 +66,7 @@ export const ShareDialog = () => {
type: 'warning',
multiLine: true,
duration: 0,
}
},
)
})
} else prompt(translate('message.shareCopyToClipboard'), url)
@@ -75,7 +75,7 @@ export const ShareDialog = () => {
notify(translate('ra.page.error') + ': ' + error.message, {
type: 'warning',
}),
}
},
)
const handleShare = (e) => {
+3 -3
View File
@@ -20,7 +20,7 @@ export const useTranscodingOptions = () => {
page: 1,
perPage: 1000,
},
{ field: 'name', order: 'ASC' }
{ field: 'name', order: 'ASC' },
)
const formatOptions = useMemo(
@@ -30,7 +30,7 @@ export const useTranscodingOptions = () => {
: Object.values(formats).map((f) => {
return { id: f.targetFormat, name: f.name }
}),
[formats, loadingFormats]
[formats, loadingFormats],
)
const handleOriginal = useCallback(
@@ -41,7 +41,7 @@ export const useTranscodingOptions = () => {
setMaxBitRate(DEFAULT_SHARE_BITRATE)
}
},
[setUseOriginalFormat, setFormat, setMaxBitRate]
[setUseOriginalFormat, setFormat, setMaxBitRate],
)
const TranscodingOptionsInput = useMemo(() => {