You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@echarts.apache.org by wa...@apache.org on 2022/09/25 13:35:55 UTC

[echarts] branch fix-lint created (now 14521df42)

This is an automated email from the ASF dual-hosted git repository.

wangzx pushed a change to branch fix-lint
in repository https://gitbox.apache.org/repos/asf/echarts.git


      at 14521df42 fix(chart): remove unused imports.

This branch includes the following new commits:

     new bc32dc4e2 style(lint): fix spacing issues
     new 080bdeb99 fix(boxplot): remove empty `boxplotVisual`.
     new 14521df42 fix(chart): remove unused imports.

The 3 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For additional commands, e-mail: commits-help@echarts.apache.org


[echarts] 03/03: fix(chart): remove unused imports.

Posted by wa...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

wangzx pushed a commit to branch fix-lint
in repository https://gitbox.apache.org/repos/asf/echarts.git

commit 14521df42ab1cc0d27ed099800dc37e2e425ec7e
Author: plainheart <yh...@all-my-life.cn>
AuthorDate: Sun Sep 25 21:34:31 2022 +0800

    fix(chart): remove unused imports.
---
 src/chart/graph/GraphView.ts         | 3 +--
 src/chart/sunburst/sunburstLayout.ts | 3 +--
 2 files changed, 2 insertions(+), 4 deletions(-)

diff --git a/src/chart/graph/GraphView.ts b/src/chart/graph/GraphView.ts
index bd5b9669c..0c6d1e01b 100644
--- a/src/chart/graph/GraphView.ts
+++ b/src/chart/graph/GraphView.ts
@@ -17,7 +17,6 @@
 * under the License.
 */
 
-import * as zrUtil from 'zrender/src/core/util';
 import SymbolDraw, { ListForSymbolDraw } from '../helper/SymbolDraw';
 import LineDraw from '../helper/LineDraw';
 import RoamController, { RoamControllerHost } from '../../component/helper/RoamController';
@@ -307,4 +306,4 @@ class GraphView extends ChartView {
     }
 }
 
-export default GraphView;
\ No newline at end of file
+export default GraphView;
diff --git a/src/chart/sunburst/sunburstLayout.ts b/src/chart/sunburst/sunburstLayout.ts
index f84fc3b53..a45f211c5 100644
--- a/src/chart/sunburst/sunburstLayout.ts
+++ b/src/chart/sunburst/sunburstLayout.ts
@@ -21,9 +21,8 @@ import { parsePercent } from '../../util/number';
 import * as zrUtil from 'zrender/src/core/util';
 import GlobalModel from '../../model/Global';
 import ExtensionAPI from '../../core/ExtensionAPI';
-import SunburstSeriesModel, { SunburstSeriesNodeItemOption, SunburstSeriesOption } from './SunburstSeries';
+import SunburstSeriesModel, { SunburstSeriesOption } from './SunburstSeries';
 import { TreeNode } from '../../data/Tree';
-import SeriesModel from '../../model/Series';
 
 // let PI2 = Math.PI * 2;
 const RADIAN = Math.PI / 180;


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For additional commands, e-mail: commits-help@echarts.apache.org


[echarts] 01/03: style(lint): fix spacing issues

Posted by wa...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

wangzx pushed a commit to branch fix-lint
in repository https://gitbox.apache.org/repos/asf/echarts.git

commit bc32dc4e273d5bb8c7ac5c12c3ac7a58e931cd68
Author: plainheart <yh...@all-my-life.cn>
AuthorDate: Sun Sep 25 21:26:19 2022 +0800

    style(lint): fix spacing issues
---
 .huskyrc                                |  2 +-
 src/chart/bar/BaseBarSeries.ts          |  4 ++--
 src/chart/line/helper.ts                |  4 ++--
 src/chart/map/MapSeries.ts              |  2 +-
 src/chart/sankey/sankeyLayout.ts        |  2 +-
 src/chart/tree/TreeSeries.ts            |  2 +-
 src/chart/treemap/TreemapSeries.ts      |  4 ++--
 src/component/dataZoom/DataZoomModel.ts |  2 +-
 src/component/legend/LegendView.ts      |  2 +-
 src/component/marker/MarkAreaView.ts    | 14 +++++++-------
 src/component/marker/MarkLineModel.ts   |  2 +-
 src/component/marker/MarkPointModel.ts  |  4 ++--
 src/component/marker/markerHelper.ts    |  2 +-
 src/coord/cartesian/Grid.ts             |  4 ++--
 src/coord/geo/GeoModel.ts               |  4 ++--
 src/coord/geo/GeoSVGResource.ts         |  2 +-
 src/coord/geo/fix/textCoord.ts          |  2 +-
 17 files changed, 29 insertions(+), 29 deletions(-)

diff --git a/.huskyrc b/.huskyrc
index 92e4551cb..3f05f5dba 100644
--- a/.huskyrc
+++ b/.huskyrc
@@ -1,5 +1,5 @@
 {
   "hooks": {
-    "pre-commit": "npm run lint && npm run checktype",
+    "pre-commit": "npm run lint && npm run checktype"
   }
 }
diff --git a/src/chart/bar/BaseBarSeries.ts b/src/chart/bar/BaseBarSeries.ts
index e21d96830..cfbb81ee7 100644
--- a/src/chart/bar/BaseBarSeries.ts
+++ b/src/chart/bar/BaseBarSeries.ts
@@ -92,11 +92,11 @@ class BaseBarSeriesModel<Opts extends BaseBarSeriesOption<unknown> = BaseBarSeri
             const pt = coordSys.dataToPoint(coordSys.clampData(value));
             if (startingAtTick) {
                 each(coordSys.getAxes(), function (axis: Axis2D, idx: number) {
-                    //If axis type is category, use tick coords instead
+                    // If axis type is category, use tick coords instead
                     if (axis.type === 'category') {
                         const tickCoords = axis.getTicksCoords();
                         let tickIdx = coordSys.clampData(value)[idx];
-                        //The index of rightmost tick of markArea is 1 larger than x1/y1 index
+                        // The index of rightmost tick of markArea is 1 larger than x1/y1 index
                         if (dims && (dims[idx] === 'x1' || dims[idx] === 'y1')) {
                             tickIdx += 1;
                         }
diff --git a/src/chart/line/helper.ts b/src/chart/line/helper.ts
index c9ebef65e..13a1c2c01 100644
--- a/src/chart/line/helper.ts
+++ b/src/chart/line/helper.ts
@@ -58,11 +58,11 @@ export function prepareDataCoordInfo(
 
     let stacked = false;
     const stackResultDim = data.getCalculationInfo('stackResultDimension');
-    if (isDimensionStacked(data, dims[0] /*, dims[1]*/)) { // jshint ignore:line
+    if (isDimensionStacked(data, dims[0] /* , dims[1] */)) { // jshint ignore:line
         stacked = true;
         dims[0] = stackResultDim;
     }
-    if (isDimensionStacked(data, dims[1] /*, dims[0]*/)) { // jshint ignore:line
+    if (isDimensionStacked(data, dims[1] /* , dims[0] */)) { // jshint ignore:line
         stacked = true;
         dims[1] = stackResultDim;
     }
diff --git a/src/chart/map/MapSeries.ts b/src/chart/map/MapSeries.ts
index acca989f1..c65aa6bfb 100644
--- a/src/chart/map/MapSeries.ts
+++ b/src/chart/map/MapSeries.ts
@@ -286,7 +286,7 @@ class MapSeries extends SeriesModel<MapSeriesOption> {
         // for geoJSON source: 0.75.
         aspectScale: null,
 
-        ///// Layout with center and size
+        // Layout with center and size
         // If you wan't to put map in a fixed size box with right aspect ratio
         // This two properties may more conveninet
         // layoutCenter: [50%, 50%]
diff --git a/src/chart/sankey/sankeyLayout.ts b/src/chart/sankey/sankeyLayout.ts
index c4343694b..0ae24df1c 100644
--- a/src/chart/sankey/sankeyLayout.ts
+++ b/src/chart/sankey/sankeyLayout.ts
@@ -122,7 +122,7 @@ function computeNodeBreadths(
     const remainEdges = [];
     // Storage each node's indegree.
     const indegreeArr = [];
-    //Used to storage the node with indegree is equal to 0.
+    // Used to storage the node with indegree is equal to 0.
     let zeroIndegrees: GraphNode[] = [];
     let nextTargetNode: GraphNode[] = [];
     let x = 0;
diff --git a/src/chart/tree/TreeSeries.ts b/src/chart/tree/TreeSeries.ts
index 659dfc16c..245bf91dc 100644
--- a/src/chart/tree/TreeSeries.ts
+++ b/src/chart/tree/TreeSeries.ts
@@ -146,7 +146,7 @@ class TreeSeriesModel extends SeriesModel<TreeSeriesOption> {
      */
     getInitialData(option: TreeSeriesOption): SeriesData {
 
-        //create an virtual root
+        // create a virtual root
         const root: TreeSeriesNodeItemOption = {
             name: option.name,
             children: option.data
diff --git a/src/chart/treemap/TreemapSeries.ts b/src/chart/treemap/TreemapSeries.ts
index 2e5f22835..9207d88f1 100644
--- a/src/chart/treemap/TreemapSeries.ts
+++ b/src/chart/treemap/TreemapSeries.ts
@@ -265,14 +265,14 @@ class TreemapSeriesModel extends SeriesModel<TreemapSeriesOption> {
             // bottom
             emptyItemWidth: 25,             // Width of empty node.
             itemStyle: {
-                color: 'rgba(0,0,0,0.7)', //'#5793f3',
+                color: 'rgba(0,0,0,0.7)', // '#5793f3',
                 textStyle: {
                     color: '#fff'
                 }
             },
             emphasis: {
                 itemStyle: {
-                    color: 'rgba(0,0,0,0.9)' //'#5793f3',
+                    color: 'rgba(0,0,0,0.9)' // '#5793f3',
                 }
             }
         },
diff --git a/src/component/dataZoom/DataZoomModel.ts b/src/component/dataZoom/DataZoomModel.ts
index 12382f3ef..bcaae6a10 100644
--- a/src/component/dataZoom/DataZoomModel.ts
+++ b/src/component/dataZoom/DataZoomModel.ts
@@ -234,7 +234,7 @@ class DataZoomModel<Opts extends DataZoomOption = DataZoomOption> extends Compon
     mergeOption(newOption: Opts): void {
         const inputRawOption = retrieveRawOption(newOption);
 
-        //FIX #2591
+        // FIX #2591
         merge(this.option, newOption, true);
         merge(this.settledOption, inputRawOption, true);
 
diff --git a/src/component/legend/LegendView.ts b/src/component/legend/LegendView.ts
index 6e6c9ceb8..12ffaa198 100644
--- a/src/component/legend/LegendView.ts
+++ b/src/component/legend/LegendView.ts
@@ -510,7 +510,7 @@ class LegendView extends ComponentView {
                 contentPos[orientIdx] += selectorRect[wh] + selectorButtonGap;
             }
 
-            //Always align selector to content as 'middle'
+            // Always align selector to content as 'middle'
             selectorPos[1 - orientIdx] += contentRect[hw] / 2 - selectorRect[hw] / 2;
             selectorGroup.x = selectorPos[0];
             selectorGroup.y = selectorPos[1];
diff --git a/src/component/marker/MarkAreaView.ts b/src/component/marker/MarkAreaView.ts
index 801a74b6a..9b2476d36 100644
--- a/src/component/marker/MarkAreaView.ts
+++ b/src/component/marker/MarkAreaView.ts
@@ -133,11 +133,11 @@ function markAreaFilter(coordSys: CoordinateSystem, item: MarkAreaMergedItemOpti
         ) {
             return true;
         }
-        //Directly returning true may also do the work,
-        //because markArea will not be shown automatically
-        //when it's not included in coordinate system.
-        //But filtering ahead can avoid keeping rendering markArea
-        //when there are too many of them.
+        // Directly returning true may also do the work,
+        // because markArea will not be shown automatically
+        // when it's not included in coordinate system.
+        // But filtering ahead can avoid keeping rendering markArea
+        // when there are too many of them.
         return markerHelper.zoneFilter(coordSys, item0, item1);
     }
     return markerHelper.dataFilter(coordSys, item0)
@@ -164,8 +164,8 @@ function getSingleMarkerEndPoint(
     else {
         // Chart like bar may have there own marker positioning logic
         if (seriesModel.getMarkerPosition) {
-            //Consider the case that user input the right-bottom point first
-            //Pick the larger x and y as 'x1' and 'y1'
+            // Consider the case that user input the right-bottom point first
+            // Pick the larger x and y as 'x1' and 'y1'
             const pointValue0 = data.getValues(['x0', 'y0'], idx);
             const pointValue1 = data.getValues(['x1', 'y1'], idx);
             const clampPointValue0 = coordSys.clampData(pointValue0);
diff --git a/src/component/marker/MarkLineModel.ts b/src/component/marker/MarkLineModel.ts
index c10025c64..903f196ec 100644
--- a/src/component/marker/MarkLineModel.ts
+++ b/src/component/marker/MarkLineModel.ts
@@ -118,7 +118,7 @@ class MarkLineModel extends MarkerModel<MarkLineOption> {
         symbol: ['circle', 'arrow'],
         symbolSize: [8, 16],
 
-        //symbolRotate: 0,
+        // symbolRotate: 0,
         symbolOffset: 0,
 
         precision: 2,
diff --git a/src/component/marker/MarkPointModel.ts b/src/component/marker/MarkPointModel.ts
index 4a4a67a1a..1b672317c 100644
--- a/src/component/marker/MarkPointModel.ts
+++ b/src/component/marker/MarkPointModel.ts
@@ -73,8 +73,8 @@ class MarkPointModel extends MarkerModel<MarkPointOption> {
         z: 5,
         symbol: 'pin',
         symbolSize: 50,
-        //symbolRotate: 0,
-        //symbolOffset: [0, 0]
+        // symbolRotate: 0,
+        // symbolOffset: [0, 0]
         tooltip: {
             trigger: 'item'
         },
diff --git a/src/component/marker/markerHelper.ts b/src/component/marker/markerHelper.ts
index 1616df422..8da0f9dc0 100644
--- a/src/component/marker/markerHelper.ts
+++ b/src/component/marker/markerHelper.ts
@@ -61,7 +61,7 @@ function markerTypeCalculatorWithExtent(
 ): [ParsedValue[], ParsedValue] {
     const coordArr: ParsedValue[] = [];
 
-    const stacked = isDimensionStacked(data, targetDataDim /*, otherDataDim*/);
+    const stacked = isDimensionStacked(data, targetDataDim /* , otherDataDim */);
     const calcDataDim = stacked
         ? data.getCalculationInfo('stackResultDimension')
         : targetDataDim;
diff --git a/src/coord/cartesian/Grid.ts b/src/coord/cartesian/Grid.ts
index 691effdd0..d22ddef55 100644
--- a/src/coord/cartesian/Grid.ts
+++ b/src/coord/cartesian/Grid.ts
@@ -369,7 +369,7 @@ class Grid implements CoordinateSystemMaster {
             y: 0
         };
 
-        /// Create axis
+        // Create axis
         ecModel.eachComponent('xAxis', createAxisCreator('x'), this);
         ecModel.eachComponent('yAxis', createAxisCreator('y'), this);
 
@@ -382,7 +382,7 @@ class Grid implements CoordinateSystemMaster {
 
         this._axesMap = axesMap;
 
-        /// Create cartesian2d
+        // Create cartesian2d
         each(axesMap.x, (xAxis, xAxisIndex) => {
             each(axesMap.y, (yAxis, yAxisIndex) => {
                 const key = 'x' + xAxisIndex + 'y' + yAxisIndex;
diff --git a/src/coord/geo/GeoModel.ts b/src/coord/geo/GeoModel.ts
index 796f77282..e22d29454 100644
--- a/src/coord/geo/GeoModel.ts
+++ b/src/coord/geo/GeoModel.ts
@@ -81,7 +81,7 @@ export interface GeoCommonOptionMixin extends RoamOptionMixin {
     // This parameter is used for scale this aspect
     aspectScale?: number;
 
-    ///// Layout with center and size
+    // Layout with center and size
     // If you wan't to put map in a fixed size box with right aspect ratio
     // This two properties may more conveninet
     // Like: `40` or `'50%'`.
@@ -156,7 +156,7 @@ class GeoModel extends ComponentModel<GeoOption> {
         // for geoJSON source: 0.75.
         aspectScale: null,
 
-        ///// Layout with center and size
+        // /// Layout with center and size
         // If you wan't to put map in a fixed size box with right aspect ratio
         // This two properties may more conveninet
         // layoutCenter: [50%, 50%]
diff --git a/src/coord/geo/GeoSVGResource.ts b/src/coord/geo/GeoSVGResource.ts
index e0e6d5900..56ed4f50f 100644
--- a/src/coord/geo/GeoSVGResource.ts
+++ b/src/coord/geo/GeoSVGResource.ts
@@ -267,7 +267,7 @@ export class GeoSVGResource implements GeoResource {
      * So we maintain graphic elements in this module, and enables `view` to use/return these
      * graphics from/to the pool with it's uid.
      */
-    useGraphic(hostKey: string /*, nameMap: NameMap */): GeoSVGGraphicRecord {
+    useGraphic(hostKey: string /* , nameMap: NameMap */): GeoSVGGraphicRecord {
         const usedRootMap = this._usedGraphicMap;
 
         let svgGraphic = usedRootMap.get(hostKey);
diff --git a/src/coord/geo/fix/textCoord.ts b/src/coord/geo/fix/textCoord.ts
index 813e26a44..3c9647bc1 100644
--- a/src/coord/geo/fix/textCoord.ts
+++ b/src/coord/geo/fix/textCoord.ts
@@ -26,7 +26,7 @@ const coordsOffsetMap = {
     '广东': [0, -10],
     '香港': [10, 5],
     '澳门': [-10, 10],
-    //'北京': [-10, 0],
+    // '北京': [-10, 0],
     '天津': [5, 5]
 } as Dictionary<number[]>;
 


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For additional commands, e-mail: commits-help@echarts.apache.org


[echarts] 02/03: fix(boxplot): remove empty `boxplotVisual`.

Posted by wa...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

wangzx pushed a commit to branch fix-lint
in repository https://gitbox.apache.org/repos/asf/echarts.git

commit 080bdeb99c34195918fe3995a40067739e27059a
Author: plainheart <yh...@all-my-life.cn>
AuthorDate: Sun Sep 25 21:33:48 2022 +0800

    fix(boxplot): remove empty `boxplotVisual`.
---
 src/chart/boxplot/boxplotVisual.ts | 26 --------------------------
 src/chart/boxplot/install.ts       |  4 +---
 2 files changed, 1 insertion(+), 29 deletions(-)

diff --git a/src/chart/boxplot/boxplotVisual.ts b/src/chart/boxplot/boxplotVisual.ts
deleted file mode 100644
index 067738a7b..000000000
--- a/src/chart/boxplot/boxplotVisual.ts
+++ /dev/null
@@ -1,26 +0,0 @@
-/*
-* Licensed to the Apache Software Foundation (ASF) under one
-* or more contributor license agreements.  See the NOTICE file
-* distributed with this work for additional information
-* regarding copyright ownership.  The ASF licenses this file
-* to you under the Apache License, Version 2.0 (the
-* "License"); you may not use this file except in compliance
-* with the License.  You may obtain a copy of the License at
-*
-*   http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing,
-* software distributed under the License is distributed on an
-* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-* KIND, either express or implied.  See the License for the
-* specific language governing permissions and limitations
-* under the License.
-*/
-
-import GlobalModel from '../../model/Global';
-import ExtensionAPI from '../../core/ExtensionAPI';
-import BoxplotSeriesModel from './BoxplotSeries';
-
-export default function boxplotVisual(ecModel: GlobalModel, api: ExtensionAPI) {
-
-}
\ No newline at end of file
diff --git a/src/chart/boxplot/install.ts b/src/chart/boxplot/install.ts
index e579f296f..b5a7efcd9 100644
--- a/src/chart/boxplot/install.ts
+++ b/src/chart/boxplot/install.ts
@@ -20,14 +20,12 @@
 import { EChartsExtensionInstallRegisters } from '../../extension';
 import BoxplotSeriesModel from './BoxplotSeries';
 import BoxplotView from './BoxplotView';
-import boxplotVisual from './boxplotVisual';
 import boxplotLayout from './boxplotLayout';
 import { boxplotTransform } from './boxplotTransform';
 
 export function install(registers: EChartsExtensionInstallRegisters) {
     registers.registerSeriesModel(BoxplotSeriesModel);
     registers.registerChartView(BoxplotView);
-    registers.registerVisual(boxplotVisual);
     registers.registerLayout(boxplotLayout);
     registers.registerTransform(boxplotTransform);
-}
\ No newline at end of file
+}


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For additional commands, e-mail: commits-help@echarts.apache.org