Skip to content

Commit

Permalink
fix: fix lint.
Browse files Browse the repository at this point in the history
  • Loading branch information
100pah committed Aug 27, 2021
1 parent 7890d0e commit 6083ce5
Show file tree
Hide file tree
Showing 8 changed files with 13 additions and 12 deletions.
1 change: 1 addition & 0 deletions src/coord/axisModelCommonMixin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ interface AxisModelCommonMixin<Opt extends AxisBaseOption> extends Pick<Model<Op
axis: Axis;
}

// eslint-disable-next-line @typescript-eslint/no-unused-vars
class AxisModelCommonMixin<Opt extends AxisBaseOption> {

getNeedCrossZero(): boolean {
Expand Down
1 change: 1 addition & 0 deletions src/data/Graph.ts
Original file line number Diff line number Diff line change
Expand Up @@ -412,6 +412,7 @@ class GraphEdge {

getModel<T = unknown>(): Model<T>
getModel<T = unknown, S extends keyof T= keyof T>(path: S): Model<T[S]>
// eslint-disable-next-line @typescript-eslint/no-unused-vars
getModel<T = unknown>(path?: string): Model {
if (this.dataIndex < 0) {
return;
Expand Down
3 changes: 2 additions & 1 deletion src/data/Tree.ts
Original file line number Diff line number Diff line change
Expand Up @@ -228,6 +228,7 @@ export class TreeNode {
getModel<T = unknown>(): Model<T>
// @depcrecated
// getModel<T = unknown, S extends keyof T = keyof T>(path: S): Model<T[S]>
// eslint-disable-next-line @typescript-eslint/no-unused-vars
getModel<T = unknown>(path?: string): Model {
if (this.dataIndex < 0) {
return;
Expand Down Expand Up @@ -412,7 +413,7 @@ class Tree<HostModel extends Model = Model, LevelOption = any> {
* ]
* }
*/
static createTree<T extends TreeNodeOption, HostModel extends Model, LevelOption>(
static createTree<T extends TreeNodeOption, HostModel extends Model>(
dataRoot: T,
hostModel: HostModel,
beforeLink?: (data: SeriesData) => void
Expand Down
4 changes: 1 addition & 3 deletions src/label/labelStyle.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,7 @@ import {
ColorString,
ZRStyleProps,
AnimationOptionMixin,
InterpolatableValue,
SeriesDataType
InterpolatableValue
} from '../util/types';
import GlobalModel from '../model/Global';
import { isFunction, retrieve2, extend, keys, trim } from 'zrender/src/core/util';
Expand All @@ -40,7 +39,6 @@ import { deprecateReplaceLog } from '../util/log';
import { makeInner, interpolateRawValues } from '../util/model';
import SeriesData from '../data/SeriesData';
import { initProps, updateProps } from '../util/graphic';
import { getECData } from '../util/innerStore';

type TextCommonParams = {
/**
Expand Down
1 change: 0 additions & 1 deletion src/layout/points.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
* under the License.
*/

/* global Float32Array */

import {map} from 'zrender/src/core/util';
import createRenderPlanner from '../chart/helper/createRenderPlanner';
Expand Down
11 changes: 6 additions & 5 deletions src/model/Model.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,12 +36,13 @@ import { mixin, clone, merge } from 'zrender/src/core/util';

// Since model.option can be not only `Dictionary` but also primary types,
// we do this conditional type to avoid getting type 'never';
type Key<Opt> = Opt extends Dictionary<any>
? keyof Opt : string;
type Value<Opt, R> = Opt extends Dictionary<any>
? (R extends keyof Opt ? Opt[R] : ModelOption)
: ModelOption;
// type Key<Opt> = Opt extends Dictionary<any>
// ? keyof Opt : string;
// type Value<Opt, R> = Opt extends Dictionary<any>
// ? (R extends keyof Opt ? Opt[R] : ModelOption)
// : ModelOption;

// eslint-disable-next-line @typescript-eslint/no-unused-vars
interface Model<Opt = ModelOption>
extends LineStyleMixin, ItemStyleMixin, TextStyleMixin, AreaStyleMixin {}
class Model<Opt = ModelOption> { // TODO: TYPE use unkown insteadof any?
Expand Down
2 changes: 1 addition & 1 deletion src/util/conditionalExpression.ts
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ interface RelationalExpressionOption extends
parser?: RawValueParserType;
}

type RelationalExpressionOpEvaluate = (tarVal: unknown, condVal: unknown) => boolean;
// type RelationalExpressionOpEvaluate = (tarVal: unknown, condVal: unknown) => boolean;


class RegExpEvaluator implements FilterComparator {
Expand Down
2 changes: 1 addition & 1 deletion src/visual/style.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
*/

import { isFunction, extend, createHashMap } from 'zrender/src/core/util';
import { StageHandler, CallbackDataParams, ZRColor, Dictionary, InnerDecalObject, SeriesOption }
import { StageHandler, CallbackDataParams, ZRColor, Dictionary, InnerDecalObject }
from '../util/types';
import makeStyleMapper from '../model/mixin/makeStyleMapper';
import { ITEM_STYLE_KEY_MAP } from '../model/mixin/itemStyle';
Expand Down

0 comments on commit 6083ce5

Please sign in to comment.