[improvement] optimize eslint-disable (#4070)

This commit is contained in:
neverland
2019-08-08 20:01:41 +08:00
committed by GitHub
parent 5777762249
commit c74d90c561
13 changed files with 9 additions and 20 deletions
+1 -1
View File
@@ -1,4 +1,3 @@
/* eslint-disable no-use-before-define */
import { isDef, isObj } from '.';
import { ObjectIndex } from './types';
@@ -14,6 +13,7 @@ function assignKey(to: ObjectIndex, from: ObjectIndex, key: string) {
if (!hasOwnProperty.call(to, key) || !isObj(val) || typeof val === 'function') {
to[key] = val;
} else {
// eslint-disable-next-line no-use-before-define
to[key] = deepAssign(Object(to[key]), from[key]);
}
}