This is an automated email from the ASF dual-hosted git repository. ovilia pushed a commit to branch fix-lint in repository https://gitbox.apache.org/repos/asf/echarts.git
commit 59c206c53a8a613a03d269f349819352b6243dbe Author: Ovilia <zwl.s...@gmail.com> AuthorDate: Fri Sep 2 15:57:39 2022 +0800 chore(lint): enforce consistent spacing after comment starts --- .eslintrc-common.yaml | 2 +- src/coord/axisHelper.ts | 2 +- src/core/task.ts | 2 +- src/export/api.ts | 6 +++--- src/layout/barPolar.ts | 2 +- src/util/states.ts | 3 ++- src/util/types.ts | 3 ++- 7 files changed, 11 insertions(+), 9 deletions(-) diff --git a/.eslintrc-common.yaml b/.eslintrc-common.yaml index 081c0bfcd..4ae0d21d4 100644 --- a/.eslintrc-common.yaml +++ b/.eslintrc-common.yaml @@ -163,7 +163,7 @@ rules: - 2 - "never" space-unary-ops: 2 - spaced-comment: 0 + spaced-comment: "error" max-nested-callbacks: - 1 diff --git a/src/coord/axisHelper.ts b/src/coord/axisHelper.ts index c487d5287..3c5d685ee 100644 --- a/src/coord/axisHelper.ts +++ b/src/coord/axisHelper.ts @@ -77,7 +77,7 @@ export function getScaleExtent(scale: Scale, model: AxisBaseModel) { // (4) Consider other chart types using `barGrid`? // See #6728, #4862, `test/bar-overflow-time-plot.html` const ecModel = model.ecModel; - if (ecModel && (scaleType === 'time' /*|| scaleType === 'interval' */)) { + if (ecModel && (scaleType === 'time' /* || scaleType === 'interval' */)) { const barSeriesModels = prepareLayoutBarSeries('bar', ecModel); let isBaseAxisAndHasBarSeries = false; diff --git a/src/core/task.ts b/src/core/task.ts index 08d7e23ff..4d55846ea 100644 --- a/src/core/task.ts +++ b/src/core/task.ts @@ -384,7 +384,7 @@ const iterator: TaskDataIterator = (function () { -/////////////////////////////////////////////////////////// +// ----------------------------------------------------------------------------- // For stream debug (Should be commented out after used!) // @usage: printTask(this, 'begin'); // @usage: printTask(this, null, {someExtraProp}); diff --git a/src/export/api.ts b/src/export/api.ts index 4b777a237..6575f7995 100644 --- a/src/export/api.ts +++ b/src/export/api.ts @@ -41,7 +41,7 @@ export {use} from '../extension'; export {setPlatformAPI} from 'zrender/src/core/platform'; -//////////////// Helper Methods ///////////////////// +// --------------------- Helper Methods --------------------- export {default as parseGeoJSON} from '../coord/geo/parseGeoJson'; export {default as parseGeoJson} from '../coord/geo/parseGeoJson'; @@ -55,7 +55,7 @@ export * as util from './api/util'; export {default as env} from 'zrender/src/core/env'; -//////////////// Export for Exension Usage //////////////// +// --------------------- Export for Exension Usage --------------------- // export {SeriesData}; export {SeriesData as List}; // TODO: Compatitable with exists echarts-gl code export {default as Model} from '../model/Model'; @@ -72,7 +72,7 @@ export { export {brushSingle as innerDrawElementOnCanvas} from 'zrender/src/canvas/graphic'; -//////////////// Deprecated Extension Methods //////////////// +// --------------------- Deprecated Extension Methods --------------------- // Should use `ComponentModel.extend` or `class XXXX extend ComponentModel` to create class. // Then use `registerComponentModel` in `install` parameter when `use` this extension. For example: diff --git a/src/layout/barPolar.ts b/src/layout/barPolar.ts index bc63fcba9..48d8b4fa9 100644 --- a/src/layout/barPolar.ts +++ b/src/layout/barPolar.ts @@ -100,7 +100,7 @@ function barLayoutPolar(seriesType: string, ecModel: GlobalModel, api: Extension const valueDim = data.mapDimension(valueAxis.dim); const baseDim = data.mapDimension(baseAxis.dim); - const stacked = isDimensionStacked(data, valueDim /*, baseDim*/); + const stacked = isDimensionStacked(data, valueDim /* , baseDim */); const clampLayout = baseAxis.dim !== 'radius' || !seriesModel.get('roundCap', true); diff --git a/src/util/states.ts b/src/util/states.ts index f3886cd78..7f6e2551e 100644 --- a/src/util/states.ts +++ b/src/util/states.ts @@ -365,7 +365,8 @@ function elementStateProxy(this: Displayable, stateName: string, targetStates?: } return state; } -/**FI + +/** * Set hover style (namely "emphasis style") of element. * @param el Should not be `zrender/graphic/Group`. * @param focus 'self' | 'selfInSeries' | 'series' diff --git a/src/util/types.ts b/src/util/types.ts index 3e9eb31cf..36e970da6 100644 --- a/src/util/types.ts +++ b/src/util/types.ts @@ -758,7 +758,8 @@ export type ComponentLayoutMode = { type?: 'box', ignoreSize?: boolean | boolean[] }; -/******************* Mixins for Common Option Properties ********************** */ + +// ------------------ Mixins for Common Option Properties ------------------ export type PaletteOptionMixin = ColorPaletteOptionMixin; export interface ColorPaletteOptionMixin { --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@echarts.apache.org For additional commands, e-mail: commits-h...@echarts.apache.org