Skip to content

Commit f516c9c

Browse files
committed
chore: fix prettierrc problem
1 parent f2a8ac1 commit f516c9c

File tree

36 files changed

+82
-84
lines changed

36 files changed

+82
-84
lines changed

packages/vchart/src/chart/bar/bar-transformer.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ export class BarChartSpecTransformer<T extends IBarChartSpec = IBarChartSpec> ex
3737
if (bandAxis && !bandAxis.bandSize && !bandAxis.maxBandSize && !bandAxis.minBandSize) {
3838
// 将 autoBandSize 应用在轴上
3939
if (!!spec.autoBandSize) {
40-
const extend = isObject(spec.autoBandSize) ? (spec.autoBandSize.extend ?? 0) : 0;
40+
const extend = isObject(spec.autoBandSize) ? spec.autoBandSize.extend ?? 0 : 0;
4141
const { barMaxWidth, barMinWidth, barWidth, barGapInGroup } = spec.series.find(
4242
series => series.type === 'bar'
4343
) as IBarSeriesSpec;

packages/vchart/src/chart/base/base-chart.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@ export class BaseChart<T extends IChartSpec> extends CompilableBase implements I
164164
return this._chartData;
165165
}
166166

167-
declare protected _option: IChartOption;
167+
protected declare _option: IChartOption;
168168

169169
// 模块内的需要动态影像图表的属性
170170
readonly state: ILayoutModelState = {

packages/vchart/src/compile/mark/compilable-mark.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@ export abstract class CompilableMark extends GrammarItem implements ICompilableM
167167
this._stateSort = stateSort;
168168
}
169169

170-
declare protected _option: ICompilableMarkOption;
170+
protected declare _option: ICompilableMarkOption;
171171

172172
constructor(option: ICompilableMarkOption, name: string, model: IModel) {
173173
super(option);
@@ -184,7 +184,7 @@ export abstract class CompilableMark extends GrammarItem implements ICompilableM
184184
this._event = new Event(model.getOption().eventDispatcher, model.getOption().mode);
185185
}
186186

187-
declare protected _product: Maybe<IMark>;
187+
protected declare _product: Maybe<IMark>;
188188
declare getProduct: () => Maybe<IMark>;
189189

190190
// transform目前在形状词云中使用,但直接用的 vgrammar 接口 (this._wordMark as ICompilableMark).getProduct().transform(wordCloudTransforms);

packages/vchart/src/component/axis/util.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -72,13 +72,13 @@ export const getCartesianAxisTheme = (orient: IOrientType, type: AxisType, chart
7272
(type === 'band'
7373
? getComponentThemeFromOption('axisBand', chartTheme)
7474
: (['linear', 'log', 'symlog'] as AxisType[]).includes(type)
75-
? getComponentThemeFromOption('axisLinear', chartTheme)
76-
: {}) ?? {};
75+
? getComponentThemeFromOption('axisLinear', chartTheme)
76+
: {}) ?? {};
7777
const axisTheme = isXAxis(orient)
7878
? getComponentThemeFromOption('axisX', chartTheme)
7979
: isYAxis(orient)
80-
? getComponentThemeFromOption('axisY', chartTheme)
81-
: getComponentThemeFromOption('axisZ', chartTheme);
80+
? getComponentThemeFromOption('axisY', chartTheme)
81+
: getComponentThemeFromOption('axisZ', chartTheme);
8282
return mergeSpec({}, getComponentThemeFromOption('axis', chartTheme), axisTypeTheme, axisTheme);
8383
};
8484

@@ -87,8 +87,8 @@ export const getPolarAxisTheme = (orient: IPolarOrientType, type: AxisType, char
8787
(type === 'band'
8888
? getComponentThemeFromOption('axisBand', chartTheme)
8989
: type === 'linear'
90-
? getComponentThemeFromOption('axisLinear', chartTheme)
91-
: {}) ?? {};
90+
? getComponentThemeFromOption('axisLinear', chartTheme)
91+
: {}) ?? {};
9292
const axisTheme =
9393
orient === 'angle'
9494
? getComponentThemeFromOption('axisAngle', chartTheme)

packages/vchart/src/component/base/base-component.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ export class BaseComponent<T extends IComponentSpec = IComponentSpec> extends La
3232
});
3333
}
3434

35-
declare protected _option: IComponentOption;
35+
protected declare _option: IComponentOption;
3636

