mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
Add eslint radix rule for parseInt
This commit is contained in:
parent
9e784034d3
commit
329cf77c81
42 changed files with 90 additions and 91 deletions
|
@ -414,7 +414,7 @@ import Sortable from 'sortablejs';
|
|||
clearRefreshInterval(itemsContainer);
|
||||
|
||||
if (!intervalMs) {
|
||||
intervalMs = parseInt(itemsContainer.getAttribute('data-refreshinterval') || '0');
|
||||
intervalMs = parseInt(itemsContainer.getAttribute('data-refreshinterval') || '0', 10);
|
||||
}
|
||||
|
||||
if (intervalMs) {
|
||||
|
|
|
@ -3,8 +3,8 @@
|
|||
const ProgressBarPrototype = Object.create(HTMLDivElement.prototype);
|
||||
|
||||
function onAutoTimeProgress() {
|
||||
const start = parseInt(this.getAttribute('data-starttime'));
|
||||
const end = parseInt(this.getAttribute('data-endtime'));
|
||||
const start = parseInt(this.getAttribute('data-starttime'), 10);
|
||||
const end = parseInt(this.getAttribute('data-endtime'), 10);
|
||||
|
||||
const now = new Date().getTime();
|
||||
const total = end - start;
|
||||
|
|
|
@ -91,7 +91,7 @@ const EmbyScrollButtonsPrototype = Object.create(HTMLDivElement.prototype);
|
|||
return 0;
|
||||
}
|
||||
|
||||
value = parseInt(value);
|
||||
value = parseInt(value, 10);
|
||||
if (isNaN(value)) {
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -75,7 +75,7 @@ const Scroller: FC<ScrollerProps> = ({
|
|||
return 0;
|
||||
}
|
||||
|
||||
if (isNaN(parseInt(value))) {
|
||||
if (isNaN(parseInt(value, 10))) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
@ -75,11 +75,11 @@ import '../../styles/scrollstyles.scss';
|
|||
current.classList.remove(activeButtonClass);
|
||||
}
|
||||
|
||||
const previousIndex = current ? parseInt(current.getAttribute('data-index')) : null;
|
||||
const previousIndex = current ? parseInt(current.getAttribute('data-index'), 10) : null;
|
||||
|
||||
setActiveTabButton(tabButton);
|
||||
|
||||
const index = parseInt(tabButton.getAttribute('data-index'));
|
||||
const index = parseInt(tabButton.getAttribute('data-index'), 10);
|
||||
|
||||
triggerBeforeTabChange(tabs, index, previousIndex);
|
||||
|
||||
|
@ -194,7 +194,7 @@ import '../../styles/scrollstyles.scss';
|
|||
initScroller(this);
|
||||
|
||||
const current = this.querySelector('.' + activeButtonClass);
|
||||
const currentIndex = current ? parseInt(current.getAttribute('data-index')) : parseInt(this.getAttribute('data-index') || '0');
|
||||
const currentIndex = current ? parseInt(current.getAttribute('data-index'), 10) : parseInt(this.getAttribute('data-index') || '0', 10);
|
||||
|
||||
if (currentIndex !== -1) {
|
||||
this.selectedTabIndex = currentIndex;
|
||||
|
|
|
@ -14,7 +14,7 @@ function calculateOffset(textarea) {
|
|||
let offset = 0;
|
||||
|
||||
for (let i = 0; i < props.length; i++) {
|
||||
offset += parseInt(style[props[i]]);
|
||||
offset += parseInt(style[props[i]], 10);
|
||||
}
|
||||
return offset;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue