Add Slack Now Playing plugin #3242
No reviewers
Labels
No labels
awaiting-reply
breaking changes
bug
cannot-reproduce
dependencies
documentation
duplicate
electron-issue
enhancement
fix-available
good first issue
help wanted
invalid
javascript
need more information
need rebase
official-youtube-music-issue
plugin request
question
release
security
stale
Status: blocked
typo
wontfix
ytmd-issue
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: YTMD/youtube-music#3242
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "curtisgibby/slack-now-playing"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
I wanted to be able to push my "Now Playing" status to my company's Slack.
It would be better to separate the Slack scrobbler as a standalone plugin, similar to the Discord RPC. The Scrobbler plugin is intended for services like LastFM or Listenbrainz.
This is more akin to discord rich presence than scrobbling.(I hadn't read Jelly's message which says the same thing)Maybe we could make a more generic plugin that supports multiple social media platforms?
e.g.
Rich Presence
or smth like thatOK, I'll rework this as a standalone plugin.
I wouldn't recommend adding a dependency like axios, especially in 2025, when the built-in fetch is as good.
Why the extra dependency for formdata?
@ -0,0 +359,4 @@
await client.post<{ ok: boolean }>('emoji.add', formData, true);
return true;
} catch (apiError: unknown) {
// Handle specific API error types
instead of
any
useunknown
, that's your intended use-case either way, since you are trying to narrow down the type later@ -0,0 +359,4 @@
await client.post<{ ok: boolean }>('emoji.add', formData, true);
return true;
} catch (apiError: unknown) {
// Handle specific API error types
Refactored to
unknown
ina8350ecfaa
.That was a leftover when I was trying formdata instead of
formdata-node
. Removed now.@ -0,0 +1,807 @@
import { net } from 'electron';
here
here
here as well?
why so many polyfills?
we are using a modern version of Nodejs that supports all those out of the box
@ -0,0 +1,807 @@
import { net } from 'electron';
ok, this ain't a built-in, but you don't need an entire library for this
you can write 3 lines of code
@ -0,0 +1,807 @@
import { net } from 'electron';
who hurt you so much that you are checking for compatibility like that?
we ship the environment to the user, if the user tweaks the environment to use a different electron/node version, we don't have to support them
that's the benefit and drawback of using electron, we ship an entire browser to the end user
and it's even crazier when you consider that electron is probably using 2 v8 engines, one for chromium and one for node
@ -0,0 +1,807 @@
import { net } from 'electron';
all you need to check, when dealing with built-ins, is if it works on your machine
@ -0,0 +1,807 @@
import { net } from 'electron';
PS: If you don't want me to comment on your PR, just say it, I won't hold hard feelings against you.
@ -0,0 +1,807 @@
import { net } from 'electron';
How would you resolve this? Just remove the last
else
block? I'm not much of a TypeScript dev, I'm mostly just relying on Cascade. 😆@ -0,0 +1,807 @@
import { net } from 'electron';
I'd directly use the File built-in, and remove the fallbacks
@ -0,0 +1,807 @@
import { net } from 'electron';
It's honestly fine, your PR feels nothing like AI slop, I can actually see your effort!
@ -0,0 +1,807 @@
import { net } from 'electron';
Updated based on suggestion in
5d4c531ed9
I believe that I've addressed all of the feedback that you've given. If there's something I've missed, or a new issue, please let me know.
It would be hypocritical of me to say this in another PR and not here as well, so here we go.
https://github.com/th-ch/youtube-music/pull/3376#issuecomment-2888974155
Please do not use
Google Translate
/AI
for translations.Reverted all languages except EN & ES (since I speak those languages and know that the meaning is correct).
I've updated this PR with the latest commits from master. Is there any interest in merging it?
Pull Request Overview
This PR adds a Slack Now Playing plugin that allows users to automatically set their Slack status to the currently playing song. The plugin integrates with Slack's API to update user status with song information and album art as custom emojis.
Reviewed Changes
Copilot reviewed 7 out of 8 changed files in this pull request and generated 5 comments.
Show a summary per file
src/plugins/slack-now-playing/slack-api-client.ts
src/plugins/slack-now-playing/main.ts
src/plugins/slack-now-playing/menu.ts
src/plugins/slack-now-playing/index.ts
src/i18n/resources/en.json
src/i18n/resources/es.json
package.json
Files not reviewed (1)
@ -0,0 +339,4 @@
}
// Prepare the form data for the API request using native Node.js APIs
const formData = new FormData();
FormData is imported from 'formdata-node' but being used as native FormData here. This could cause issues since the import at the top suggests the intention is to use the Node.js compatible FormData.
@ -0,0 +346,4 @@
// Read the file as a Buffer and append directly to FormData
const fileBuffer = await fs.promises.readFile(filePath);
const filename = path.basename(filePath) || 'emoji.png';
const imageFile = new File([fileBuffer], filename);
The File constructor is a Web API that may not be available in Node.js environment. This could cause runtime errors in the Electron main process.
@ -0,0 +605,4 @@
console.error(`Unexpected error deleting emoji: ${apiError.message}`, {
name: apiError.name,
stack: apiError.stack
});
The error message and logging logic is incorrect. When emoji_not_found is encountered, it should be treated as success, not logged as an error.
@ -0,0 +155,4 @@
/** Base URL for all Slack API requests */
private readonly baseUrl = 'https://slack.com/api';
/** Cache for GET requests to reduce API calls */
private readonly cache: Map<string, CacheEntry<any>> = new Map();
Using 'any' type reduces type safety. Consider using generics or a more specific type for the cache values.
@ -0,0 +223,4 @@
// For SSL validation disabling, use agent in Node.js
if (options.disableSSLValidation) {
// @ts-ignore
fetchOptions.agent = new https.Agent({ rejectUnauthorized: false });
Use a proper type assertion instead of @ts-ignore. Consider creating a proper type for the agent option or using a more specific type annotation.
Remaining comments which cannot be posted as a review comment to avoid GitHub Rate Limit
eslint
🚫 [eslint] <prettier/prettier> reported by reviewdog 🐶
Replace
········(error.message.includes('token')·||·error.message.includes('authentication'))
with······(error.message.includes('token')·||⏎········error.message.includes('authentication'))⏎····
dd51844878/src/plugins/slack-now-playing/main.ts (L228-L228)
🚫 [eslint] <prettier/prettier> reported by reviewdog 🐶
Replace
'Slack·authentication·failed.·Please·check·your·API·token·and·cookie·token.'
with⏎········'Slack·authentication·failed.·Please·check·your·API·token·and·cookie·token.',⏎······
dd51844878/src/plugins/slack-now-playing/main.ts (L229-L229)
🚫 [eslint] <prettier/prettier> reported by reviewdog 🐶
Replace
Cannot·update·Slack·status:·${validationResult.errors.join(',·')}
with⏎········
Cannot·update·Slack·status:·${validationResult.errors.join(',·')},⏎······
dd51844878/src/plugins/slack-now-playing/main.ts (L252-L252)
🚫 [eslint] <prettier/prettier> reported by reviewdog 🐶
Delete
⏎
dd51844878/src/plugins/slack-now-playing/main.ts (L275-L276)
🚫 [eslint] <prettier/prettier> reported by reviewdog 🐶
Insert
,
dd51844878/src/plugins/slack-now-playing/main.ts (L290-L290)
🚫 [eslint] <prettier/prettier> reported by reviewdog 🐶
Replace
songInfo:·SongInfo,·config:·SlackNowPlayingConfig
with⏎··songInfo:·SongInfo,⏎··config:·SlackNowPlayingConfig,⏎
dd51844878/src/plugins/slack-now-playing/main.ts (L301-L301)
🚫 [eslint] <prettier/prettier> reported by reviewdog 🐶
Replace
await·uploadEmojiToSlack(songInfo,·config
with(await·uploadEmojiToSlack(songInfo,·config)
dd51844878/src/plugins/slack-now-playing/main.ts (L302-L302)
🚫 [eslint] <prettier/prettier> reported by reviewdog 🐶
Replace
songInfo:·SongInfo,·config:·SlackNowPlayingConfig
with⏎··songInfo:·SongInfo,⏎··config:·SlackNowPlayingConfig,⏎
dd51844878/src/plugins/slack-now-playing/main.ts (L316-L316)
🚫 [eslint] <prettier/prettier> reported by reviewdog 🐶
Replace
Cannot·upload·emoji·to·Slack:·${validationResult.errors.join(',·')}
with⏎········
Cannot·upload·emoji·to·Slack:·${validationResult.errors.join(',·')},⏎······
dd51844878/src/plugins/slack-now-playing/main.ts (L321-L321)
🚫 [eslint] <prettier/prettier> reported by reviewdog 🐶
Delete
⏎
dd51844878/src/plugins/slack-now-playing/main.ts (L351-L352)
🚫 [eslint] <@typescript-eslint/no-explicit-any> reported by reviewdog 🐶
Unexpected any. Specify a different type.
dd51844878/src/plugins/slack-now-playing/main.ts (L352-L352)
🚫 [eslint] <prettier/prettier> reported by reviewdog 🐶
Replace
Error·preparing·album·art·file:·${fileError·instanceof·Error·?·fileError.message·:·String(fileError)}
with⏎········
Error·preparing·album·art·file:·${fileError·instanceof·Error·?·fileError.message·:·String(fileError)},⏎······
dd51844878/src/plugins/slack-now-playing/main.ts (L353-L353)
🚫 [eslint] <prettier/prettier> reported by reviewdog 🐶
Replace
Invalid·emoji·name:·${config.emojiName}.·Emoji·names·can·only·contain·lowercase·letters,·numbers,·hyphens,·and·underscores.
with⏎············
Invalid·emoji·name:·${config.emojiName}.·Emoji·names·can·only·contain·lowercase·letters,·numbers,·hyphens,·and·underscores.,⏎··········
dd51844878/src/plugins/slack-now-playing/main.ts (L367-L367)
🚫 [eslint] <prettier/prettier> reported by reviewdog 🐶
Replace
'Album·art·image·is·too·large·for·Slack·emoji·(max·128KB).'
with⏎············'Album·art·image·is·too·large·for·Slack·emoji·(max·128KB).',⏎··········
dd51844878/src/plugins/slack-now-playing/main.ts (L369-L369)
🚫 [eslint] <prettier/prettier> reported by reviewdog 🐶
Replace
Emoji·name·'${config.emojiName}'·is·already·taken.·This·should·not·happen·as·we·check·for·existing·emojis.
with⏎············
Emoji·name·'${config.emojiName}'·is·already·taken.·This·should·not·happen·as·we·check·for·existing·emojis.,⏎··········
dd51844878/src/plugins/slack-now-playing/main.ts (L371-L371)
🚫 [eslint] <prettier/prettier> reported by reviewdog 🐶
Replace ``Error·uploading·emoji:·${errorCode}
,·apiError.responseData
with⏎············
Error·uploading·emoji:·${errorCode},⏎············apiError.responseData,⏎··········
dd51844878/src/plugins/slack-now-playing/main.ts (L373-L373)
🚫 [eslint] <prettier/prettier> reported by reviewdog 🐶
Delete
⏎
dd51844878/src/plugins/slack-now-playing/main.ts (L377-L378)
🚫 [eslint] <prettier/prettier> reported by reviewdog 🐶
Replace
Error·uploading·emoji·to·Slack:·${apiError·instanceof·Error·?·apiError.message·:·String(apiError)}
with⏎··········
Error·uploading·emoji·to·Slack:·${apiError·instanceof·Error·?·apiError.message·:·String(apiError)},⏎········
dd51844878/src/plugins/slack-now-playing/main.ts (L379-L379)
🚫 [eslint] <prettier/prettier> reported by reviewdog 🐶
Replace ``Unexpected·error·uploading·emoji·to·Slack:·${error.message}
,
with⏎········
Unexpected·error·uploading·emoji·to·Slack:·${error.message},⏎·······
dd51844878/src/plugins/slack-now-playing/main.ts (L386-L386)
🚫 [eslint] <prettier/prettier> reported by reviewdog 🐶
Insert
··
dd51844878/src/plugins/slack-now-playing/main.ts (L387-L387)
🚫 [eslint] <prettier/prettier> reported by reviewdog 🐶
Replace
stack:·error.stack
with··stack:·error.stack,
dd51844878/src/plugins/slack-now-playing/main.ts (L388-L388)
🚫 [eslint] <prettier/prettier> reported by reviewdog 🐶
Replace
}
with··},⏎······
dd51844878/src/plugins/slack-now-playing/main.ts (L389-L389)
🚫 [eslint] <prettier/prettier> reported by reviewdog 🐶
Replace
Unexpected·error·uploading·emoji·to·Slack:·${String(error)}
with⏎········
Unexpected·error·uploading·emoji·to·Slack:·${String(error)},⏎······
dd51844878/src/plugins/slack-now-playing/main.ts (L391-L391)
⚠️ [eslint] <@typescript-eslint/no-unused-vars> reported by reviewdog 🐶
'error' is defined but never used.
dd51844878/src/plugins/slack-now-playing/main.ts (L421-L421)
🚫 [eslint] <@typescript-eslint/no-explicit-any> reported by reviewdog 🐶
Unexpected any. Specify a different type.
dd51844878/src/plugins/slack-now-playing/main.ts (L421-L421)
⚠️ [eslint] <@typescript-eslint/no-unused-vars> reported by reviewdog 🐶
'error' is defined but never used.
dd51844878/src/plugins/slack-now-playing/main.ts (L432-L432)
🚫 [eslint] <@typescript-eslint/no-explicit-any> reported by reviewdog 🐶
Unexpected any. Specify a different type.
dd51844878/src/plugins/slack-now-playing/main.ts (L432-L432)
🚫 [eslint] <prettier/prettier> reported by reviewdog 🐶
Replace
Failed·to·fetch·album·art:·HTTP·${response.status}·${response.statusText}
with⏎··········
Failed·to·fetch·album·art:·HTTP·${response.status}·${response.statusText},⏎········
dd51844878/src/plugins/slack-now-playing/main.ts (L451-L451)
🚫 [eslint] <prettier/prettier> reported by reviewdog 🐶
Replace
Network·error·fetching·album·art:·${fetchError·instanceof·Error·?·fetchError.message·:·String(fetchError)}
with⏎········
Network·error·fetching·album·art:·${fetchError·instanceof·Error·?·fetchError.message·:·String(fetchError)},⏎······
dd51844878/src/plugins/slack-now-playing/main.ts (L455-L455)
🚫 [eslint] <prettier/prettier> reported by reviewdog 🐶
Replace
Error·processing·album·art·data:·${bufferError·instanceof·Error·?·bufferError.message·:·String(bufferError)}
with⏎········
Error·processing·album·art·data:·${bufferError·instanceof·Error·?·bufferError.message·:·String(bufferError)},⏎······
dd51844878/src/plugins/slack-now-playing/main.ts (L469-L469)
🚫 [eslint] <prettier/prettier> reported by reviewdog 🐶
Insert
,
dd51844878/src/plugins/slack-now-playing/main.ts (L485-L485)
🚫 [eslint] <prettier/prettier> reported by reviewdog 🐶
Replace
Error·writing·album·art·to·file:·${fileError·instanceof·Error·?·fileError.message·:·String(fileError)}
with⏎········
Error·writing·album·art·to·file:·${fileError·instanceof·Error·?·fileError.message·:·String(fileError)},⏎······
dd51844878/src/plugins/slack-now-playing/main.ts (L490-L490)
🚫 [eslint] <@typescript-eslint/no-explicit-any> reported by reviewdog 🐶
Unexpected any. Specify a different type.
dd51844878/src/plugins/slack-now-playing/main.ts (L493-L493)
🚫 [eslint] <prettier/prettier> reported by reviewdog 🐶
Insert
,
dd51844878/src/plugins/slack-now-playing/main.ts (L498-L498)
🚫 [eslint] <prettier/prettier> reported by reviewdog 🐶
Replace
config:·SlackNowPlayingConfig
with⏎··config:·SlackNowPlayingConfig,⏎
dd51844878/src/plugins/slack-now-playing/main.ts (L512-L512)
🚫 [eslint] <prettier/prettier> reported by reviewdog 🐶
Replace
Cannot·check·emoji·existence:·${validationResult.errors.join(',·')}
with⏎········
Cannot·check·emoji·existence:·${validationResult.errors.join(',·')},⏎······
dd51844878/src/plugins/slack-now-playing/main.ts (L517-L517)
🚫 [eslint] <prettier/prettier> reported by reviewdog 🐶
Replace
response.emoji·&&·typeof·response.emoji·===·'object'·&&·config.emojiName·in·response.emoji
with⏎········response.emoji·&&⏎········typeof·response.emoji·===·'object'·&&⏎········config.emojiName·in·response.emoji⏎······
dd51844878/src/plugins/slack-now-playing/main.ts (L532-L532)
🚫 [eslint] <@typescript-eslint/no-explicit-any> reported by reviewdog 🐶
Unexpected any. Specify a different type.
dd51844878/src/plugins/slack-now-playing/main.ts (L539-L539)
🚫 [eslint] <prettier/prettier> reported by reviewdog 🐶
Replace
'Slack·authentication·failed.·Please·check·your·API·token·and·cookie·token.'
with⏎············'Slack·authentication·failed.·Please·check·your·API·token·and·cookie·token.',⏎··········
dd51844878/src/plugins/slack-now-playing/main.ts (L545-L545)
🚫 [eslint] <prettier/prettier> reported by reviewdog 🐶
Replace
'Slack·API·rate·limit·exceeded.·Please·try·again·later.'
with⏎············'Slack·API·rate·limit·exceeded.·Please·try·again·later.',⏎··········
dd51844878/src/plugins/slack-now-playing/main.ts (L547-L547)
🚫 [eslint] <prettier/prettier> reported by reviewdog 🐶
Replace
Error·checking·emoji·list:·${errorCode·||·apiError.message}
with⏎············
Error·checking·emoji·list:·${errorCode·||·apiError.message},⏎··········
dd51844878/src/plugins/slack-now-playing/main.ts (L549-L549)
🚫 [eslint] <prettier/prettier> reported by reviewdog 🐶
Replace
[Slack]·Error·checking·emoji·list:·${apiError·instanceof·Error·?·apiError.message·:·String(apiError)}
with⏎··········
[Slack]·Error·checking·emoji·list:·${apiError·instanceof·Error·?·apiError.message·:·String(apiError)},⏎········
dd51844878/src/plugins/slack-now-playing/main.ts (L552-L552)
🚫 [eslint] <prettier/prettier> reported by reviewdog 🐶
Replace ``[Slack]·Unexpected·error·in·ensureEmojiDoesNotExist:·${error.message}
,
with⏎········
[Slack]·Unexpected·error·in·ensureEmojiDoesNotExist:·${error.message},⏎·······
dd51844878/src/plugins/slack-now-playing/main.ts (L562-L562)
🚫 [eslint] <prettier/prettier> reported by reviewdog 🐶
Insert
··
dd51844878/src/plugins/slack-now-playing/main.ts (L563-L563)
🚫 [eslint] <prettier/prettier> reported by reviewdog 🐶
Replace
stack:·error.stack
with··stack:·error.stack,
dd51844878/src/plugins/slack-now-playing/main.ts (L564-L564)
🚫 [eslint] <prettier/prettier> reported by reviewdog 🐶
Replace
······}
with········},⏎······
dd51844878/src/plugins/slack-now-playing/main.ts (L565-L565)
🚫 [eslint] <prettier/prettier> reported by reviewdog 🐶
Replace
[Slack]·Unexpected·error·in·ensureEmojiDoesNotExist:·${String(error)}
with⏎········
[Slack]·Unexpected·error·in·ensureEmojiDoesNotExist:·${String(error)},⏎······
dd51844878/src/plugins/slack-now-playing/main.ts (L567-L567)
🚫 [eslint] <prettier/prettier> reported by reviewdog 🐶
Replace
config:·SlackNowPlayingConfig
with⏎··config:·SlackNowPlayingConfig,⏎
dd51844878/src/plugins/slack-now-playing/main.ts (L578-L578)
🚫 [eslint] <prettier/prettier> reported by reviewdog 🐶
Replace
Cannot·delete·emoji:·${validationResult.errors.join(',·')}
with⏎········
Cannot·delete·emoji:·${validationResult.errors.join(',·')},⏎······
dd51844878/src/plugins/slack-now-playing/main.ts (L583-L583)
🚫 [eslint] <@typescript-eslint/no-explicit-any> reported by reviewdog 🐶
Unexpected any. Specify a different type.
dd51844878/src/plugins/slack-now-playing/main.ts (L597-L597)
🚫 [eslint] <prettier/prettier> reported by reviewdog 🐶
Replace ``Unexpected·error·deleting·emoji:·${apiError.message}
,
with⏎············
Unexpected·error·deleting·emoji:·${apiError.message},⏎···········
dd51844878/src/plugins/slack-now-playing/main.ts (L605-L605)
🚫 [eslint] <prettier/prettier> reported by reviewdog 🐶
Insert
··
dd51844878/src/plugins/slack-now-playing/main.ts (L606-L606)
🚫 [eslint] <prettier/prettier> reported by reviewdog 🐶
Replace
············stack:·apiError.stack
with··············stack:·apiError.stack,
dd51844878/src/plugins/slack-now-playing/main.ts (L607-L607)
🚫 [eslint] <prettier/prettier> reported by reviewdog 🐶
Replace
··········}
with············},⏎··········
dd51844878/src/plugins/slack-now-playing/main.ts (L608-L608)
🚫 [eslint] <prettier/prettier> reported by reviewdog 🐶
Replace ``[Slack]·Unexpected·error·in·deleteExistingEmoji:·${error.message}
,
with⏎········
[Slack]·Unexpected·error·in·deleteExistingEmoji:·${error.message},⏎·······
dd51844878/src/plugins/slack-now-playing/main.ts (L618-L618)
🚫 [eslint] <prettier/prettier> reported by reviewdog 🐶
Insert
··
dd51844878/src/plugins/slack-now-playing/main.ts (L619-L619)
🚫 [eslint] <prettier/prettier> reported by reviewdog 🐶
Replace
········stack:·error.stack
with··········stack:·error.stack,
dd51844878/src/plugins/slack-now-playing/main.ts (L620-L620)
🚫 [eslint] <prettier/prettier> reported by reviewdog 🐶
Replace
······}
with········},⏎······
dd51844878/src/plugins/slack-now-playing/main.ts (L621-L621)
🚫 [eslint] <prettier/prettier> reported by reviewdog 🐶
Replace
[Slack]·Unexpected·error·in·deleteExistingEmoji:·${String(error)}
with⏎········
[Slack]·Unexpected·error·in·deleteExistingEmoji:·${String(error)},⏎······
dd51844878/src/plugins/slack-now-playing/main.ts (L623-L623)
⚠️ [eslint] <@typescript-eslint/no-unused-vars> reported by reviewdog 🐶
'error' is defined but never used.
dd51844878/src/plugins/slack-now-playing/main.ts (L641-L641)
🚫 [eslint] <@typescript-eslint/no-explicit-any> reported by reviewdog 🐶
Unexpected any. Specify a different type.
dd51844878/src/plugins/slack-now-playing/main.ts (L641-L641)
🚫 [eslint] <prettier/prettier> reported by reviewdog 🐶
Replace
signal
with(signal)
dd51844878/src/plugins/slack-now-playing/main.ts (L648-L648)
🚫 [eslint] <stylistic/arrow-parens> reported by reviewdog 🐶
Expected parentheses around arrow function argument.
dd51844878/src/plugins/slack-now-playing/main.ts (L648-L648)
⚠️ [eslint] <@typescript-eslint/no-unused-vars> reported by reviewdog 🐶
'error' is defined but never used.
dd51844878/src/plugins/slack-now-playing/main.ts (L674-L674)
🚫 [eslint] <@typescript-eslint/no-explicit-any> reported by reviewdog 🐶
Unexpected any. Specify a different type.
dd51844878/src/plugins/slack-now-playing/main.ts (L674-L674)
🚫 [eslint] <@typescript-eslint/no-unsafe-call> reported by reviewdog 🐶
Unsafe call of a(n)
error
type typed value.dd51844878/src/plugins/slack-now-playing/main.ts (L687-L687)
🚫 [eslint] <prettier/prettier> reported by reviewdog 🐶
Replace
Slack·Now·Playing·configuration·validation·failed:·${validationResult.errors.join(',·')}
with⏎··············
Slack·Now·Playing·configuration·validation·failed:·${validationResult.errors.join(',·')},⏎············
dd51844878/src/plugins/slack-now-playing/main.ts (L717-L717)
🚫 [eslint] <@typescript-eslint/no-unsafe-argument> reported by reviewdog 🐶
Unsafe argument of type
any
assigned to a parameter of typeSongInfo
.dd51844878/src/plugins/slack-now-playing/main.ts (L723-L723)
🚫 [eslint] <prettier/prettier> reported by reviewdog 🐶
Replace
⏎··········.catch(error
with.catch((error)
dd51844878/src/plugins/slack-now-playing/main.ts (L723-L724)
🚫 [eslint] <stylistic/arrow-parens> reported by reviewdog 🐶
Expected parentheses around arrow function argument.
dd51844878/src/plugins/slack-now-playing/main.ts (L724-L724)
🚫 [eslint] <prettier/prettier> reported by reviewdog 🐶
Replace
············
with··········
dd51844878/src/plugins/slack-now-playing/main.ts (L725-L725)
🚫 [eslint] <prettier/prettier> reported by reviewdog 🐶
Delete
··
dd51844878/src/plugins/slack-now-playing/main.ts (L726-L726)
🚫 [eslint] <prettier/prettier> reported by reviewdog 🐶
Replace
··············
with············
dd51844878/src/plugins/slack-now-playing/main.ts (L727-L727)
🚫 [eslint] <prettier/prettier> reported by reviewdog 🐶
Replace
··············if·(error.message.includes('authentication')·||·error.message.includes('token')
with············if·(⏎··············error.message.includes('authentication')·||⏎··············error.message.includes('token')⏎············
dd51844878/src/plugins/slack-now-playing/main.ts (L728-L728)
🚫 [eslint] <prettier/prettier> reported by reviewdog 🐶
Replace
················console.error('Slack·authentication·failed.·Please·check·your·API·token·and·cookie·token.');
with··············console.error(⏎················'Slack·authentication·failed.·Please·check·your·API·token·and·cookie·token.',
dd51844878/src/plugins/slack-now-playing/main.ts (L729-L729)
🚫 [eslint] <prettier/prettier> reported by reviewdog 🐶
Replace
}
with);
dd51844878/src/plugins/slack-now-playing/main.ts (L730-L730)
🚫 [eslint] <prettier/prettier> reported by reviewdog 🐶
Insert
··········}⏎
dd51844878/src/plugins/slack-now-playing/main.ts (L731-L731)
🚫 [eslint] <prettier/prettier> reported by reviewdog 🐶
Replace
··else·if·(error.message.includes('rate·limit')·||·error.message.includes('rate_limited')
withelse·if·(⏎··············error.message.includes('rate·limit')·||⏎··············error.message.includes('rate_limited')⏎············
dd51844878/src/plugins/slack-now-playing/main.ts (L732-L732)
🚫 [eslint] <prettier/prettier> reported by reviewdog 🐶
Replace
················console.error('Slack·API·rate·limit·exceeded.·Please·try·again·later.');
with··············console.error(⏎················'Slack·API·rate·limit·exceeded.·Please·try·again·later.',
dd51844878/src/plugins/slack-now-playing/main.ts (L733-L733)
🚫 [eslint] <prettier/prettier> reported by reviewdog 🐶
Replace
}
with);
dd51844878/src/plugins/slack-now-playing/main.ts (L734-L734)
🚫 [eslint] <prettier/prettier> reported by reviewdog 🐶
Insert
··········}⏎
dd51844878/src/plugins/slack-now-playing/main.ts (L735-L735)
🚫 [eslint] <prettier/prettier> reported by reviewdog 🐶
Replace
··············
with············
dd51844878/src/plugins/slack-now-playing/main.ts (L736-L736)
🚫 [eslint] <prettier/prettier> reported by reviewdog 🐶
Delete
··
dd51844878/src/plugins/slack-now-playing/main.ts (L737-L737)
🚫 [eslint] <prettier/prettier> reported by reviewdog 🐶
Delete
··
dd51844878/src/plugins/slack-now-playing/main.ts (L738-L738)
🚫 [eslint] <prettier/prettier> reported by reviewdog 🐶
Delete
··
dd51844878/src/plugins/slack-now-playing/main.ts (L739-L739)
🚫 [eslint] <prettier/prettier> reported by reviewdog 🐶
Delete
··
dd51844878/src/plugins/slack-now-playing/main.ts (L740-L740)
🚫 [eslint] <prettier/prettier> reported by reviewdog 🐶
Delete
··
dd51844878/src/plugins/slack-now-playing/main.ts (L741-L741)
🚫 [eslint] <prettier/prettier> reported by reviewdog 🐶
Delete
··
dd51844878/src/plugins/slack-now-playing/main.ts (L742-L742)
🚫 [eslint] <@typescript-eslint/no-explicit-any> reported by reviewdog 🐶
Unexpected any. Specify a different type.
dd51844878/src/plugins/slack-now-playing/main.ts (L743-L743)
🚫 [eslint] <prettier/prettier> reported by reviewdog 🐶
Insert
,
dd51844878/src/plugins/slack-now-playing/main.ts (L748-L748)
🚫 [eslint] <@typescript-eslint/no-unsafe-assignment> reported by reviewdog 🐶
Unsafe assignment of an
any
value.dd51844878/src/plugins/slack-now-playing/main.ts (L788-L788)
🚫 [eslint] <@typescript-eslint/no-unsafe-call> reported by reviewdog 🐶
Unsafe call of a(n)
any
typed value.dd51844878/src/plugins/slack-now-playing/main.ts (L788-L788)
🚫 [eslint] <@typescript-eslint/no-unsafe-member-access> reported by reviewdog 🐶
Unsafe member access .getConfig on an
any
value.dd51844878/src/plugins/slack-now-playing/main.ts (L788-L788)
🚫 [eslint] <@typescript-eslint/no-explicit-any> reported by reviewdog 🐶
Unexpected any. Specify a different type.
dd51844878/src/plugins/slack-now-playing/main.ts (L799-L799)
🚫 [eslint] <prettier/prettier> reported by reviewdog 🐶
Replace
Slack·Now·Playing·configuration·validation·failed:·${error·instanceof·Error·?·error.message·:·String(error)}
with⏎············
Slack·Now·Playing·configuration·validation·failed:·${error·instanceof·Error·?·error.message·:·String(error)},⏎··········
dd51844878/src/plugins/slack-now-playing/main.ts (L800-L800)
🚫 [eslint] <@typescript-eslint/no-explicit-any> reported by reviewdog 🐶
Unexpected any. Specify a different type.
dd51844878/src/plugins/slack-now-playing/main.ts (L802-L802)
🚫 [eslint] <@typescript-eslint/consistent-type-imports> reported by reviewdog 🐶
Imports "BrowserWindow" are only used as type.
dd51844878/src/plugins/slack-now-playing/menu.ts (L2-L2)
🚫 [eslint] <importPlugin/order> reported by reviewdog 🐶
There should be at least one empty line between import groups
dd51844878/src/plugins/slack-now-playing/menu.ts (L2-L2)
🚫 [eslint] <prettier/prettier> reported by reviewdog 🐶
Replace
'Invalid·Slack·cookie·token·format·(should·start·with·"xoxd-")'
with⏎······'Invalid·Slack·cookie·token·format·(should·start·with·"xoxd-")',⏎····
dd51844878/src/plugins/slack-now-playing/menu.ts (L37-L37)
🚫 [eslint] <prettier/prettier> reported by reviewdog 🐶
Replace
'Invalid·emoji·name·format·(should·only·contain·lowercase·letters,·numbers,·hyphens,·and·underscores)'
with⏎······'Invalid·emoji·name·format·(should·only·contain·lowercase·letters,·numbers,·hyphens,·and·underscores)',⏎····
dd51844878/src/plugins/slack-now-playing/menu.ts (L44-L44)
🚫 [eslint] <prettier/prettier> reported by reviewdog 🐶
Insert
,
dd51844878/src/plugins/slack-now-playing/menu.ts (L49-L49)
🚫 [eslint] <@typescript-eslint/await-thenable> reported by reviewdog 🐶
Unexpected
await
of a non-Promise (non-"Thenable") value.dd51844878/src/plugins/slack-now-playing/menu.ts (L144-L144)
🚫 [eslint] <@typescript-eslint/require-await> reported by reviewdog 🐶
Async arrow function 'onMenu' has no 'await' expression.
dd51844878/src/plugins/slack-now-playing/menu.ts (L164-L164)
🚫 [eslint] <@typescript-eslint/consistent-type-imports> reported by reviewdog 🐶
All imports in the declaration are only used as types. Use
import type
.dd51844878/src/plugins/slack-now-playing/slack-api-client.ts (L1-L1)
🚫 [eslint] <importPlugin/order> reported by reviewdog 🐶
There should be at least one empty line between import groups
dd51844878/src/plugins/slack-now-playing/slack-api-client.ts (L1-L1)
🚫 [eslint] <importPlugin/no-unresolved> reported by reviewdog 🐶
Unable to resolve path to module 'formdata-node'.
dd51844878/src/plugins/slack-now-playing/slack-api-client.ts (L1-L1)
🚫 [eslint] <importPlugin/order> reported by reviewdog 🐶
node:https
import should occur before import offormdata-node
dd51844878/src/plugins/slack-now-playing/slack-api-client.ts (L2-L2)
🚫 [eslint] <prettier/prettier> reported by reviewdog 🐶
Replace
·string·|·number·|·boolean·|·null·|·undefined·|·string[]
with⏎····|·string⏎····|·number⏎····|·boolean⏎····|·null⏎····|·undefined⏎····|·string[]⏎···
dd51844878/src/plugins/slack-now-playing/slack-api-client.ts (L71-L71)
🚫 [eslint] <prettier/prettier> reported by reviewdog 🐶
Insert
,
dd51844878/src/plugins/slack-now-playing/slack-api-client.ts (L100-L100)
🚫 [eslint] <@typescript-eslint/no-explicit-any> reported by reviewdog 🐶
Unexpected any. Specify a different type.
dd51844878/src/plugins/slack-now-playing/slack-api-client.ts (L158-L158)
🚫 [eslint] <prettier/prettier> reported by reviewdog 🐶
Replace
headers:·Record<string,·string>,·options:·{·disableSSLValidation?:·boolean·}·=·{}
with⏎····headers:·Record<string,·string>,⏎····options:·{·disableSSLValidation?:·boolean·}·=·{},⏎··
dd51844878/src/plugins/slack-now-playing/slack-api-client.ts (L219-L219)
🚫 [eslint] <prettier/prettier> reported by reviewdog 🐶
Insert
,
dd51844878/src/plugins/slack-now-playing/slack-api-client.ts (L221-L221)
🚫 [eslint] <@typescript-eslint/ban-ts-comment> reported by reviewdog 🐶
Use "@ts-expect-error" instead of "@ts-ignore", as "@ts-ignore" will do nothing if the following line is error-free.
dd51844878/src/plugins/slack-now-playing/slack-api-client.ts (L225-L225)
🚫 [eslint] <@typescript-eslint/no-explicit-any> reported by reviewdog 🐶
Unexpected any. Specify a different type.
dd51844878/src/plugins/slack-now-playing/slack-api-client.ts (L245-L245)
🚫 [eslint] <@typescript-eslint/no-explicit-any> reported by reviewdog 🐶
Unexpected any. Specify a different type.
dd51844878/src/plugins/slack-now-playing/slack-api-client.ts (L247-L247)
🚫 [eslint] <@typescript-eslint/no-redundant-type-constituents> reported by reviewdog 🐶
'FormData' is an 'error' type that acts as 'any' and overrides all other types in this union type.
dd51844878/src/plugins/slack-now-playing/slack-api-client.ts (L247-L247)
🚫 [eslint] <prettier/prettier> reported by reviewdog 🐶
Insert
,
dd51844878/src/plugins/slack-now-playing/slack-api-client.ts (L248-L248)
🚫 [eslint] <prettier/prettier> reported by reviewdog 🐶
Insert
,
dd51844878/src/plugins/slack-now-playing/slack-api-client.ts (L257-L257)
🚫 [eslint] <prefer-const> reported by reviewdog 🐶
'headers' is never reassigned. Use 'const' instead.
dd51844878/src/plugins/slack-now-playing/slack-api-client.ts (L262-L262)
🚫 [eslint] <@typescript-eslint/no-unsafe-assignment> reported by reviewdog 🐶
Unsafe assignment of an error typed value.
dd51844878/src/plugins/slack-now-playing/slack-api-client.ts (L263-L263)
🚫 [eslint] <@typescript-eslint/no-explicit-any> reported by reviewdog 🐶
Unexpected any. Specify a different type.
dd51844878/src/plugins/slack-now-playing/slack-api-client.ts (L263-L263)
🚫 [eslint] <@typescript-eslint/no-unsafe-assignment> reported by reviewdog 🐶
Unsafe assignment of an error typed value.
dd51844878/src/plugins/slack-now-playing/slack-api-client.ts (L267-L267)
🚫 [eslint] <@typescript-eslint/no-unsafe-argument> reported by reviewdog 🐶
Unsafe argument of type error typed assigned to a parameter of type
{ [s: string]: unknown; } | ArrayLike<unknown>
.dd51844878/src/plugins/slack-now-playing/slack-api-client.ts (L274-L274)
🚫 [eslint] <@typescript-eslint/no-base-to-string> reported by reviewdog 🐶
'value' will use Object's default stringification format ('[object Object]') when stringified.
dd51844878/src/plugins/slack-now-playing/slack-api-client.ts (L276-L276)
🚫 [eslint] <prettier/prettier> reported by reviewdog 🐶
Replace
·!process.env.NODE_ENV·||·process.env.NODE_ENV·===·'development'·||·process.env.NODE_ENV·===·'test'
with⏎··········!process.env.NODE_ENV·||⏎··········process.env.NODE_ENV·===·'development'·||⏎··········process.env.NODE_ENV·===·'test',
dd51844878/src/plugins/slack-now-playing/slack-api-client.ts (L290-L290)
🚫 [eslint] <@typescript-eslint/no-unsafe-assignment> reported by reviewdog 🐶
Unsafe assignment of an
any
value.dd51844878/src/plugins/slack-now-playing/slack-api-client.ts (L294-L294)
🚫 [eslint] <prettier/prettier> reported by reviewdog 🐶
Insert
,
dd51844878/src/plugins/slack-now-playing/slack-api-client.ts (L304-L304)
🚫 [eslint] <@typescript-eslint/no-unnecessary-type-assertion> reported by reviewdog 🐶
This assertion is unnecessary since it does not change the type of the expression.
dd51844878/src/plugins/slack-now-playing/slack-api-client.ts (L314-L314)
🚫 [eslint] <prettier/prettier> reported by reviewdog 🐶
Insert
,
dd51844878/src/plugins/slack-now-playing/slack-api-client.ts (L314-L314)
🚫 [eslint] <@typescript-eslint/no-explicit-any> reported by reviewdog 🐶
Unexpected any. Specify a different type.
dd51844878/src/plugins/slack-now-playing/slack-api-client.ts (L318-L318)
🚫 [eslint] <prettier/prettier> reported by reviewdog 🐶
Insert
,
dd51844878/src/plugins/slack-now-playing/slack-api-client.ts (L322-L322)
🚫 [eslint] <prettier/prettier> reported by reviewdog 🐶
Insert
,
dd51844878/src/plugins/slack-now-playing/slack-api-client.ts (L341-L341)
🚫 [eslint] <prettier/prettier> reported by reviewdog 🐶
Insert
,
dd51844878/src/plugins/slack-now-playing/slack-api-client.ts (L409-L409)
🚫 [eslint] <@typescript-eslint/no-explicit-any> reported by reviewdog 🐶
Unexpected any. Specify a different type.
dd51844878/src/plugins/slack-now-playing/slack-api-client.ts (L429-L429)
🚫 [eslint] <prettier/prettier> reported by reviewdog 🐶
Insert
,
dd51844878/src/plugins/slack-now-playing/slack-api-client.ts (L432-L432)
🚫 [eslint] <prettier/prettier> reported by reviewdog 🐶
Replace
string,·string·|·number·|·boolean·|·string[]·|·number[]
with⏎······string,⏎······string·|·number·|·boolean·|·string[]·|·number[]⏎····
dd51844878/src/plugins/slack-now-playing/slack-api-client.ts (L438-L438)
🚫 [eslint] <prettier/prettier> reported by reviewdog 🐶
Insert
⏎·······
dd51844878/src/plugins/slack-now-playing/slack-api-client.ts (L449-L449)
🚫 [eslint] <prettier/prettier> reported by reviewdog 🐶
Insert
,
dd51844878/src/plugins/slack-now-playing/slack-api-client.ts (L464-L464)
🚫 [eslint] <prettier/prettier> reported by reviewdog 🐶
Replace
·!process.env.NODE_ENV·||·process.env.NODE_ENV·===·'development'·||·process.env.NODE_ENV·===·'test'
with⏎··········!process.env.NODE_ENV·||⏎··········process.env.NODE_ENV·===·'development'·||⏎··········process.env.NODE_ENV·===·'test',
dd51844878/src/plugins/slack-now-playing/slack-api-client.ts (L486-L486)
🚫 [eslint] <@typescript-eslint/no-unnecessary-type-assertion> reported by reviewdog 🐶
This assertion is unnecessary since it does not change the type of the expression.
dd51844878/src/plugins/slack-now-playing/slack-api-client.ts (L499-L499)
🚫 [eslint] <prettier/prettier> reported by reviewdog 🐶
Insert
,
dd51844878/src/plugins/slack-now-playing/slack-api-client.ts (L499-L499)
🚫 [eslint] <@typescript-eslint/no-explicit-any> reported by reviewdog 🐶
Unexpected any. Specify a different type.
dd51844878/src/plugins/slack-now-playing/slack-api-client.ts (L510-L510)
🚫 [eslint] <prettier/prettier> reported by reviewdog 🐶
Insert
,
dd51844878/src/plugins/slack-now-playing/slack-api-client.ts (L514-L514)
@ -0,0 +1,18 @@
import { createPlugin } from '@/utils';
import { onMenu } from './menu';
import { backend, SlackNowPlayingConfig } from './main';
🚫 [eslint] <@typescript-eslint/consistent-type-imports> reported by reviewdog 🐶
Imports "SlackNowPlayingConfig" are only used as type.
@ -0,0 +1,807 @@
import { net } from 'electron';
🚫 [eslint] <importPlugin/order> reported by reviewdog 🐶
There should be at least one empty line between import groups
@ -0,0 +1,807 @@
import { net } from 'electron';
import fs from 'node:fs';
import path from 'node:path';
import os from 'node:os';
🚫 [eslint] <importPlugin/order> reported by reviewdog 🐶
electron
import should occur after import ofnode:os
🚫 [eslint] <importPlugin/order> reported by reviewdog 🐶
There should be at least one empty line between import groups
@ -0,0 +5,4 @@
import { SlackApiClient, SlackError } from './slack-api-client';
import { createBackend } from '@/utils';
import registerCallback, { SongInfoEvent } from '@/providers/song-info';
import { t } from '@/i18n';
🚫 [eslint] <importPlugin/order> reported by reviewdog 🐶
There should be at least one empty line between import groups
@ -0,0 +22,4 @@
* @param config The object to check
* @returns True if the object is a valid SlackNowPlayingConfig
*/
function isSlackNowPlayingConfig(config: unknown): config is SlackNowPlayingConfig {
🚫 [eslint] <prettier/prettier> reported by reviewdog 🐶
Replace
config:·unknown
with⏎··config:·unknown,⏎
@ -0,0 +26,4 @@
if (!config || typeof config !== 'object') return false;
const c = config as Partial<SlackNowPlayingConfig>;
return typeof c.enabled === 'boolean' &&
🚫 [eslint] <prettier/prettier> reported by reviewdog 🐶
Insert
(⏎····
@ -0,0 +27,4 @@
const c = config as Partial<SlackNowPlayingConfig>;
return typeof c.enabled === 'boolean' &&
typeof c.token === 'string' &&
🚫 [eslint] <prettier/prettier> reported by reviewdog 🐶
Replace
·········
with····
@ -0,0 +28,4 @@
const c = config as Partial<SlackNowPlayingConfig>;
return typeof c.enabled === 'boolean' &&
typeof c.token === 'string' &&
typeof c.cookieToken === 'string' &&
🚫 [eslint] <prettier/prettier> reported by reviewdog 🐶
Delete
·····
@ -0,0 +29,4 @@
return typeof c.enabled === 'boolean' &&
typeof c.token === 'string' &&
typeof c.cookieToken === 'string' &&
typeof c.emojiName === 'string';
🚫 [eslint] <prettier/prettier> reported by reviewdog 🐶
Replace
·········typeof·c.emojiName·===·'string'
with····typeof·c.emojiName·===·'string'⏎··)
@ -0,0 +32,4 @@
typeof c.emojiName === 'string';
}
const defaultEmojis = [':cd:', ':headphones:', ':musical_note:', ':notes:', ':radio:'];
🚫 [eslint] <prettier/prettier> reported by reviewdog 🐶
Replace
':cd:',·':headphones:',·':musical_note:',·':notes:',·':radio:'
with⏎··':cd:',⏎··':headphones:',⏎··':musical_note:',⏎··':notes:',⏎··':radio:',⏎
@ -0,0 +50,4 @@
albumArtCache: {} as AlbumArtCache, // Cache album art files
cacheExpiryMs: 30 * 60 * 1000, // Cache expiry time (30 minutes)
cacheCleanupTimer: undefined as NodeJS.Timeout | undefined, // Timer for periodic cache cleanup
context: undefined as any, // Store the plugin context
🚫 [eslint] <@typescript-eslint/no-unsafe-assignment> reported by reviewdog 🐶
Unsafe assignment of an
any
value.🚫 [eslint] <@typescript-eslint/no-explicit-any> reported by reviewdog 🐶
Unexpected any. Specify a different type.
@ -0,0 +71,4 @@
for (const filePath of state.tempFiles) {
try {
// Check if the file exists before attempting to delete it
await fsPromises.access(filePath, fs.constants.F_OK)
🚫 [eslint] <prettier/prettier> reported by reviewdog 🐶
Insert
⏎········
@ -0,0 +83,4 @@
console.error(`Error deleting temporary file ${filePath}:`, error);
}
});
} catch (error: any) {
🚫 [eslint] <@typescript-eslint/no-explicit-any> reported by reviewdog 🐶
Unexpected any. Specify a different type.
@ -0,0 +113,4 @@
await fsPromises.access(cacheEntry.filePath, fs.constants.F_OK);
await fsPromises.unlink(cacheEntry.filePath);
state.tempFiles.delete(cacheEntry.filePath);
} catch (error: any) {
⚠️ [eslint] <@typescript-eslint/no-unused-vars> reported by reviewdog 🐶
'error' is defined but never used.
🚫 [eslint] <@typescript-eslint/no-explicit-any> reported by reviewdog 🐶
Unexpected any. Specify a different type.
@ -0,0 +147,4 @@
if (!config.cookieToken) {
errors.push('Missing Slack cookie token');
} else if (!config.cookieToken.startsWith('xoxd-')) {
errors.push('Invalid Slack cookie token format (should start with "xoxd-")');
🚫 [eslint] <prettier/prettier> reported by reviewdog 🐶
Replace
'Invalid·Slack·cookie·token·format·(should·start·with·"xoxd-")'
with⏎······'Invalid·Slack·cookie·token·format·(should·start·with·"xoxd-")',⏎····
@ -0,0 +154,4 @@
if (!config.emojiName) {
errors.push('Missing custom emoji name');
} else if (!/^[a-z0-9_-]+$/.test(config.emojiName)) {
errors.push('Invalid emoji name format (should only contain lowercase letters, numbers, hyphens, and underscores)');
🚫 [eslint] <prettier/prettier> reported by reviewdog 🐶
Replace
'Invalid·emoji·name·format·(should·only·contain·lowercase·letters,·numbers,·hyphens,·and·underscores)'
with⏎······'Invalid·emoji·name·format·(should·only·contain·lowercase·letters,·numbers,·hyphens,·and·underscores)',⏎····
@ -0,0 +159,4 @@
return {
valid: errors.length === 0,
errors
🚫 [eslint] <prettier/prettier> reported by reviewdog 🐶
Insert
,
@ -0,0 +168,4 @@
* @param config The configuration to validate
* @throws Error if the configuration is invalid
*/
function assertValidConfig(config: SlackNowPlayingConfig): asserts config is SlackNowPlayingConfig {
🚫 [eslint] <prettier/prettier> reported by reviewdog 🐶
Replace
config:·SlackNowPlayingConfig
with⏎··config:·SlackNowPlayingConfig,⏎
@ -0,0 +171,4 @@
function assertValidConfig(config: SlackNowPlayingConfig): asserts config is SlackNowPlayingConfig {
const result = validateConfig(config);
if (!result.valid) {
throw new Error(`Invalid Slack Now Playing configuration: ${result.errors.join(', ')}`);
🚫 [eslint] <prettier/prettier> reported by reviewdog 🐶
Replace
Invalid·Slack·Now·Playing·configuration:·${result.errors.join(',·')}
with⏎······
Invalid·Slack·Now·Playing·configuration:·${result.errors.join(',·')},⏎····
@ -0,0 +180,4 @@
* @param songInfo Information about the current song
* @param config Plugin configuration
*/
async function setNowPlaying(songInfo: SongInfo, config: SlackNowPlayingConfig) {
🚫 [eslint] <prettier/prettier> reported by reviewdog 🐶
Replace
songInfo:·SongInfo,·config:·SlackNowPlayingConfig
with⏎··songInfo:·SongInfo,⏎··config:·SlackNowPlayingConfig,⏎
@ -0,0 +185,4 @@
// Validate configuration
const validationResult = validateConfig(config);
if (!validationResult.valid) {
console.error(`Cannot set Slack status: ${validationResult.errors.join(', ')}`);
🚫 [eslint] <prettier/prettier> reported by reviewdog 🐶
Replace
Cannot·set·Slack·status:·${validationResult.errors.join(',·')}
with⏎········
Cannot·set·Slack·status:·${validationResult.errors.join(',·')},⏎······
@ -0,0 +196,4 @@
const title = songInfo.alternativeTitle ?? songInfo.title;
const artistPart = songInfo.artist || 'Unknown Artist';
const truncatedArtist = artistPart.length > 50 ? artistPart.substring(0, 50) + '...' : artistPart;
🚫 [eslint] <prettier/prettier> reported by reviewdog 🐶
Insert
⏎·····
@ -0,0 +204,4 @@
.replace('{{title}}', title);
// Ensure the status text doesn't exceed Slack's limit
if (statusText.length > 97) statusText = statusText.substring(0, 97) + '...';
🚫 [eslint] <prettier/prettier> reported by reviewdog 🐶
Insert
⏎·····
@ -0,0 +211,4 @@
const remaining = Math.max(0, Math.floor(songInfo.songDuration - elapsed));
const expirationTime = Math.floor(Date.now() / 1000) + remaining;
await updateSlackStatusWithEmoji(statusText, expirationTime, songInfo, config);
🚫 [eslint] <prettier/prettier> reported by reviewdog 🐶
Replace
statusText,·expirationTime,·songInfo,·config
with⏎······statusText,⏎······expirationTime,⏎······songInfo,⏎······config,⏎····
@ -0,0 +212,4 @@
const expirationTime = Math.floor(Date.now() / 1000) + remaining;
await updateSlackStatusWithEmoji(statusText, expirationTime, songInfo, config);
} catch (error: any) {
🚫 [eslint] <@typescript-eslint/no-explicit-any> reported by reviewdog 🐶
Unexpected any. Specify a different type.
@ -0,0 +217,4 @@
if (error instanceof Error) {
console.error(`Error setting Slack status: ${error.message}`, {
name: error.name,
stack: error.stack
🚫 [eslint] <prettier/prettier> reported by reviewdog 🐶
Insert
,
@ -0,0 +224,4 @@
}
// Re-throw specific errors that should be handled by the caller
if (error instanceof Error &&
🚫 [eslint] <prettier/prettier> reported by reviewdog 🐶
Insert
⏎······
Remaining comments which cannot be posted as a review comment to avoid GitHub Rate Limit
eslint
🚫 [eslint] <prettier/prettier> reported by reviewdog 🐶
Insert
,
71752b943d/src/plugins/slack-now-playing/main.ts (L485-L485)
🚫 [eslint] <prettier/prettier> reported by reviewdog 🐶
Replace
Error·writing·album·art·to·file:·${fileError·instanceof·Error·?·fileError.message·:·String(fileError)}
with⏎········
Error·writing·album·art·to·file:·${fileError·instanceof·Error·?·fileError.message·:·String(fileError)},⏎······
71752b943d/src/plugins/slack-now-playing/main.ts (L490-L490)
🚫 [eslint] <@typescript-eslint/no-explicit-any> reported by reviewdog 🐶
Unexpected any. Specify a different type.
71752b943d/src/plugins/slack-now-playing/main.ts (L493-L493)
🚫 [eslint] <prettier/prettier> reported by reviewdog 🐶
Insert
,
71752b943d/src/plugins/slack-now-playing/main.ts (L498-L498)
🚫 [eslint] <prettier/prettier> reported by reviewdog 🐶
Replace
config:·SlackNowPlayingConfig
with⏎··config:·SlackNowPlayingConfig,⏎
71752b943d/src/plugins/slack-now-playing/main.ts (L512-L512)
🚫 [eslint] <prettier/prettier> reported by reviewdog 🐶
Replace
Cannot·check·emoji·existence:·${validationResult.errors.join(',·')}
with⏎········
Cannot·check·emoji·existence:·${validationResult.errors.join(',·')},⏎······
71752b943d/src/plugins/slack-now-playing/main.ts (L517-L517)
🚫 [eslint] <prettier/prettier> reported by reviewdog 🐶
Replace
response.emoji·&&·typeof·response.emoji·===·'object'·&&·config.emojiName·in·response.emoji
with⏎········response.emoji·&&⏎········typeof·response.emoji·===·'object'·&&⏎········config.emojiName·in·response.emoji⏎······
71752b943d/src/plugins/slack-now-playing/main.ts (L532-L532)
🚫 [eslint] <@typescript-eslint/no-explicit-any> reported by reviewdog 🐶
Unexpected any. Specify a different type.
71752b943d/src/plugins/slack-now-playing/main.ts (L539-L539)
🚫 [eslint] <prettier/prettier> reported by reviewdog 🐶
Replace
'Slack·authentication·failed.·Please·check·your·API·token·and·cookie·token.'
with⏎············'Slack·authentication·failed.·Please·check·your·API·token·and·cookie·token.',⏎··········
71752b943d/src/plugins/slack-now-playing/main.ts (L545-L545)
🚫 [eslint] <prettier/prettier> reported by reviewdog 🐶
Replace
'Slack·API·rate·limit·exceeded.·Please·try·again·later.'
with⏎············'Slack·API·rate·limit·exceeded.·Please·try·again·later.',⏎··········
71752b943d/src/plugins/slack-now-playing/main.ts (L547-L547)
🚫 [eslint] <prettier/prettier> reported by reviewdog 🐶
Replace
Error·checking·emoji·list:·${errorCode·||·apiError.message}
with⏎············
Error·checking·emoji·list:·${errorCode·||·apiError.message},⏎··········
71752b943d/src/plugins/slack-now-playing/main.ts (L549-L549)
🚫 [eslint] <prettier/prettier> reported by reviewdog 🐶
Replace
[Slack]·Error·checking·emoji·list:·${apiError·instanceof·Error·?·apiError.message·:·String(apiError)}
with⏎··········
[Slack]·Error·checking·emoji·list:·${apiError·instanceof·Error·?·apiError.message·:·String(apiError)},⏎········
71752b943d/src/plugins/slack-now-playing/main.ts (L552-L552)
🚫 [eslint] <prettier/prettier> reported by reviewdog 🐶
Replace ``[Slack]·Unexpected·error·in·ensureEmojiDoesNotExist:·${error.message}
,
with⏎········
[Slack]·Unexpected·error·in·ensureEmojiDoesNotExist:·${error.message},⏎·······
71752b943d/src/plugins/slack-now-playing/main.ts (L562-L562)
🚫 [eslint] <prettier/prettier> reported by reviewdog 🐶
Insert
··
71752b943d/src/plugins/slack-now-playing/main.ts (L563-L563)
🚫 [eslint] <prettier/prettier> reported by reviewdog 🐶
Replace
stack:·error.stack
with··stack:·error.stack,
71752b943d/src/plugins/slack-now-playing/main.ts (L564-L564)
🚫 [eslint] <prettier/prettier> reported by reviewdog 🐶
Replace
······}
with········},⏎······
71752b943d/src/plugins/slack-now-playing/main.ts (L565-L565)
🚫 [eslint] <prettier/prettier> reported by reviewdog 🐶
Replace
[Slack]·Unexpected·error·in·ensureEmojiDoesNotExist:·${String(error)}
with⏎········
[Slack]·Unexpected·error·in·ensureEmojiDoesNotExist:·${String(error)},⏎······
71752b943d/src/plugins/slack-now-playing/main.ts (L567-L567)
🚫 [eslint] <prettier/prettier> reported by reviewdog 🐶
Replace
config:·SlackNowPlayingConfig
with⏎··config:·SlackNowPlayingConfig,⏎
71752b943d/src/plugins/slack-now-playing/main.ts (L578-L578)
🚫 [eslint] <prettier/prettier> reported by reviewdog 🐶
Replace
Cannot·delete·emoji:·${validationResult.errors.join(',·')}
with⏎········
Cannot·delete·emoji:·${validationResult.errors.join(',·')},⏎······
71752b943d/src/plugins/slack-now-playing/main.ts (L583-L583)
🚫 [eslint] <@typescript-eslint/no-explicit-any> reported by reviewdog 🐶
Unexpected any. Specify a different type.
71752b943d/src/plugins/slack-now-playing/main.ts (L597-L597)
🚫 [eslint] <prettier/prettier> reported by reviewdog 🐶
Replace ``Unexpected·error·deleting·emoji:·${apiError.message}
,
with⏎············
Unexpected·error·deleting·emoji:·${apiError.message},⏎···········
71752b943d/src/plugins/slack-now-playing/main.ts (L605-L605)
🚫 [eslint] <prettier/prettier> reported by reviewdog 🐶
Insert
··
71752b943d/src/plugins/slack-now-playing/main.ts (L606-L606)
🚫 [eslint] <prettier/prettier> reported by reviewdog 🐶
Replace
············stack:·apiError.stack
with··············stack:·apiError.stack,
71752b943d/src/plugins/slack-now-playing/main.ts (L607-L607)
🚫 [eslint] <prettier/prettier> reported by reviewdog 🐶
Replace
··········}
with············},⏎··········
71752b943d/src/plugins/slack-now-playing/main.ts (L608-L608)
🚫 [eslint] <prettier/prettier> reported by reviewdog 🐶
Replace ``[Slack]·Unexpected·error·in·deleteExistingEmoji:·${error.message}
,
with⏎········
[Slack]·Unexpected·error·in·deleteExistingEmoji:·${error.message},⏎·······
71752b943d/src/plugins/slack-now-playing/main.ts (L618-L618)
🚫 [eslint] <prettier/prettier> reported by reviewdog 🐶
Insert
··
71752b943d/src/plugins/slack-now-playing/main.ts (L619-L619)
🚫 [eslint] <prettier/prettier> reported by reviewdog 🐶
Replace
········stack:·error.stack
with··········stack:·error.stack,
71752b943d/src/plugins/slack-now-playing/main.ts (L620-L620)
🚫 [eslint] <prettier/prettier> reported by reviewdog 🐶
Replace
······}
with········},⏎······
71752b943d/src/plugins/slack-now-playing/main.ts (L621-L621)
🚫 [eslint] <prettier/prettier> reported by reviewdog 🐶
Replace
[Slack]·Unexpected·error·in·deleteExistingEmoji:·${String(error)}
with⏎········
[Slack]·Unexpected·error·in·deleteExistingEmoji:·${String(error)},⏎······
71752b943d/src/plugins/slack-now-playing/main.ts (L623-L623)
⚠️ [eslint] <@typescript-eslint/no-unused-vars> reported by reviewdog 🐶
'error' is defined but never used.
71752b943d/src/plugins/slack-now-playing/main.ts (L641-L641)
🚫 [eslint] <@typescript-eslint/no-explicit-any> reported by reviewdog 🐶
Unexpected any. Specify a different type.
71752b943d/src/plugins/slack-now-playing/main.ts (L641-L641)
🚫 [eslint] <prettier/prettier> reported by reviewdog 🐶
Replace
signal
with(signal)
71752b943d/src/plugins/slack-now-playing/main.ts (L648-L648)
🚫 [eslint] <stylistic/arrow-parens> reported by reviewdog 🐶
Expected parentheses around arrow function argument.
71752b943d/src/plugins/slack-now-playing/main.ts (L648-L648)
⚠️ [eslint] <@typescript-eslint/no-unused-vars> reported by reviewdog 🐶
'error' is defined but never used.
71752b943d/src/plugins/slack-now-playing/main.ts (L674-L674)
🚫 [eslint] <@typescript-eslint/no-explicit-any> reported by reviewdog 🐶
Unexpected any. Specify a different type.
71752b943d/src/plugins/slack-now-playing/main.ts (L674-L674)
🚫 [eslint] <@typescript-eslint/no-unsafe-call> reported by reviewdog 🐶
Unsafe call of a(n)
error
type typed value.71752b943d/src/plugins/slack-now-playing/main.ts (L687-L687)
🚫 [eslint] <prettier/prettier> reported by reviewdog 🐶
Replace
Slack·Now·Playing·configuration·validation·failed:·${validationResult.errors.join(',·')}
with⏎··············
Slack·Now·Playing·configuration·validation·failed:·${validationResult.errors.join(',·')},⏎············
71752b943d/src/plugins/slack-now-playing/main.ts (L717-L717)
🚫 [eslint] <@typescript-eslint/no-unsafe-argument> reported by reviewdog 🐶
Unsafe argument of type
any
assigned to a parameter of typeSongInfo
.71752b943d/src/plugins/slack-now-playing/main.ts (L723-L723)
🚫 [eslint] <prettier/prettier> reported by reviewdog 🐶
Replace
⏎··········.catch(error
with.catch((error)
71752b943d/src/plugins/slack-now-playing/main.ts (L723-L724)
🚫 [eslint] <stylistic/arrow-parens> reported by reviewdog 🐶
Expected parentheses around arrow function argument.
71752b943d/src/plugins/slack-now-playing/main.ts (L724-L724)
🚫 [eslint] <prettier/prettier> reported by reviewdog 🐶
Replace
············
with··········
71752b943d/src/plugins/slack-now-playing/main.ts (L725-L725)
🚫 [eslint] <prettier/prettier> reported by reviewdog 🐶
Delete
··
71752b943d/src/plugins/slack-now-playing/main.ts (L726-L726)
🚫 [eslint] <prettier/prettier> reported by reviewdog 🐶
Replace
··············
with············
71752b943d/src/plugins/slack-now-playing/main.ts (L727-L727)
🚫 [eslint] <prettier/prettier> reported by reviewdog 🐶
Replace
··············if·(error.message.includes('authentication')·||·error.message.includes('token')
with············if·(⏎··············error.message.includes('authentication')·||⏎··············error.message.includes('token')⏎············
71752b943d/src/plugins/slack-now-playing/main.ts (L728-L728)
🚫 [eslint] <prettier/prettier> reported by reviewdog 🐶
Replace
················console.error('Slack·authentication·failed.·Please·check·your·API·token·and·cookie·token.');
with··············console.error(⏎················'Slack·authentication·failed.·Please·check·your·API·token·and·cookie·token.',
71752b943d/src/plugins/slack-now-playing/main.ts (L729-L729)
🚫 [eslint] <prettier/prettier> reported by reviewdog 🐶
Replace
}
with);
71752b943d/src/plugins/slack-now-playing/main.ts (L730-L730)
🚫 [eslint] <prettier/prettier> reported by reviewdog 🐶
Insert
··········}⏎
71752b943d/src/plugins/slack-now-playing/main.ts (L731-L731)
🚫 [eslint] <prettier/prettier> reported by reviewdog 🐶
Replace
··else·if·(error.message.includes('rate·limit')·||·error.message.includes('rate_limited')
withelse·if·(⏎··············error.message.includes('rate·limit')·||⏎··············error.message.includes('rate_limited')⏎············
71752b943d/src/plugins/slack-now-playing/main.ts (L732-L732)
🚫 [eslint] <prettier/prettier> reported by reviewdog 🐶
Replace
················console.error('Slack·API·rate·limit·exceeded.·Please·try·again·later.');
with··············console.error(⏎················'Slack·API·rate·limit·exceeded.·Please·try·again·later.',
71752b943d/src/plugins/slack-now-playing/main.ts (L733-L733)
🚫 [eslint] <prettier/prettier> reported by reviewdog 🐶
Replace
}
with);
71752b943d/src/plugins/slack-now-playing/main.ts (L734-L734)
🚫 [eslint] <prettier/prettier> reported by reviewdog 🐶
Insert
··········}⏎
71752b943d/src/plugins/slack-now-playing/main.ts (L735-L735)
🚫 [eslint] <prettier/prettier> reported by reviewdog 🐶
Replace
··············
with············
71752b943d/src/plugins/slack-now-playing/main.ts (L736-L736)
🚫 [eslint] <prettier/prettier> reported by reviewdog 🐶
Delete
··
71752b943d/src/plugins/slack-now-playing/main.ts (L737-L737)
🚫 [eslint] <prettier/prettier> reported by reviewdog 🐶
Delete
··
71752b943d/src/plugins/slack-now-playing/main.ts (L738-L738)
🚫 [eslint] <prettier/prettier> reported by reviewdog 🐶
Delete
··
71752b943d/src/plugins/slack-now-playing/main.ts (L739-L739)
🚫 [eslint] <prettier/prettier> reported by reviewdog 🐶
Delete
··
71752b943d/src/plugins/slack-now-playing/main.ts (L740-L740)
🚫 [eslint] <prettier/prettier> reported by reviewdog 🐶
Delete
··
71752b943d/src/plugins/slack-now-playing/main.ts (L741-L741)
🚫 [eslint] <prettier/prettier> reported by reviewdog 🐶
Delete
··
71752b943d/src/plugins/slack-now-playing/main.ts (L742-L742)
🚫 [eslint] <@typescript-eslint/no-explicit-any> reported by reviewdog 🐶
Unexpected any. Specify a different type.
71752b943d/src/plugins/slack-now-playing/main.ts (L743-L743)
🚫 [eslint] <prettier/prettier> reported by reviewdog 🐶
Insert
,
71752b943d/src/plugins/slack-now-playing/main.ts (L748-L748)
🚫 [eslint] <@typescript-eslint/no-unsafe-assignment> reported by reviewdog 🐶
Unsafe assignment of an
any
value.71752b943d/src/plugins/slack-now-playing/main.ts (L788-L788)
🚫 [eslint] <@typescript-eslint/no-unsafe-call> reported by reviewdog 🐶
Unsafe call of a(n)
any
typed value.71752b943d/src/plugins/slack-now-playing/main.ts (L788-L788)
🚫 [eslint] <@typescript-eslint/no-unsafe-member-access> reported by reviewdog 🐶
Unsafe member access .getConfig on an
any
value.71752b943d/src/plugins/slack-now-playing/main.ts (L788-L788)
🚫 [eslint] <@typescript-eslint/no-explicit-any> reported by reviewdog 🐶
Unexpected any. Specify a different type.
71752b943d/src/plugins/slack-now-playing/main.ts (L799-L799)
🚫 [eslint] <prettier/prettier> reported by reviewdog 🐶
Replace
Slack·Now·Playing·configuration·validation·failed:·${error·instanceof·Error·?·error.message·:·String(error)}
with⏎············
Slack·Now·Playing·configuration·validation·failed:·${error·instanceof·Error·?·error.message·:·String(error)},⏎··········
71752b943d/src/plugins/slack-now-playing/main.ts (L800-L800)
🚫 [eslint] <@typescript-eslint/no-explicit-any> reported by reviewdog 🐶
Unexpected any. Specify a different type.
71752b943d/src/plugins/slack-now-playing/main.ts (L802-L802)
🚫 [eslint] <@typescript-eslint/consistent-type-imports> reported by reviewdog 🐶
Imports "BrowserWindow" are only used as type.
71752b943d/src/plugins/slack-now-playing/menu.ts (L2-L2)
🚫 [eslint] <importPlugin/order> reported by reviewdog 🐶
There should be at least one empty line between import groups
71752b943d/src/plugins/slack-now-playing/menu.ts (L2-L2)
🚫 [eslint] <prettier/prettier> reported by reviewdog 🐶
Replace
'Invalid·Slack·cookie·token·format·(should·start·with·"xoxd-")'
with⏎······'Invalid·Slack·cookie·token·format·(should·start·with·"xoxd-")',⏎····
71752b943d/src/plugins/slack-now-playing/menu.ts (L37-L37)
🚫 [eslint] <prettier/prettier> reported by reviewdog 🐶
Replace
'Invalid·emoji·name·format·(should·only·contain·lowercase·letters,·numbers,·hyphens,·and·underscores)'
with⏎······'Invalid·emoji·name·format·(should·only·contain·lowercase·letters,·numbers,·hyphens,·and·underscores)',⏎····
71752b943d/src/plugins/slack-now-playing/menu.ts (L44-L44)
🚫 [eslint] <prettier/prettier> reported by reviewdog 🐶
Insert
,
71752b943d/src/plugins/slack-now-playing/menu.ts (L49-L49)
🚫 [eslint] <@typescript-eslint/await-thenable> reported by reviewdog 🐶
Unexpected
await
of a non-Promise (non-"Thenable") value.71752b943d/src/plugins/slack-now-playing/menu.ts (L144-L144)
🚫 [eslint] <@typescript-eslint/require-await> reported by reviewdog 🐶
Async arrow function 'onMenu' has no 'await' expression.
71752b943d/src/plugins/slack-now-playing/menu.ts (L164-L164)
🚫 [eslint] <@typescript-eslint/consistent-type-imports> reported by reviewdog 🐶
All imports in the declaration are only used as types. Use
import type
.71752b943d/src/plugins/slack-now-playing/slack-api-client.ts (L1-L1)
🚫 [eslint] <importPlugin/order> reported by reviewdog 🐶
There should be at least one empty line between import groups
71752b943d/src/plugins/slack-now-playing/slack-api-client.ts (L1-L1)
🚫 [eslint] <importPlugin/no-unresolved> reported by reviewdog 🐶
Unable to resolve path to module 'formdata-node'.
71752b943d/src/plugins/slack-now-playing/slack-api-client.ts (L1-L1)
🚫 [eslint] <importPlugin/order> reported by reviewdog 🐶
node:https
import should occur before import offormdata-node
71752b943d/src/plugins/slack-now-playing/slack-api-client.ts (L2-L2)
🚫 [eslint] <prettier/prettier> reported by reviewdog 🐶
Replace
·string·|·number·|·boolean·|·null·|·undefined·|·string[]
with⏎····|·string⏎····|·number⏎····|·boolean⏎····|·null⏎····|·undefined⏎····|·string[]⏎···
71752b943d/src/plugins/slack-now-playing/slack-api-client.ts (L71-L71)
🚫 [eslint] <prettier/prettier> reported by reviewdog 🐶
Insert
,
71752b943d/src/plugins/slack-now-playing/slack-api-client.ts (L100-L100)
🚫 [eslint] <@typescript-eslint/no-explicit-any> reported by reviewdog 🐶
Unexpected any. Specify a different type.
71752b943d/src/plugins/slack-now-playing/slack-api-client.ts (L158-L158)
🚫 [eslint] <prettier/prettier> reported by reviewdog 🐶
Replace
headers:·Record<string,·string>,·options:·{·disableSSLValidation?:·boolean·}·=·{}
with⏎····headers:·Record<string,·string>,⏎····options:·{·disableSSLValidation?:·boolean·}·=·{},⏎··
71752b943d/src/plugins/slack-now-playing/slack-api-client.ts (L219-L219)
🚫 [eslint] <prettier/prettier> reported by reviewdog 🐶
Insert
,
71752b943d/src/plugins/slack-now-playing/slack-api-client.ts (L221-L221)
🚫 [eslint] <@typescript-eslint/ban-ts-comment> reported by reviewdog 🐶
Use "@ts-expect-error" instead of "@ts-ignore", as "@ts-ignore" will do nothing if the following line is error-free.
71752b943d/src/plugins/slack-now-playing/slack-api-client.ts (L225-L225)
🚫 [eslint] <@typescript-eslint/no-explicit-any> reported by reviewdog 🐶
Unexpected any. Specify a different type.
71752b943d/src/plugins/slack-now-playing/slack-api-client.ts (L245-L245)
🚫 [eslint] <@typescript-eslint/no-explicit-any> reported by reviewdog 🐶
Unexpected any. Specify a different type.
71752b943d/src/plugins/slack-now-playing/slack-api-client.ts (L247-L247)
🚫 [eslint] <@typescript-eslint/no-redundant-type-constituents> reported by reviewdog 🐶
'FormData' is an 'error' type that acts as 'any' and overrides all other types in this union type.
71752b943d/src/plugins/slack-now-playing/slack-api-client.ts (L247-L247)
🚫 [eslint] <prettier/prettier> reported by reviewdog 🐶
Insert
,
71752b943d/src/plugins/slack-now-playing/slack-api-client.ts (L248-L248)
🚫 [eslint] <prettier/prettier> reported by reviewdog 🐶
Insert
,
71752b943d/src/plugins/slack-now-playing/slack-api-client.ts (L257-L257)
🚫 [eslint] <prefer-const> reported by reviewdog 🐶
'headers' is never reassigned. Use 'const' instead.
71752b943d/src/plugins/slack-now-playing/slack-api-client.ts (L262-L262)
🚫 [eslint] <@typescript-eslint/no-unsafe-assignment> reported by reviewdog 🐶
Unsafe assignment of an error typed value.
71752b943d/src/plugins/slack-now-playing/slack-api-client.ts (L263-L263)
🚫 [eslint] <@typescript-eslint/no-explicit-any> reported by reviewdog 🐶
Unexpected any. Specify a different type.
71752b943d/src/plugins/slack-now-playing/slack-api-client.ts (L263-L263)
🚫 [eslint] <@typescript-eslint/no-unsafe-assignment> reported by reviewdog 🐶
Unsafe assignment of an error typed value.
71752b943d/src/plugins/slack-now-playing/slack-api-client.ts (L267-L267)
🚫 [eslint] <@typescript-eslint/no-unsafe-argument> reported by reviewdog 🐶
Unsafe argument of type error typed assigned to a parameter of type
{ [s: string]: unknown; } | ArrayLike<unknown>
.71752b943d/src/plugins/slack-now-playing/slack-api-client.ts (L274-L274)
🚫 [eslint] <@typescript-eslint/no-base-to-string> reported by reviewdog 🐶
'value' will use Object's default stringification format ('[object Object]') when stringified.
71752b943d/src/plugins/slack-now-playing/slack-api-client.ts (L276-L276)
🚫 [eslint] <prettier/prettier> reported by reviewdog 🐶
Replace
·!process.env.NODE_ENV·||·process.env.NODE_ENV·===·'development'·||·process.env.NODE_ENV·===·'test'
with⏎··········!process.env.NODE_ENV·||⏎··········process.env.NODE_ENV·===·'development'·||⏎··········process.env.NODE_ENV·===·'test',
71752b943d/src/plugins/slack-now-playing/slack-api-client.ts (L290-L290)
🚫 [eslint] <@typescript-eslint/no-unsafe-assignment> reported by reviewdog 🐶
Unsafe assignment of an
any
value.71752b943d/src/plugins/slack-now-playing/slack-api-client.ts (L294-L294)
🚫 [eslint] <prettier/prettier> reported by reviewdog 🐶
Insert
,
71752b943d/src/plugins/slack-now-playing/slack-api-client.ts (L304-L304)
🚫 [eslint] <@typescript-eslint/no-unnecessary-type-assertion> reported by reviewdog 🐶
This assertion is unnecessary since it does not change the type of the expression.
71752b943d/src/plugins/slack-now-playing/slack-api-client.ts (L314-L314)
🚫 [eslint] <prettier/prettier> reported by reviewdog 🐶
Insert
,
71752b943d/src/plugins/slack-now-playing/slack-api-client.ts (L314-L314)
🚫 [eslint] <@typescript-eslint/no-explicit-any> reported by reviewdog 🐶
Unexpected any. Specify a different type.
71752b943d/src/plugins/slack-now-playing/slack-api-client.ts (L318-L318)
🚫 [eslint] <prettier/prettier> reported by reviewdog 🐶
Insert
,
71752b943d/src/plugins/slack-now-playing/slack-api-client.ts (L322-L322)
🚫 [eslint] <prettier/prettier> reported by reviewdog 🐶
Insert
,
71752b943d/src/plugins/slack-now-playing/slack-api-client.ts (L341-L341)
🚫 [eslint] <prettier/prettier> reported by reviewdog 🐶
Insert
,
71752b943d/src/plugins/slack-now-playing/slack-api-client.ts (L409-L409)
🚫 [eslint] <@typescript-eslint/no-explicit-any> reported by reviewdog 🐶
Unexpected any. Specify a different type.
71752b943d/src/plugins/slack-now-playing/slack-api-client.ts (L429-L429)
🚫 [eslint] <prettier/prettier> reported by reviewdog 🐶
Insert
,
71752b943d/src/plugins/slack-now-playing/slack-api-client.ts (L432-L432)
🚫 [eslint] <prettier/prettier> reported by reviewdog 🐶
Replace
string,·string·|·number·|·boolean·|·string[]·|·number[]
with⏎······string,⏎······string·|·number·|·boolean·|·string[]·|·number[]⏎····
71752b943d/src/plugins/slack-now-playing/slack-api-client.ts (L438-L438)
🚫 [eslint] <prettier/prettier> reported by reviewdog 🐶
Insert
⏎·······
71752b943d/src/plugins/slack-now-playing/slack-api-client.ts (L449-L449)
🚫 [eslint] <prettier/prettier> reported by reviewdog 🐶
Insert
,
71752b943d/src/plugins/slack-now-playing/slack-api-client.ts (L464-L464)
🚫 [eslint] <prettier/prettier> reported by reviewdog 🐶
Replace
·!process.env.NODE_ENV·||·process.env.NODE_ENV·===·'development'·||·process.env.NODE_ENV·===·'test'
with⏎··········!process.env.NODE_ENV·||⏎··········process.env.NODE_ENV·===·'development'·||⏎··········process.env.NODE_ENV·===·'test',
71752b943d/src/plugins/slack-now-playing/slack-api-client.ts (L486-L486)
🚫 [eslint] <@typescript-eslint/no-unnecessary-type-assertion> reported by reviewdog 🐶
This assertion is unnecessary since it does not change the type of the expression.
71752b943d/src/plugins/slack-now-playing/slack-api-client.ts (L499-L499)
🚫 [eslint] <prettier/prettier> reported by reviewdog 🐶
Insert
,
71752b943d/src/plugins/slack-now-playing/slack-api-client.ts (L499-L499)
🚫 [eslint] <@typescript-eslint/no-explicit-any> reported by reviewdog 🐶
Unexpected any. Specify a different type.
71752b943d/src/plugins/slack-now-playing/slack-api-client.ts (L510-L510)
🚫 [eslint] <prettier/prettier> reported by reviewdog 🐶
Insert
,
71752b943d/src/plugins/slack-now-playing/slack-api-client.ts (L514-L514)
@ -0,0 +225,4 @@
// Re-throw specific errors that should be handled by the caller
if (error instanceof Error &&
(error.message.includes('token') || error.message.includes('authentication'))) {
🚫 [eslint] <prettier/prettier> reported by reviewdog 🐶
Replace
········(error.message.includes('token')·||·error.message.includes('authentication'))
with······(error.message.includes('token')·||⏎········error.message.includes('authentication'))⏎····
@ -0,0 +226,4 @@
// Re-throw specific errors that should be handled by the caller
if (error instanceof Error &&
(error.message.includes('token') || error.message.includes('authentication'))) {
throw new Error('Slack authentication failed. Please check your API token and cookie token.');
🚫 [eslint] <prettier/prettier> reported by reviewdog 🐶
Replace
'Slack·authentication·failed.·Please·check·your·API·token·and·cookie·token.'
with⏎········'Slack·authentication·failed.·Please·check·your·API·token·and·cookie·token.',⏎······
@ -0,0 +249,4 @@
// Validate configuration
const validationResult = validateConfig(config);
if (!validationResult.valid) {
throw new Error(`Cannot update Slack status: ${validationResult.errors.join(', ')}`);
🚫 [eslint] <prettier/prettier> reported by reviewdog 🐶
Replace
Cannot·update·Slack·status:·${validationResult.errors.join(',·')}
with⏎········
Cannot·update·Slack·status:·${validationResult.errors.join(',·')},⏎······
@ -0,0 +273,4 @@
// Update state with the new status and emoji
state.lastStatus = statusText;
state.lastEmoji = statusEmoji;
🚫 [eslint] <prettier/prettier> reported by reviewdog 🐶
Delete
⏎
@ -0,0 +287,4 @@
else if (error instanceof Error) {
console.error(`Error updating Slack status: ${error.message}`, {
name: error.name,
stack: error.stack
🚫 [eslint] <prettier/prettier> reported by reviewdog 🐶
Insert
,
@ -0,0 +298,4 @@
}
}
async function getStatusEmoji(songInfo: SongInfo, config: SlackNowPlayingConfig): Promise<string> {
🚫 [eslint] <prettier/prettier> reported by reviewdog 🐶
Replace
songInfo:·SongInfo,·config:·SlackNowPlayingConfig
with⏎··songInfo:·SongInfo,⏎··config:·SlackNowPlayingConfig,⏎
@ -0,0 +299,4 @@
}
async function getStatusEmoji(songInfo: SongInfo, config: SlackNowPlayingConfig): Promise<string> {
if (songInfo.imageSrc && await uploadEmojiToSlack(songInfo, config)) {
🚫 [eslint] <prettier/prettier> reported by reviewdog 🐶
Replace
await·uploadEmojiToSlack(songInfo,·config
with(await·uploadEmojiToSlack(songInfo,·config)
@ -0,0 +313,4 @@
* @param config Plugin configuration
* @returns True if the emoji was successfully uploaded, false otherwise
*/
async function uploadEmojiToSlack(songInfo: SongInfo, config: SlackNowPlayingConfig): Promise<boolean> {
🚫 [eslint] <prettier/prettier> reported by reviewdog 🐶
Replace
songInfo:·SongInfo,·config:·SlackNowPlayingConfig
with⏎··songInfo:·SongInfo,⏎··config:·SlackNowPlayingConfig,⏎
@ -0,0 +318,4 @@
// Validate configuration
const validationResult = validateConfig(config);
if (!validationResult.valid) {
console.error(`Cannot upload emoji to Slack: ${validationResult.errors.join(', ')}`);
🚫 [eslint] <prettier/prettier> reported by reviewdog 🐶
Replace
Cannot·upload·emoji·to·Slack:·${validationResult.errors.join(',·')}
with⏎········
Cannot·upload·emoji·to·Slack:·${validationResult.errors.join(',·')},⏎······
@ -0,0 +349,4 @@
const imageFile = new File([fileBuffer], filename);
formData.append('image', imageFile, filename);
} catch (fileError: any) {
🚫 [eslint] <prettier/prettier> reported by reviewdog 🐶
Delete
⏎
🚫 [eslint] <@typescript-eslint/no-explicit-any> reported by reviewdog 🐶
Unexpected any. Specify a different type.
@ -0,0 +350,4 @@
formData.append('image', imageFile, filename);
} catch (fileError: any) {
console.error(`Error preparing album art file: ${fileError instanceof Error ? fileError.message : String(fileError)}`);
🚫 [eslint] <prettier/prettier> reported by reviewdog 🐶
Replace
Error·preparing·album·art·file:·${fileError·instanceof·Error·?·fileError.message·:·String(fileError)}
with⏎········
Error·preparing·album·art·file:·${fileError·instanceof·Error·?·fileError.message·:·String(fileError)},⏎······
@ -0,0 +364,4 @@
const errorCode = apiError.responseData.error;
if (errorCode === 'invalid_name') {
console.error(`Invalid emoji name: ${config.emojiName}. Emoji names can only contain lowercase letters, numbers, hyphens, and underscores.`);
🚫 [eslint] <prettier/prettier> reported by reviewdog 🐶
Replace
Invalid·emoji·name:·${config.emojiName}.·Emoji·names·can·only·contain·lowercase·letters,·numbers,·hyphens,·and·underscores.
with⏎············
Invalid·emoji·name:·${config.emojiName}.·Emoji·names·can·only·contain·lowercase·letters,·numbers,·hyphens,·and·underscores.,⏎··········
@ -0,0 +366,4 @@
if (errorCode === 'invalid_name') {
console.error(`Invalid emoji name: ${config.emojiName}. Emoji names can only contain lowercase letters, numbers, hyphens, and underscores.`);
} else if (errorCode === 'too_large') {
console.error('Album art image is too large for Slack emoji (max 128KB).');
🚫 [eslint] <prettier/prettier> reported by reviewdog 🐶
Replace
'Album·art·image·is·too·large·for·Slack·emoji·(max·128KB).'
with⏎············'Album·art·image·is·too·large·for·Slack·emoji·(max·128KB).',⏎··········
@ -0,0 +368,4 @@
} else if (errorCode === 'too_large') {
console.error('Album art image is too large for Slack emoji (max 128KB).');
} else if (errorCode === 'name_taken') {
console.error(`Emoji name '${config.emojiName}' is already taken. This should not happen as we check for existing emojis.`);
🚫 [eslint] <prettier/prettier> reported by reviewdog 🐶
Replace
Emoji·name·'${config.emojiName}'·is·already·taken.·This·should·not·happen·as·we·check·for·existing·emojis.
with⏎············
Emoji·name·'${config.emojiName}'·is·already·taken.·This·should·not·happen·as·we·check·for·existing·emojis.,⏎··········
@ -0,0 +370,4 @@
} else if (errorCode === 'name_taken') {
console.error(`Emoji name '${config.emojiName}' is already taken. This should not happen as we check for existing emojis.`);
} else {
console.error(`Error uploading emoji: ${errorCode}`, apiError.responseData);
🚫 [eslint] <prettier/prettier> reported by reviewdog 🐶
Replace ``Error·uploading·emoji:·${errorCode}
,·apiError.responseData
with⏎············
Error·uploading·emoji:·${errorCode},⏎············apiError.responseData,⏎··········
@ -0,0 +375,4 @@
// Log the full Slack error response for diagnostics
console.error('Slack error full response:', apiError.responseData);
} else {
🚫 [eslint] <prettier/prettier> reported by reviewdog 🐶
Delete
⏎
@ -0,0 +376,4 @@
console.error('Slack error full response:', apiError.responseData);
} else {
console.error(`Error uploading emoji to Slack: ${apiError instanceof Error ? apiError.message : String(apiError)}`);
🚫 [eslint] <prettier/prettier> reported by reviewdog 🐶
Replace
Error·uploading·emoji·to·Slack:·${apiError·instanceof·Error·?·apiError.message·:·String(apiError)}
with⏎··········
Error·uploading·emoji·to·Slack:·${apiError·instanceof·Error·?·apiError.message·:·String(apiError)},⏎········
@ -0,0 +383,4 @@
} catch (error: unknown) {
// Handle any other unexpected errors
if (error instanceof Error) {
console.error(`Unexpected error uploading emoji to Slack: ${error.message}`, {
🚫 [eslint] <prettier/prettier> reported by reviewdog 🐶
Replace ``Unexpected·error·uploading·emoji·to·Slack:·${error.message}
,
with⏎········
Unexpected·error·uploading·emoji·to·Slack:·${error.message},⏎·······
@ -0,0 +384,4 @@
// Handle any other unexpected errors
if (error instanceof Error) {
console.error(`Unexpected error uploading emoji to Slack: ${error.message}`, {
name: error.name,
🚫 [eslint] <prettier/prettier> reported by reviewdog 🐶
Insert
··
@ -0,0 +385,4 @@
if (error instanceof Error) {
console.error(`Unexpected error uploading emoji to Slack: ${error.message}`, {
name: error.name,
stack: error.stack
🚫 [eslint] <prettier/prettier> reported by reviewdog 🐶
Replace
stack:·error.stack
with··stack:·error.stack,
@ -0,0 +386,4 @@
console.error(`Unexpected error uploading emoji to Slack: ${error.message}`, {
name: error.name,
stack: error.stack
});
🚫 [eslint] <prettier/prettier> reported by reviewdog 🐶
Replace
}
with··},⏎······
@ -0,0 +388,4 @@
stack: error.stack
});
} else {
console.error(`Unexpected error uploading emoji to Slack: ${String(error)}`);
🚫 [eslint] <prettier/prettier> reported by reviewdog 🐶
Replace
Unexpected·error·uploading·emoji·to·Slack:·${String(error)}
with⏎········
Unexpected·error·uploading·emoji·to·Slack:·${String(error)},⏎······
@ -0,0 +418,4 @@
// Verify the file still exists
await fs.promises.access(cachedImage.filePath, fs.constants.F_OK);
return cachedImage.filePath;
} catch (error: any) {
⚠️ [eslint] <@typescript-eslint/no-unused-vars> reported by reviewdog 🐶
'error' is defined but never used.
🚫 [eslint] <@typescript-eslint/no-explicit-any> reported by reviewdog 🐶
Unexpected any. Specify a different type.
@ -0,0 +429,4 @@
try {
await fs.promises.unlink(cachedImage.filePath);
state.tempFiles.delete(cachedImage.filePath);
} catch (error: any) {
⚠️ [eslint] <@typescript-eslint/no-unused-vars> reported by reviewdog 🐶
'error' is defined but never used.
🚫 [eslint] <@typescript-eslint/no-explicit-any> reported by reviewdog 🐶
Unexpected any. Specify a different type.
@ -0,0 +448,4 @@
response = await net.fetch(imageUrl);
if (!response.ok) {
console.error(`Failed to fetch album art: HTTP ${response.status} ${response.statusText}`);
🚫 [eslint] <prettier/prettier> reported by reviewdog 🐶
Replace
Failed·to·fetch·album·art:·HTTP·${response.status}·${response.statusText}
with⏎··········
Failed·to·fetch·album·art:·HTTP·${response.status}·${response.statusText},⏎········
@ -0,0 +452,4 @@
return null;
}
} catch (fetchError) {
console.error(`Network error fetching album art: ${fetchError instanceof Error ? fetchError.message : String(fetchError)}`);
🚫 [eslint] <prettier/prettier> reported by reviewdog 🐶
Replace
Network·error·fetching·album·art:·${fetchError·instanceof·Error·?·fetchError.message·:·String(fetchError)}
with⏎········
Network·error·fetching·album·art:·${fetchError·instanceof·Error·?·fetchError.message·:·String(fetchError)},⏎······
@ -0,0 +466,4 @@
return null;
}
} catch (bufferError) {
console.error(`Error processing album art data: ${bufferError instanceof Error ? bufferError.message : String(bufferError)}`);
🚫 [eslint] <prettier/prettier> reported by reviewdog 🐶
Replace
Error·processing·album·art·data:·${bufferError·instanceof·Error·?·bufferError.message·:·String(bufferError)}
with⏎········
Error·processing·album·art·data:·${bufferError·instanceof·Error·?·bufferError.message·:·String(bufferError)},⏎······
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.