3737
protected _regions: IRegion[];
3838
getRegions() {

packages/vchart/src/component/custom-mark/custom-mark.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ export class CustomMark extends BaseComponent<ICustomMarkSpec<EnableMarkType>> {
2626
layoutZIndex: number = LayoutZIndex.CustomMark;
2727
layoutLevel: number = LayoutLevel.CustomMark;
2828

29-
declare protected _spec: ICustomMarkSpec<Exclude<EnableMarkType, 'group'>> | ICustomMarkGroupSpec;
29+
protected declare _spec: ICustomMarkSpec<Exclude<EnableMarkType, 'group'>> | ICustomMarkGroupSpec;
3030

3131
created() {
3232
super.created();

packages/vchart/src/component/data-zoom/data-filter-base-component.ts

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -447,25 +447,25 @@ export abstract class DataFilterBaseComponent<T extends IDataFilterComponentSpec
447447
s.coordinate === 'cartesian'
448448
? (s as ICartesianSeries).getXAxisHelper()
449449
: s.coordinate === 'polar'
450-
? (s as IPolarSeries).angleAxisHelper
451-
: null;
450+
? (s as IPolarSeries).angleAxisHelper
451+
: null;
452452
const yAxisHelper =
453453
s.coordinate === 'cartesian'
454454
? (s as ICartesianSeries).getYAxisHelper()
455455
: s.coordinate === 'polar'
456-
? (s as IPolarSeries).radiusAxisHelper
457-
: null;
456+
? (s as IPolarSeries).radiusAxisHelper
457+
: null;
458458
if (!xAxisHelper || !yAxisHelper) {
459459
return;
460460
}
461461
const stateAxisHelper =
462462
xAxisHelper.getAxisId() === this._relatedAxisComponent.id
463463
? xAxisHelper
464464
: yAxisHelper.getAxisId() === this._relatedAxisComponent.id
465-
? yAxisHelper
466-
: this._isHorizontal
467-
? xAxisHelper
468-
: yAxisHelper;
465+
? yAxisHelper
466+
: this._isHorizontal
467+
? xAxisHelper
468+
: yAxisHelper;
469469
const valueAxisHelper = stateAxisHelper === xAxisHelper ? yAxisHelper : xAxisHelper;
470470
const isValidateValueAxis = isContinuous(valueAxisHelper.getScale(0).type);
471471
const isValidateStateAxis = isContinuous(stateAxisHelper.getScale(0).type);
@@ -640,8 +640,8 @@ export abstract class DataFilterBaseComponent<T extends IDataFilterComponentSpec
640640
start = this._spec.start
641641
? this._spec.start
642642
: this._spec.startValue
643-
? this.dataToStatePoint(this._spec.startValue)
644-
: 0;
643+
? this.dataToStatePoint(this._spec.startValue)
644+
: 0;
645645
end = this._spec.end ? this._spec.end : this._spec.endValue ? this.dataToStatePoint(this._spec.endValue) : 1;
646646
}
647647
this._startValue = this.statePointToData(start);
@@ -899,7 +899,7 @@ export abstract class DataFilterBaseComponent<T extends IDataFilterComponentSpec
899899

900900
protected _initCommonEvent() {
901901
const delayType: IDelayType = this._spec?.delayType ?? 'throttle';
902-
const delayTime = isValid(this._spec?.delayType) ? (this._spec?.delayTime ?? 30) : 0;
902+
const delayTime = isValid(this._spec?.delayType) ? this._spec?.delayTime ?? 30 : 0;
903903
const realTime = this._spec?.realTime ?? true;
904904
const option = { delayType, delayTime, realTime, allowComponentZoom: true };
905905
if (this._zoomAttr.enable) {

packages/vchart/src/component/data-zoom/data-zoom/data-zoom.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -299,7 +299,7 @@ export class DataZoom<T extends IDataZoomSpec = IDataZoomSpec> extends DataFilte
299299
minSpan: this._minSpan,
300300
maxSpan: this._maxSpan,
301301
delayType: spec.delayType,
302-
delayTime: isValid(spec.delayType) ? (spec.delayTime ?? 30) : 0,
302+
delayTime: isValid(spec.delayType) ? spec.delayTime ?? 30 : 0,
303303
realTime: spec.realTime ?? true,
304304
previewData: isNeedPreview && this._data.getLatestData(),
305305
previewPointsX: isNeedPreview && this._dataToPositionX,

packages/vchart/src/component/data-zoom/scroll-bar/scroll-bar.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ export class ScrollBar<T extends IScrollBarSpec = IScrollBarSpec> extends DataFi
108108
range: [this._start, this._end],
109109
direction: this._isHorizontal ? 'horizontal' : 'vertical',
110110
delayType: this._spec?.delayType,
111-
delayTime: isValid(this._spec?.delayType) ? (this._spec?.delayTime ?? 30) : 0,
111+
delayTime: isValid(this._spec?.delayType) ? this._spec?.delayTime ?? 30 : 0,
112112
realTime: this._spec?.realTime ?? true,
113113
...this._getComponentAttrs()
114114
} as ScrollBarAttributes;

packages/vchart/src/component/label/util.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -294,15 +294,15 @@ export function stackLabel(
294294
pos === 'middle'
295295
? 'center'
296296
: (pos === 'withChange' && datum.end - datum.start >= 0) || pos === 'max'
297-
? 'left'
298-
: 'right';
297+
? 'left'
298+
: 'right';
299299
} else {
300300
attribute.textBaseline =
301301
pos === 'middle'
302302
? pos
303303
: (pos === 'withChange' && datum.end - datum.start >= 0) || pos === 'max'
304-
? 'bottom'
305-
: 'top';
304+
? 'bottom'
305+
: 'top';
306306
}
307307
attributeTransform?.(label, datum, attribute);
308308
return createText({ ...attribute, id: label.id });

0 commit comments

Comments
 (0)