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

@ -22,17 +22,17 @@ define(['dom'], function (dom) {
var windowSize = dom.getWindowSize();
var vpWidth = windowSize.innerWidth,
vpHeight = windowSize.innerHeight;
var vpWidth = windowSize.innerWidth;
var vpHeight = windowSize.innerHeight;
// Use this native browser method, if available.
var rec = elem.getBoundingClientRect(),
tViz = rec.top >= 0 && rec.top < vpHeight + thresholdY,
bViz = rec.bottom > 0 && rec.bottom <= vpHeight + thresholdY,
lViz = rec.left >= 0 && rec.left < vpWidth + thresholdX,
rViz = rec.right > 0 && rec.right <= vpWidth + thresholdX,
vVisible = partial ? tViz || bViz : tViz && bViz,
hVisible = partial ? lViz || rViz : lViz && rViz;
var rec = elem.getBoundingClientRect();
var tViz = rec.top >= 0 && rec.top < vpHeight + thresholdY;
var bViz = rec.bottom > 0 && rec.bottom <= vpHeight + thresholdY;
var lViz = rec.left >= 0 && rec.left < vpWidth + thresholdX;
var rViz = rec.right > 0 && rec.right <= vpWidth + thresholdX;
var vVisible = partial ? tViz || bViz : tViz && bViz;
var hVisible = partial ? lViz || rViz : lViz && rViz;
return vVisible && hVisible;
}