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

@ -30,7 +30,6 @@ define([], function () {
}
function isMobile(userAgent) {
var terms = [
'mobi',
'ipad',
@ -144,14 +143,16 @@ define([], function () {
}
}
var animation = false,
animationstring = 'animation',
keyframeprefix = '',
domPrefixes = ['Webkit', 'O', 'Moz'],
pfx = '',
elm = document.createElement('div');
var animation = false;
var animationstring = 'animation';
var keyframeprefix = '';
var domPrefixes = ['Webkit', 'O', 'Moz'];
var pfx = '';
var elm = document.createElement('div');
if (elm.style.animationName !== undefined) { animation = true; }
if (elm.style.animationName !== undefined) {
animation = true;
}
if (animation === false && allowPrefix) {
for (var i = 0; i < domPrefixes.length; i++) {
@ -204,8 +205,7 @@ define([], function () {
// http://www.neowin.net/news/ie11-fakes-user-agent-to-fool-gmail-in-windows-phone-81-gdr1-update
browser = "msie";
}
else if (ua.indexOf("like gecko") !== -1 && ua.indexOf('webkit') === -1 && ua.indexOf('opera') === -1 && ua.indexOf('chrome') === -1 && ua.indexOf('safari') === -1) {
} else if (ua.indexOf("like gecko") !== -1 && ua.indexOf('webkit') === -1 && ua.indexOf('opera') === -1 && ua.indexOf('chrome') === -1 && ua.indexOf('safari') === -1) {
browser = "msie";
}
}