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

@ -176,22 +176,17 @@ define(['loading', 'apphost', 'dialogHelper', 'connectionManager', 'imageLoader'
var shape = 'backdrop';
if (imageType === "Backdrop" || imageType === "Art" || imageType === "Thumb" || imageType === "Logo") {
shape = 'backdrop';
}
else if (imageType === "Banner") {
} else if (imageType === "Banner") {
shape = 'banner';
}
else if (imageType === "Disc") {
} else if (imageType === "Disc") {
shape = 'square';
}
else {
} else {
if (currentItemType === "Episode") {
shape = 'backdrop';
}
else if (currentItemType === "MusicAlbum" || currentItemType === "MusicArtist") {
} else if (currentItemType === "MusicAlbum" || currentItemType === "MusicArtist") {
shape = 'square';
}
else {
} else {
shape = 'portrait';
}
}
@ -224,8 +219,7 @@ define(['loading', 'apphost', 'dialogHelper', 'connectionManager', 'imageLoader'
if (layoutManager.tv || !appHost.supports('externallinks')) {
html += '<div class="cardImageContainer lazy" data-src="' + getDisplayUrl(image.Url, apiClient) + '" style="background-position:center bottom;"></div>';
}
else {
} else {
html += '<a is="emby-linkbutton" target="_blank" href="' + getDisplayUrl(image.Url, apiClient) + '" class="button-link cardImageContainer lazy" data-src="' + getDisplayUrl(image.Url, apiClient) + '" style="background-position:center bottom;"></a>';
}