Skip to content

Commit

Permalink
fix radix manually
Browse files Browse the repository at this point in the history
  • Loading branch information
mvorisek committed Dec 5, 2022
1 parent c1831f7 commit 77532af
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 11 deletions.
1 change: 0 additions & 1 deletion .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,6 @@ module.exports = {
// TODO impossible to autofix (about 250 errors in total)
'no-mixed-operators': 'off',
'no-restricted-globals': 'off',
radix: 'off',
'prefer-spread': 'off',
'no-new-func': 'off', // fixed with separate PR https://github.com/fomantic/Fomantic-UI/pull/2587
'no-bitwise': 'off',
Expand Down
14 changes: 7 additions & 7 deletions src/definitions/modules/calendar.js
Original file line number Diff line number Diff line change
Expand Up @@ -1740,7 +1740,7 @@
if (hour < 0 || minute < 0) {
parts = number.split(':');
for (k = 0; k < Math.min(2, parts.length); k++) {
j = parseInt(parts[k]);
j = parseInt(parts[k], 10);
if (isNaN(j)) {
j = 0;
}
Expand Down Expand Up @@ -1779,7 +1779,7 @@

// year > settings.centuryBreak
for (i = 0; i < numbers.length; i++) {
j = parseInt(numbers[i]);
j = parseInt(numbers[i], 10);
if (isNaN(j)) {
continue;
}
Expand All @@ -1798,7 +1798,7 @@
if (month < 0) {
for (i = 0; i < numbers.length; i++) {
k = i > 1 || settings.monthFirst ? i : i === 1 ? 0 : 1;
j = parseInt(numbers[k]);
j = parseInt(numbers[k], 10);
if (isNaN(j)) {
continue;
}
Expand All @@ -1813,7 +1813,7 @@

// day
for (i = 0; i < numbers.length; i++) {
j = parseInt(numbers[i]);
j = parseInt(numbers[i], 10);
if (isNaN(j)) {
continue;
}
Expand All @@ -1828,7 +1828,7 @@
// year <= settings.centuryBreak
if (year < 0) {
for (i = numbers.length - 1; i >= 0; i--) {
j = parseInt(numbers[i]);
j = parseInt(numbers[i], 10);
if (isNaN(j)) {
continue;
}
Expand All @@ -1847,7 +1847,7 @@
// hour
if (hour < 0) {
for (i = 0; i < numbers.length; i++) {
j = parseInt(numbers[i]);
j = parseInt(numbers[i], 10);
if (isNaN(j)) {
continue;
}
Expand All @@ -1863,7 +1863,7 @@
// minute
if (minute < 0) {
for (i = 0; i < numbers.length; i++) {
j = parseInt(numbers[i]);
j = parseInt(numbers[i], 10);
if (isNaN(j)) {
continue;
}
Expand Down
2 changes: 1 addition & 1 deletion src/definitions/modules/flyout.js
Original file line number Diff line number Diff line change
Expand Up @@ -978,7 +978,7 @@
bodyMargin: function () {
initialBodyMargin = $context.css((isBody ? 'margin-' : 'padding-') + (module.can.leftBodyScrollbar() ? 'left' : 'right'));
var
bodyMarginRightPixel = parseInt(initialBodyMargin.replace(/[^\d.]/g, '')),
bodyMarginRightPixel = parseInt(initialBodyMargin.replace(/[^\d.]/g, ''), 10),
bodyScrollbarWidth = isBody ? window.innerWidth - document.documentElement.clientWidth : $context[0].offsetWidth - $context[0].clientWidth
;
tempBodyMargin = bodyMarginRightPixel + bodyScrollbarWidth;
Expand Down
2 changes: 1 addition & 1 deletion src/definitions/modules/modal.js
Original file line number Diff line number Diff line change
Expand Up @@ -758,7 +758,7 @@
bodyMargin: function () {
initialBodyMargin = $context.css((isBody ? 'margin-' : 'padding-') + (module.can.leftBodyScrollbar() ? 'left' : 'right'));
var
bodyMarginRightPixel = parseInt(initialBodyMargin.replace(/[^\d.]/g, '')),
bodyMarginRightPixel = parseInt(initialBodyMargin.replace(/[^\d.]/g, ''), 10),
bodyScrollbarWidth = isBody ? window.innerWidth - document.documentElement.clientWidth : $context[0].offsetWidth - $context[0].clientWidth
;
tempBodyMargin = bodyMarginRightPixel + bodyScrollbarWidth;
Expand Down
2 changes: 1 addition & 1 deletion src/definitions/modules/sidebar.js
Original file line number Diff line number Diff line change
Expand Up @@ -376,7 +376,7 @@
bodyMargin: function () {
initialBodyMargin = $context.css((isBody ? 'margin-' : 'padding-') + (module.can.leftBodyScrollbar() ? 'left' : 'right'));
var
bodyMarginRightPixel = parseInt(initialBodyMargin.replace(/[^\d.]/g, '')),
bodyMarginRightPixel = parseInt(initialBodyMargin.replace(/[^\d.]/g, ''), 10),
bodyScrollbarWidth = isBody ? window.innerWidth - document.documentElement.clientWidth : $context[0].offsetWidth - $context[0].clientWidth
;
tempBodyMargin = bodyMarginRightPixel + bodyScrollbarWidth;
Expand Down

0 comments on commit 77532af

Please sign in to comment.