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:
parent
0b0ea7f406
commit
3739741786
101 changed files with 883 additions and 1051 deletions
|
@ -6,9 +6,7 @@ define(['loading', 'events', 'dialogHelper', 'dom', 'layoutManager', 'scrollHelp
|
|||
var currentInstance;
|
||||
|
||||
function reloadPageWhenServerAvailable(retryCount) {
|
||||
|
||||
var apiClient = currentApiClient;
|
||||
|
||||
if (!apiClient) {
|
||||
return;
|
||||
}
|
||||
|
@ -31,7 +29,6 @@ define(['loading', 'events', 'dialogHelper', 'dom', 'layoutManager', 'scrollHelp
|
|||
|
||||
function retryReload(retryCount) {
|
||||
setTimeout(function () {
|
||||
|
||||
retryCount = retryCount || 0;
|
||||
retryCount++;
|
||||
|
||||
|
@ -42,15 +39,12 @@ define(['loading', 'events', 'dialogHelper', 'dom', 'layoutManager', 'scrollHelp
|
|||
}
|
||||
|
||||
function startRestart(instance, apiClient, dlg) {
|
||||
|
||||
currentApiClient = apiClient;
|
||||
currentDlg = dlg;
|
||||
currentInstance = instance;
|
||||
|
||||
apiClient.restartServer().then(function () {
|
||||
|
||||
setTimeout(reloadPageWhenServerAvailable, 250);
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -94,7 +88,8 @@ define(['loading', 'events', 'dialogHelper', 'dom', 'layoutManager', 'scrollHelp
|
|||
|
||||
dlg.querySelector('.text').innerHTML = globalize.translate('RestartPleaseWaitMessage');
|
||||
|
||||
var i, length;
|
||||
var i;
|
||||
var length;
|
||||
var html = '';
|
||||
for (i = 0, length = configuredButtons.length; i < length; i++) {
|
||||
var item = configuredButtons[i];
|
||||
|
@ -138,12 +133,10 @@ define(['loading', 'events', 'dialogHelper', 'dom', 'layoutManager', 'scrollHelp
|
|||
}
|
||||
|
||||
function ServerRestartDialog(options) {
|
||||
|
||||
this.options = options;
|
||||
}
|
||||
|
||||
ServerRestartDialog.prototype.show = function () {
|
||||
|
||||
var instance = this;
|
||||
loading.show();
|
||||
|
||||
|
@ -155,7 +148,6 @@ define(['loading', 'events', 'dialogHelper', 'dom', 'layoutManager', 'scrollHelp
|
|||
};
|
||||
|
||||
ServerRestartDialog.prototype.destroy = function () {
|
||||
|
||||
currentApiClient = null;
|
||||
currentDlg = null;
|
||||
currentInstance = null;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue