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
|
@ -21,7 +21,8 @@ define(["dialogHelper", "loading", "connectionManager", "require", "globalize",
|
|||
ProviderIds: {}
|
||||
};
|
||||
|
||||
var i, length;
|
||||
var i;
|
||||
var length;
|
||||
var identifyField = page.querySelectorAll(".identifyField");
|
||||
var value;
|
||||
for (i = 0, length = identifyField.length; i < length; i++) {
|
||||
|
@ -64,8 +65,7 @@ define(["dialogHelper", "loading", "connectionManager", "require", "globalize",
|
|||
|
||||
if (currentItem && currentItem.Id) {
|
||||
lookupInfo.ItemId = currentItem.Id;
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
lookupInfo.IncludeDisabledProviders = true;
|
||||
}
|
||||
|
||||
|
@ -97,7 +97,8 @@ define(["dialogHelper", "loading", "connectionManager", "require", "globalize",
|
|||
page.querySelector(".dialogContentInner").classList.remove("dialog-content-centered");
|
||||
|
||||
var html = "";
|
||||
var i, length;
|
||||
var i;
|
||||
var length;
|
||||
for (i = 0, length = results.length; i < length; i++) {
|
||||
|
||||
var result = results[i];
|
||||
|
@ -184,12 +185,10 @@ define(["dialogHelper", "loading", "connectionManager", "require", "globalize",
|
|||
if (currentItemType === "Episode") {
|
||||
cssClass += " backdropCard backdropCard-scalable";
|
||||
padderClass = "cardPadder-backdrop";
|
||||
}
|
||||
else if (currentItemType === "MusicAlbum" || currentItemType === "MusicArtist") {
|
||||
} else if (currentItemType === "MusicAlbum" || currentItemType === "MusicArtist") {
|
||||
cssClass += " squareCard squareCard-scalable";
|
||||
padderClass = "cardPadder-square";
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
cssClass += " portraitCard portraitCard-scalable";
|
||||
padderClass = "cardPadder-portrait";
|
||||
}
|
||||
|
@ -452,8 +451,6 @@ define(["dialogHelper", "loading", "connectionManager", "require", "globalize",
|
|||
scrollHelper.centerFocus.on(dlg.querySelector(".formDialogContent"), false);
|
||||
}
|
||||
|
||||
|
||||
|
||||
dialogHelper.open(dlg);
|
||||
|
||||
dlg.querySelector(".btnCancel").addEventListener("click", function (e) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue