1
0
Fork 0
mirror of https://github.com/jellyfin/jellyfin-web synced 2025-03-30 19:56:21 +00:00

Add some linting rules for the CI (#587)

* enable one-var rule

* enable indent rule

* enable no-multiple-empty-lines rule

* enable no-empty rule

* enable no-trailing-spaces rule

* enable no-extra-semi rule

* add eslint rules to fix block spacing

* enable max-statements-per-line rule

* enable brace-style rule

* fix some spacing issues and add future rules

* add code suggestions
This commit is contained in:
dkanada 2019-11-23 00:29:38 +09:00 committed by Vasily
parent 0b0ea7f406
commit 3739741786
101 changed files with 883 additions and 1051 deletions

View file

@ -12,7 +12,6 @@ define(['appSettings', 'browser', 'events'], function (appSettings, browser, eve
}
function getCrossOriginValue(mediaSource) {
if (mediaSource.IsRemote) {
return null;
}
@ -97,7 +96,8 @@ define(['appSettings', 'browser', 'events'], function (appSettings, browser, eve
return true;
}
var recoverDecodingErrorDate, recoverSwapAudioCodecDate;
var recoverDecodingErrorDate;
var recoverSwapAudioCodecDate;
function handleHlsJsMediaError(instance, reject) {
var hlsPlayer = instance._hlsPlayer;
@ -144,7 +144,8 @@ define(['appSettings', 'browser', 'events'], function (appSettings, browser, eve
events.trigger(instance, 'error', [
{
type: type
}]);
}
]);
}
function isValidDuration(duration) {
@ -156,7 +157,6 @@ define(['appSettings', 'browser', 'events'], function (appSettings, browser, eve
}
function setCurrentTimeIfNeeded(element, seconds) {
if (Math.abs(element.currentTime || 0, seconds) <= 1) {
element.currentTime = seconds;
}
@ -354,9 +354,7 @@ define(['appSettings', 'browser', 'events'], function (appSettings, browser, eve
} else {
onErrorInternal(instance, 'network');
}
}
else {
} else {
console.log("fatal network error encountered, try to recover");
hls.startLoad();
}