mirror of
https://github.com/apache/superset.git
synced 2026-05-11 02:45:46 +00:00
ESLint: Re-enable rule no-restricted-globals (#10863)
* Re-enable rule no-restricted-globals * Fix missing semicolons
This commit is contained in:
committed by
GitHub
parent
7f1012360a
commit
1908a94c7e
@@ -64,10 +64,10 @@ export default class BoundsControl extends React.Component {
|
||||
onChange() {
|
||||
const mm = this.state.minMax;
|
||||
const errors = [];
|
||||
if (mm[0] && isNaN(mm[0])) {
|
||||
if (mm[0] && Number.isNaN(mm[0])) {
|
||||
errors.push(t('`Min` value should be numeric or empty'));
|
||||
}
|
||||
if (mm[1] && isNaN(mm[1])) {
|
||||
if (mm[1] && Number.isNaN(mm[1])) {
|
||||
errors.push(t('`Max` value should be numeric or empty'));
|
||||
}
|
||||
if (errors.length === 0) {
|
||||
|
||||
@@ -114,9 +114,9 @@ export default class FilterBoxItemControl extends React.Component {
|
||||
if (type === 'BOOLEAN') {
|
||||
typedValue = value === 'true';
|
||||
} else if (INTEGRAL_TYPES.has(type)) {
|
||||
typedValue = isNaN(value) ? null : parseInt(value, 10);
|
||||
typedValue = Number.isNaN(value) ? null : parseInt(value, 10);
|
||||
} else if (DECIMAL_TYPES.has(type)) {
|
||||
typedValue = isNaN(value) ? null : parseFloat(value);
|
||||
typedValue = Number.isNaN(value) ? null : parseFloat(value);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user