Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 2 additions & 7 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import intlifyVueI18N from '@intlify/eslint-plugin-vue-i18n'
import globals from 'globals'
import vueEslintParser from 'vue-eslint-parser'
import js from '@eslint/js'
import jsoncEslintParser from 'jsonc-eslint-parser'
import eslintPluginJsonc from 'eslint-plugin-jsonc'
import eslintPluginYml from 'eslint-plugin-yml'
import jsdoc from 'eslint-plugin-jsdoc'
Expand Down Expand Up @@ -236,7 +235,7 @@ export default [
js.configs.recommended,
...eslintPluginVue.configs['flat/recommended'],
...vuejsAccessibility.configs["flat/recommended"],
...intlifyVueI18N.configs['recommended'],
...intlifyVueI18N.configs.recommended,
{
files: [
'**/*.{js,vue}',
Expand Down Expand Up @@ -344,17 +343,13 @@ export default [
}
},

...eslintPluginJsonc.configs['flat/base'],
...eslintPluginJsonc.configs.base,
{
files: ['**/*.json'],
ignores: [
'_scripts/',
],

languageOptions: {
parser: jsoncEslintParser,
},

rules: {
'@stylistic/no-tabs': 'off',
'@stylistic/comma-spacing': 'off',
Expand Down
20 changes: 10 additions & 10 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -75,25 +75,25 @@
"@babel/core": "^7.29.0",
"@babel/preset-env": "^7.29.0",
"@double-great/stylelint-a11y": "^3.4.5",
"@eslint/js": "^9.39.2",
"@intlify/eslint-plugin-vue-i18n": "^4.1.1",
"@stylistic/eslint-plugin": "^5.9.0",
"@eslint/js": "^10.0.1",
"@intlify/eslint-plugin-vue-i18n": "^4.3.0",
"@stylistic/eslint-plugin": "^5.10.0",
"babel-loader": "^10.0.0",
"copy-webpack-plugin": "^14.0.0",
"css-loader": "^7.1.4",
"css-minimizer-webpack-plugin": "^8.0.0",
"electron": "^40.8.0",
"electron-builder": "^26.8.1",
"eslint": "^9.39.2",
"eslint": "^10.0.3",
"eslint-plugin-import-x": "^4.16.1",
"eslint-plugin-jsdoc": "^62.5.2",
"eslint-plugin-jsonc": "^2.21.0",
"eslint-plugin-jsdoc": "^62.7.1",
"eslint-plugin-jsonc": "^3.1.1",
"eslint-plugin-n": "^17.24.0",
"eslint-plugin-promise": "^7.2.1",
"eslint-plugin-unicorn": "^62.0.0",
"eslint-plugin-vue": "^10.7.0",
"eslint-plugin-vuejs-accessibility": "^2.4.1",
"eslint-plugin-yml": "^3.0.0",
"eslint-plugin-unicorn": "^63.0.0",
"eslint-plugin-vue": "^10.8.0",
"eslint-plugin-vuejs-accessibility": "^2.5.0",
"eslint-plugin-yml": "^3.3.1",
"globals": "^17.4.0",
"html-webpack-plugin": "^5.6.6",
"js-yaml": "^4.1.1",
Expand Down
7 changes: 2 additions & 5 deletions src/main/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -1381,13 +1381,9 @@ function runApp() {
return
}

let currentPath = (await baseHandlers.settings._findOne('screenshotFolderPath'))?.value
const currentPath = (await baseHandlers.settings._findOne('screenshotFolderPath'))?.value

await chooseDefaultFolder(event.sender, currentPath)

if (typeof currentPath !== 'string' || currentPath.length === 0) {
currentPath = app.getPath('pictures')
}
})

ipcMain.handle(IpcChannels.WRITE_TO_DEFAULT_FOLDER, async (event, filename, arrayBuffer) => {
Expand Down Expand Up @@ -1436,6 +1432,7 @@ function runApp() {
} catch (error) {
console.error('WRITE_TO_DEFAULT_FOLDER failed', error)
// throw a new error so that we don't expose the real error to the renderer
// eslint-disable-next-line preserve-caught-error
throw new Error('Failed to save')
}

Expand Down
2 changes: 1 addition & 1 deletion src/renderer/components/DataSettings/DataSettings.vue
Original file line number Diff line number Diff line change
Expand Up @@ -1065,7 +1065,7 @@ async function importPlaylists() {

let data = response.content

let playlists = null
let playlists

// for the sake of backwards compatibility,
// check if this is the old JSON array export (used until version 0.19.1),
Expand Down
3 changes: 1 addition & 2 deletions src/renderer/components/SubscriptionsLive.vue
Original file line number Diff line number Diff line change
Expand Up @@ -202,8 +202,7 @@ async function loadVideosForSubscriptionsFromRemote() {
const subscriptionUpdates = []
const videoListFromRemote = (await Promise.all(channelsToLoadFromRemote.map(async (channel) => {
let videos = []
let name, thumbnailUrl
let videos, name, thumbnailUrl
if (!process.env.SUPPORTS_LOCAL_API || backendPreference.value === 'invidious') {
if (useRss) {
Expand Down
2 changes: 1 addition & 1 deletion src/renderer/components/SubscriptionsPosts.vue
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ async function loadPostsForSubscriptionsFromRemote() {
const subscriptionUpdates = []

const postListFromRemote = (await Promise.all(channelsToLoadFromRemote.map(async (channel) => {
let posts = []
let posts
if (!process.env.SUPPORTS_LOCAL_API || backendPreference.value === 'invidious') {
posts = await getChannelPostsInvidious(channel)
} else {
Expand Down
3 changes: 1 addition & 2 deletions src/renderer/components/SubscriptionsShorts.vue
Original file line number Diff line number Diff line change
Expand Up @@ -187,8 +187,7 @@ async function loadVideosForSubscriptionsFromRemote() {
const subscriptionUpdates = []
const videoListFromRemote = (await Promise.all(channelsToLoadFromRemote.map(async (channel) => {
let videos = []
let name
let videos, name
if (!process.env.SUPPORTS_LOCAL_API || backendPreference.value === 'invidious') {
({ videos, name } = await getChannelShortsInvidious(channel))
Expand Down
3 changes: 1 addition & 2 deletions src/renderer/components/SubscriptionsVideos.vue
Original file line number Diff line number Diff line change
Expand Up @@ -201,8 +201,7 @@ async function loadVideosForSubscriptionsFromRemote() {
const subscriptionUpdates = []

const videoListFromRemote = (await Promise.all(channelsToLoadFromRemote.map(async (channel) => {
let videos = []
let name, thumbnailUrl
let videos, name, thumbnailUrl

if (!process.env.SUPPORTS_LOCAL_API || backendPreference.value === 'invidious') {
if (useRss) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -812,7 +812,7 @@ export default defineComponent({
}

/** @type {string[]} */
let elementList = []
let elementList

if (onlyUseOverFlowMenu.value) {
uiConfig.overflowMenuButtons = [
Expand Down
3 changes: 1 addition & 2 deletions src/renderer/helpers/api/local.js
Original file line number Diff line number Diff line change
Expand Up @@ -1664,13 +1664,12 @@ function parseListItem(item, channelId, channelName) {
/** @type {import('youtubei.js').YTNodes.GridChannel} */
const channel = item
let subscribers = null
let videos = null

if (channel.subscribers?.text) {
subscribers = parseLocalSubscriberCount(channel.subscribers.text)
}

videos = extractNumberFromString(channel.video_count.text)
const videos = extractNumberFromString(channel.video_count.text)

return {
type: 'channel',
Expand Down
2 changes: 1 addition & 1 deletion src/renderer/helpers/player/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,7 @@ export function repairInvidiousManifest(periods) {
}

if (audioContent) {
let role = ''
let role

switch (audioContent) {
case 'original':
Expand Down
2 changes: 1 addition & 1 deletion src/renderer/helpers/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -472,7 +472,7 @@ export function formatDurationAsTimestamp(lengthSeconds) {
seconds = '0' + seconds
}

let timestamp = ''
let timestamp
if (hours > 0) {
timestamp = hours + ':' + minutes + ':' + seconds
} else {
Expand Down
2 changes: 1 addition & 1 deletion src/renderer/store/modules/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -512,7 +512,7 @@ const actions = {
throw new Error('Channel: could not extract id')
}

let subPath = null
let subPath
switch (match.groups.tab) {
case 'shorts':
subPath = 'shorts'
Expand Down
2 changes: 1 addition & 1 deletion src/renderer/views/History/History.vue
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ function filterHistory() {
return
}
let filteredQuery = []
let filteredQuery
if (doCaseSensitiveSearch.value) {
filteredQuery = filterVideosWithQuery(historyCacheSorted.value, query.value)
} else {
Expand Down
4 changes: 2 additions & 2 deletions src/renderer/views/Watch/Watch.js
Original file line number Diff line number Diff line change
Expand Up @@ -1647,10 +1647,10 @@ export default defineComponent({
* @param {Intl.DisplayNames} languageNames
*/
generateAudioTrackFieldInvidious: function (format, languageNames) {
let type = ''
let type

// use the same id numbers as YouTube (except -1, when we aren't sure what it is)
let idNumber = ''
let idNumber

if (format.is_descriptive) {
type = ' descriptive'
Expand Down
Loading