mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
Merge pull request #4058 from Aimekram/fix-eslint-no-shadow
Add eslint no-shadow rule and fix violations
This commit is contained in:
commit
8af09253c8
31 changed files with 273 additions and 275 deletions
|
@ -155,9 +155,9 @@ import './emby-scroller.scss';
|
|||
}
|
||||
};
|
||||
|
||||
function loadScrollButtons(scroller) {
|
||||
function loadScrollButtons(buttonsScroller) {
|
||||
import('../emby-scrollbuttons/emby-scrollbuttons').then(() => {
|
||||
scroller.insertAdjacentHTML('beforebegin', '<div is="emby-scrollbuttons" class="emby-scrollbuttons padded-right"></div>');
|
||||
buttonsScroller.insertAdjacentHTML('beforebegin', '<div is="emby-scrollbuttons" class="emby-scrollbuttons padded-right"></div>');
|
||||
});
|
||||
}
|
||||
|
||||
|
|
|
@ -2,8 +2,18 @@ import './emby-textarea.scss';
|
|||
import 'webcomponents.js/webcomponents-lite';
|
||||
import '../emby-input/emby-input';
|
||||
|
||||
/* eslint-disable indent */
|
||||
function calculateOffset(textarea) {
|
||||
const style = window.getComputedStyle(textarea, null);
|
||||
const props = ['paddingTop', 'paddingBottom'];
|
||||
let offset = 0;
|
||||
|
||||
for (let i = 0; i < props.length; i++) {
|
||||
offset += parseInt(style[props[i]]);
|
||||
}
|
||||
return offset;
|
||||
}
|
||||
|
||||
/* eslint-disable indent */
|
||||
function autoGrow(textarea, maxLines) {
|
||||
const self = this;
|
||||
|
||||
|
@ -16,16 +26,7 @@ import '../emby-input/emby-input';
|
|||
* @param textarea
|
||||
* @returns {number}
|
||||
*/
|
||||
self.getOffset = function (textarea) {
|
||||
const style = window.getComputedStyle(textarea, null);
|
||||
const props = ['paddingTop', 'paddingBottom'];
|
||||
let offset = 0;
|
||||
|
||||
for (let i = 0; i < props.length; i++) {
|
||||
offset += parseInt(style[props[i]]);
|
||||
}
|
||||
return offset;
|
||||
};
|
||||
self.getOffset = calculateOffset(textarea);
|
||||
|
||||
let offset;
|
||||
function reset() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue