eslint fixes pt.2

This commit is contained in:
Chika 2021-04-15 14:22:56 +03:00
parent 754e8c6c39
commit d1380a7c81
4 changed files with 10 additions and 10 deletions

View File

@ -836,7 +836,6 @@ export default [
calculationStore.setValue('model', null);
}
});
} else {
}
},
options: { fireImmediately: true },

View File

@ -1,3 +1,4 @@
/* eslint-disable @typescript-eslint/ban-ts-comment */
import { openNotification } from 'client/Elements/Notification';
import { shiftRight, shift } from 'core/tools/array';
import { IReactionEffect } from 'core/types/Calculation/Store/effect';

View File

@ -1,3 +1,4 @@
/* eslint-disable @typescript-eslint/ban-ts-comment */
import axios from 'axios';
import { CRM_PROXY_URL } from 'core/constants/urls';
import {
@ -34,12 +35,11 @@ export default class {
res.data,
);
Object.keys(resEntities).forEach(targetName => {
const targetEnt: TCRMEntity | TCRMEntity[] =
resEntities[targetName];
if (toOptions)
//@ts-ignore
if (toOptions)
Object.keys(resEntities).forEach(targetName => {
const targetEnt: TCRMEntity | TCRMEntity[] =
resEntities[targetName];
//@ts-ignore
if (toOptions.includes(targetName)) {
if (Array.isArray(targetEnt)) {
const optionatedEntities: (TCRMEntity & IBaseOption)[] = [];
@ -67,7 +67,7 @@ export default class {
] = entityOption;
}
}
});
});
resolve({ entities: resEntities });
})

View File

@ -19,8 +19,8 @@ export function convertEntityToOption(
if (entityPropsMap) {
const { name: propName, value: propValue } = entityPropsMap;
let name,
value = entity[propValue];
let name;
const value = entity[propValue];
if (!Array.isArray(propName)) {
name = entity[propName];
} else {