mirror of
https://github.com/jellyfin/jellyfin-web.git
synced 2024-11-16 02:18:16 -07:00
Merge pull request #4025 from thornbill/eslint-array-callback-return-foreach
Enable eslint array-callback-return foreach checking
This commit is contained in:
commit
2d0ca949b0
@ -34,7 +34,7 @@ module.exports = {
|
||||
'plugin:sonarjs/recommended'
|
||||
],
|
||||
rules: {
|
||||
'array-callback-return': ['error'],
|
||||
'array-callback-return': ['error', { 'checkForEach': true }],
|
||||
'block-spacing': ['error'],
|
||||
'brace-style': ['error', '1tbs', { 'allowSingleLine': true }],
|
||||
'comma-dangle': ['error', 'never'],
|
||||
|
@ -159,11 +159,15 @@ import { Events } from 'jellyfin-apiclient';
|
||||
// (but rewinding cannot happen as the first event with media of non-empty duration)
|
||||
console.debug(`seeking to ${seconds} on ${e.type} event`);
|
||||
setCurrentTimeIfNeeded(element, seconds);
|
||||
events.forEach(name => element.removeEventListener(name, onMediaChange));
|
||||
events.forEach(name => {
|
||||
element.removeEventListener(name, onMediaChange);
|
||||
});
|
||||
if (onMediaReady) onMediaReady();
|
||||
}
|
||||
};
|
||||
events.forEach(name => element.addEventListener(name, onMediaChange));
|
||||
events.forEach(name => {
|
||||
element.addEventListener(name, onMediaChange);
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -205,8 +205,12 @@ function renderTrackSelections(page, instance, item, forceReload) {
|
||||
});
|
||||
|
||||
mediaSources = [];
|
||||
resolutionNames.forEach(v => mediaSources.push(v));
|
||||
sourceNames.forEach(v => mediaSources.push(v));
|
||||
resolutionNames.forEach(v => {
|
||||
mediaSources.push(v);
|
||||
});
|
||||
sourceNames.forEach(v => {
|
||||
mediaSources.push(v);
|
||||
});
|
||||
|
||||
instance._currentPlaybackMediaSources = mediaSources;
|
||||
|
||||
|
@ -56,7 +56,8 @@ export default function (urls) {
|
||||
urls.forEach(function (url) {
|
||||
// the download init has to be sequential for firefox if the urls are not on the same domain
|
||||
if (browser.firefox && !sameDomain(url)) {
|
||||
return setTimeout(download.bind(null, url), 100 * ++delay);
|
||||
setTimeout(download.bind(null, url), 100 * ++delay);
|
||||
return;
|
||||
}
|
||||
|
||||
download(url);
|
||||
|
@ -43,7 +43,9 @@ export default {
|
||||
*/
|
||||
downloadFiles(items) {
|
||||
if (window.NativeShell?.downloadFile) {
|
||||
items.forEach(item => window.NativeShell.downloadFile(item));
|
||||
items.forEach(item => {
|
||||
window.NativeShell.downloadFile(item);
|
||||
});
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
|
Loading…
Reference in New Issue
Block a user