diff --git a/.eslintignore b/.eslintignore index 9c957cc19b..b8f9514eda 100644 --- a/.eslintignore +++ b/.eslintignore @@ -18,3 +18,4 @@ gatsby-*.js global.d.ts jest.config.js .eslintrc.* +packages/utils/src/mini-adapter/ diff --git a/.eslintrc.js b/.eslintrc.js index 5f82b5b36e..966a95948f 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -15,8 +15,9 @@ module.exports = { ecmaVersion: 12, sourceType: 'module' }, - plugins: ['@typescript-eslint'], + plugins: ['@typescript-eslint',"unused-imports"], rules: { + "unused-imports/no-unused-imports": "error", '@typescript-eslint/no-loss-of-precision':0, '@typescript-eslint/no-inferrable-types': 0, 'no-constant-condition': 0, @@ -38,5 +39,5 @@ module.exports = { alwaysTryTypes: true, }, }, - }, + } }; \ No newline at end of file diff --git a/dev-demos/features/point/image.tsx b/dev-demos/features/point/image.tsx index 3345fc9b0d..e6d1283033 100644 --- a/dev-demos/features/point/image.tsx +++ b/dev-demos/features/point/image.tsx @@ -1,4 +1,4 @@ -import { PointLayer, ImageLayer, Scene } from '@antv/l7'; +import { ImageLayer, Scene } from '@antv/l7'; import { GaodeMap } from '@antv/l7-maps'; import React, { useEffect } from 'react'; diff --git a/dev-demos/features/point/linearline.tsx b/dev-demos/features/point/linearline.tsx index 7d78764642..241c895668 100644 --- a/dev-demos/features/point/linearline.tsx +++ b/dev-demos/features/point/linearline.tsx @@ -1,80 +1,80 @@ -import { PointLayer, LineLayer, Scene, RasterLayer } from '@antv/l7'; +import { LineLayer, Scene } from '@antv/l7'; import { GaodeMap } from '@antv/l7-maps'; import React, { useEffect } from 'react'; export default () => { - useEffect(() => { - const scene = new Scene({ - id: 'map', - map: new GaodeMap({ - center: [105, 30.258134], - zoom: 5, - }), - }); - - const geoData = { - type: 'FeatureCollection', - features: [ - { - type: 'Feature', - properties: { - testOpacity: 0.8, - }, - geometry: { - type: 'Polygon', - coordinates: [ - [ - [99.228515625, 37.43997405227057], - [99.228515625, 35.02999636902566], - [101.337890625, 32.99023555965106], - [99.052734375, 30.29701788337205], - [100.72265625, 27.994401411046148], - [99.49218749999999, 26.352497858154024], - [100.634765625, 23.725011735951796], - ], - [ - [108.544921875, 37.71859032558816], - [110.74218749999999, 34.66935854524543], - [110.21484375, 32.76880048488168], - [112.412109375, 32.84267363195431], - [112.1484375, 30.751277776257812], - [114.08203125, 31.42866311735861], - ], - ], - }, - }, - ], - }; + useEffect(() => { + const scene = new Scene({ + id: 'map', + map: new GaodeMap({ + center: [105, 30.258134], + zoom: 5, + }), + }); - const layer = new LineLayer({}) - .source(geoData) - .size(10) - .shape('linearline') - .style({ - rampColors: { - colors: [ - '#FF4818', - '#F7B74A', - '#FFF598', - '#91EABC', - '#2EA9A1', - '#206C7C', + const geoData = { + type: 'FeatureCollection', + features: [ + { + type: 'Feature', + properties: { + testOpacity: 0.8, + }, + geometry: { + type: 'Polygon', + coordinates: [ + [ + [99.228515625, 37.43997405227057], + [99.228515625, 35.02999636902566], + [101.337890625, 32.99023555965106], + [99.052734375, 30.29701788337205], + [100.72265625, 27.994401411046148], + [99.49218749999999, 26.352497858154024], + [100.634765625, 23.725011735951796], ], - weights: [0.1, 0.1, 0.1, 0.1, 0.1, 0.5] - }, - }); + [ + [108.544921875, 37.71859032558816], + [110.74218749999999, 34.66935854524543], + [110.21484375, 32.76880048488168], + [112.412109375, 32.84267363195431], + [112.1484375, 30.751277776257812], + [114.08203125, 31.42866311735861], + ], + ], + }, + }, + ], + }; - scene.on('loaded', () => { - scene.addLayer(layer); - }) - }, []) - return ( -
- ); -} + const layer = new LineLayer({}) + .source(geoData) + .size(10) + .shape('linearline') + .style({ + rampColors: { + colors: [ + '#FF4818', + '#F7B74A', + '#FFF598', + '#91EABC', + '#2EA9A1', + '#206C7C', + ], + weights: [0.1, 0.1, 0.1, 0.1, 0.1, 0.5], + }, + }); + + scene.on('loaded', () => { + scene.addLayer(layer); + }); + }, []); + return ( + + ); +}; diff --git a/dev-demos/features/point/tile.tsx b/dev-demos/features/point/tile.tsx index 0184e1194f..59089b6b27 100644 --- a/dev-demos/features/point/tile.tsx +++ b/dev-demos/features/point/tile.tsx @@ -1,4 +1,4 @@ -import { PointLayer, ImageLayer, Scene, RasterLayer } from '@antv/l7'; +import { Scene, RasterLayer } from '@antv/l7'; import { GaodeMap } from '@antv/l7-maps'; import React, { useEffect } from 'react'; diff --git a/package.json b/package.json index a5f84ab326..deac2a0ae9 100644 --- a/package.json +++ b/package.json @@ -83,9 +83,8 @@ "enzyme-adapter-react-16": "^1.5.0", "enzyme-to-json": "^3.0.0-beta6", "eslint": "^7.32.0", - "eslint-config-egg": "^7.5.1", "eslint-plugin-html": "^6.0.0", - "eslint-plugin-no-autofix": "^1.2.3", + "eslint-plugin-unused-imports": "^2.0.0", "father": "^4.0.0-rc.2", "gatsby": "2.32.13", "gatsby-plugin-google-analytics": "^2.1.27", @@ -166,6 +165,7 @@ "postbuild": "yarn build:declarations", "build:declarations": "lerna run tsc --stream --no-bail", "lint:fix": "prettier --write packages/**/src/**/*.ts packages/site/docs/api/**/*.md packages/site/docs/api/*.md dev-demos/**/**/*.tsx *.md", + "lint:src": "eslint packages/**/src/**/*.ts dev-demos/**/**/*.tsx ", "lint:examples": "eslint packages/site/examples --fix --ext .js", "lint:css": "stylelint 'packages/**/src/**/*.js{,x}'", "lint": "run-p -c lint:*", @@ -197,7 +197,7 @@ ], "husky": { "hooks": { - "pre-commit": "yarn run build && yarn run test-cover", + "pre-commit": "yarn run prebuild && yarn run test-cover", "commit-msg": "commitlint -E HUSKY_GIT_PARAMS" } }, diff --git a/packages/component/src/control/logo.ts b/packages/component/src/control/logo.ts index 899d08273f..c708d50771 100644 --- a/packages/component/src/control/logo.ts +++ b/packages/component/src/control/logo.ts @@ -1,4 +1,3 @@ -import { IControlOption } from '@antv/l7-core'; import { DOM } from '@antv/l7-utils'; import Control, { PositionType } from './BaseControl'; diff --git a/packages/core/src/utils/math.ts b/packages/core/src/utils/math.ts index 4ffea1ba87..919ca0d527 100644 --- a/packages/core/src/utils/math.ts +++ b/packages/core/src/utils/math.ts @@ -1,4 +1,4 @@ -import { mat3, mat4, vec3, vec4 } from 'gl-matrix'; +import { vec3, vec4 } from 'gl-matrix'; export function getAngle(angle: number | undefined) { if (angle === undefined) { diff --git a/packages/layers/src/core/BaseLayer.ts b/packages/layers/src/core/BaseLayer.ts index bcfade0185..b639d3f624 100644 --- a/packages/layers/src/core/BaseLayer.ts +++ b/packages/layers/src/core/BaseLayer.ts @@ -2,7 +2,6 @@ import { SyncBailHook, SyncHook, SyncWaterfallHook } from '@antv/async-hook'; import { BlendType, - gl, IActiveOption, IAnimateOption, IAttrubuteAndElements, @@ -33,17 +32,12 @@ import { IScale, IScaleOptions, IShaderModuleService, - ISource, ISourceCFG, - IStyleAttributeInitializationOptions, IStyleAttributeService, IStyleAttributeUpdateOptions, LayerEventType, lazyInject, LegendItems, - ScaleAttributeType, - ScaleTypeName, - ScaleTypes, StyleAttributeField, StyleAttributeOption, Triangulation, diff --git a/packages/layers/src/core/BaseModel.ts b/packages/layers/src/core/BaseModel.ts index af45efd78d..5531a8c3d7 100644 --- a/packages/layers/src/core/BaseModel.ts +++ b/packages/layers/src/core/BaseModel.ts @@ -29,7 +29,7 @@ import { } from '@antv/l7-core'; import { rgb2arr } from '@antv/l7-utils'; import { color } from 'd3-color'; -import { isEqual, isFunction, isNumber, isString } from 'lodash'; +import { isEqual, isNumber, isString } from 'lodash'; import { BlendTypes } from '../utils/blend'; export type styleSingle = diff --git a/packages/layers/src/core/interface.ts b/packages/layers/src/core/interface.ts index 085e7b4d96..b31f5e3183 100644 --- a/packages/layers/src/core/interface.ts +++ b/packages/layers/src/core/interface.ts @@ -1,6 +1,6 @@ import { IAnimateOption, IMapService } from '@antv/l7-core'; import { IColorRamp, IImagedata } from '@antv/l7-utils'; -import { styleOffset, styleSingle } from '../core/BaseModel'; +import { styleOffset } from '../core/BaseModel'; import { anchorType } from '../utils/symbol-layout'; export enum lineStyleType { 'solid' = 0.0, diff --git a/packages/layers/src/core/triangulation.ts b/packages/layers/src/core/triangulation.ts index d9e9b08ddc..2d28ba58bf 100644 --- a/packages/layers/src/core/triangulation.ts +++ b/packages/layers/src/core/triangulation.ts @@ -1,13 +1,12 @@ import { IEncodeFeature } from '@antv/l7-core'; import { - aProjectFlat, calculateCentroid, calculatePointsCenterAndRadius, lngLatToMeters, } from '@antv/l7-utils'; import earcut from 'earcut'; // @ts-ignore -import { mat4, vec3 } from 'gl-matrix'; +import { vec3 } from 'gl-matrix'; import { EARTH_RADIUS, EARTH_RADIUS_OUTER, @@ -16,7 +15,6 @@ import { primitiveSphere, } from '../earth/utils'; import ExtrudePolyline from '../utils/extrude_polyline'; -import SimpleLine from '../utils/simpleLine'; import extrudePolygon, { extrude_PolygonNormal, fillPolygon, diff --git a/packages/layers/src/heatmap/triangulation.ts b/packages/layers/src/heatmap/triangulation.ts index 3c961c3c5c..b6f2741cae 100644 --- a/packages/layers/src/heatmap/triangulation.ts +++ b/packages/layers/src/heatmap/triangulation.ts @@ -1,4 +1,3 @@ -import { IEncodeFeature, IParseDataItem } from '@antv/l7-core'; // @ts-ignore export function heatMap3DTriangulation(width: number, height: number) { diff --git a/packages/layers/src/plugins/DataMappingPlugin.ts b/packages/layers/src/plugins/DataMappingPlugin.ts index 726298e2d6..33bbdbf25f 100644 --- a/packages/layers/src/plugins/DataMappingPlugin.ts +++ b/packages/layers/src/plugins/DataMappingPlugin.ts @@ -4,7 +4,6 @@ import { IGlobalConfigService, ILayer, ILayerPlugin, - ILngLat, IMapService, IParseDataItem, IStyleAttribute, @@ -13,7 +12,7 @@ import { TYPES, } from '@antv/l7-core'; import { Version } from '@antv/l7-maps'; -import { isColor, normalize, rgb2arr, unProjectFlat } from '@antv/l7-utils'; +import { isColor, normalize, rgb2arr } from '@antv/l7-utils'; import { inject, injectable } from 'inversify'; import { cloneDeep } from 'lodash'; import 'reflect-metadata'; diff --git a/packages/layers/src/plugins/DataSourcePlugin.ts b/packages/layers/src/plugins/DataSourcePlugin.ts index 5f9dd42ad3..821b14104b 100644 --- a/packages/layers/src/plugins/DataSourcePlugin.ts +++ b/packages/layers/src/plugins/DataSourcePlugin.ts @@ -1,10 +1,4 @@ -import { - ILayer, - ILayerPlugin, - ILngLat, - IMapService, - TYPES, -} from '@antv/l7-core'; +import { ILayer, ILayerPlugin, IMapService, TYPES } from '@antv/l7-core'; import Source, { DEFAULT_DATA, DEFAULT_PARSER, diff --git a/packages/layers/src/plugins/FeatureScalePlugin.ts b/packages/layers/src/plugins/FeatureScalePlugin.ts index 66545b4528..f88e4195bf 100644 --- a/packages/layers/src/plugins/FeatureScalePlugin.ts +++ b/packages/layers/src/plugins/FeatureScalePlugin.ts @@ -13,7 +13,7 @@ import { TYPES, } from '@antv/l7-core'; import { IParseDataItem } from '@antv/l7-source'; -import { extent, ticks } from 'd3-array'; +import { extent } from 'd3-array'; import * as d3interpolate from 'd3-interpolate'; import * as d3 from 'd3-scale'; import { inject, injectable } from 'inversify'; diff --git a/packages/layers/src/plugins/LayerModelPlugin.ts b/packages/layers/src/plugins/LayerModelPlugin.ts index 3b053236fb..922d22d44f 100644 --- a/packages/layers/src/plugins/LayerModelPlugin.ts +++ b/packages/layers/src/plugins/LayerModelPlugin.ts @@ -1,4 +1,4 @@ -import { ILayer, ILayerPlugin, IMapService, TYPES } from '@antv/l7-core'; +import { ILayer, ILayerPlugin } from '@antv/l7-core'; import { injectable } from 'inversify'; import 'reflect-metadata'; /** diff --git a/packages/layers/src/plugins/LayerStylePlugin.ts b/packages/layers/src/plugins/LayerStylePlugin.ts index b68e317995..e192e0b371 100644 --- a/packages/layers/src/plugins/LayerStylePlugin.ts +++ b/packages/layers/src/plugins/LayerStylePlugin.ts @@ -1,4 +1,4 @@ -import { ILayer, ILayerPlugin, IMapService, TYPES } from '@antv/l7-core'; +import { ILayer, ILayerPlugin } from '@antv/l7-core'; import { injectable } from 'inversify'; import 'reflect-metadata'; /** diff --git a/packages/layers/src/raster/raster.ts b/packages/layers/src/raster/raster.ts index 3f1b81733e..9957958364 100644 --- a/packages/layers/src/raster/raster.ts +++ b/packages/layers/src/raster/raster.ts @@ -1,16 +1,4 @@ -import { - AttributeType, - gl, - IEncodeFeature, - ILayer, - ILayerPlugin, - IModelUniform, - IRasterParserDataItem, - IStyleAttributeService, - ITexture2D, - lazyInject, - TYPES, -} from '@antv/l7-core'; +import { gl, IModelUniform, ITexture2D } from '@antv/l7-core'; import { generateColorRamp, IColorRamp } from '@antv/l7-utils'; import BaseLayer from '../core/BaseLayer'; diff --git a/packages/layers/src/tile/tmsTileLayer.ts b/packages/layers/src/tile/tmsTileLayer.ts index ba0c46957f..f60f8dc4b9 100644 --- a/packages/layers/src/tile/tmsTileLayer.ts +++ b/packages/layers/src/tile/tmsTileLayer.ts @@ -1,4 +1,4 @@ -import { Tile, TilesetManager } from '@antv/l7-utils'; +import { Tile } from '@antv/l7-utils'; import BaseTileLayer from './tileLayer/baseTileLayer'; export class TMSTileLayer extends BaseTileLayer { diff --git a/packages/layers/src/utils/blend.ts b/packages/layers/src/utils/blend.ts index 1d10a8a171..da4b836f44 100644 --- a/packages/layers/src/utils/blend.ts +++ b/packages/layers/src/utils/blend.ts @@ -1,4 +1,4 @@ -import { BlendType, gl, IBlendOptions, IBlendTypes } from '@antv/l7-core'; +import { BlendType, gl, IBlendTypes } from '@antv/l7-core'; export const BlendTypes: IBlendTypes = { [BlendType.additive]: { enable: true, diff --git a/packages/layers/src/utils/dataMappingStyle.ts b/packages/layers/src/utils/dataMappingStyle.ts index 39cc834647..67a6add5a9 100644 --- a/packages/layers/src/utils/dataMappingStyle.ts +++ b/packages/layers/src/utils/dataMappingStyle.ts @@ -1,12 +1,9 @@ import { - gl, ILayer, IStyleAttributeUpdateOptions, - ITexture2D, StyleAttributeField, StyleAttributeOption, } from '@antv/l7-core'; -import { rgb2arr } from '@antv/l7-utils'; import { isFunction, isNumber, isString } from 'lodash'; /** * 该文件中的工具方法主要用于对 style 中的属性进行 数据映射 diff --git a/packages/layers/src/utils/multiPassRender.ts b/packages/layers/src/utils/multiPassRender.ts index fdb107cd31..6285eed513 100644 --- a/packages/layers/src/utils/multiPassRender.ts +++ b/packages/layers/src/utils/multiPassRender.ts @@ -1,12 +1,4 @@ -import { - IGlobalConfigService, - ILayer, - ILayerPlugin, - IPass, - IPostProcessingPass, - IRendererService, - TYPES, -} from '@antv/l7-core'; +import { ILayer, IPass, IPostProcessingPass } from '@antv/l7-core'; /** * 'blurH' -> ['blurH', {}] diff --git a/packages/layers/src/utils/polylineNormal.ts b/packages/layers/src/utils/polylineNormal.ts index 8e1945bc86..c20b2d43e5 100644 --- a/packages/layers/src/utils/polylineNormal.ts +++ b/packages/layers/src/utils/polylineNormal.ts @@ -1,4 +1,4 @@ -import { aProjectFlat, lngLatToMeters } from '@antv/l7-utils'; +import { aProjectFlat } from '@antv/l7-utils'; import { vec2 } from 'gl-matrix'; export function computeMiter( tangent: vec2, diff --git a/packages/layers/src/utils/symbol-layout.ts b/packages/layers/src/utils/symbol-layout.ts index f595af6f68..a6934f7952 100644 --- a/packages/layers/src/utils/symbol-layout.ts +++ b/packages/layers/src/utils/symbol-layout.ts @@ -1,5 +1,3 @@ -import { type } from 'os'; - interface IPoint { x: number; y: number; diff --git a/packages/map/src/geo/lng_lat.ts b/packages/map/src/geo/lng_lat.ts index ecea64b804..d88be31376 100644 --- a/packages/map/src/geo/lng_lat.ts +++ b/packages/map/src/geo/lng_lat.ts @@ -1,5 +1,4 @@ import { wrap } from '../util'; -import LngLatBounds from './lng_lat_bounds'; export const earthRadius = 6371008.8; export type LngLatLike = | LngLat diff --git a/packages/map/src/geo/transform.ts b/packages/map/src/geo/transform.ts index edc55c9243..3211b5e3c2 100644 --- a/packages/map/src/geo/transform.ts +++ b/packages/map/src/geo/transform.ts @@ -1,10 +1,8 @@ // @ts-ignore import { isMini } from '@antv/l7-utils'; -import { mat2, mat4, vec3, vec4 } from 'gl-matrix'; -import Point, { PointLike } from '../geo/point'; +import { mat2, mat4, vec4 } from 'gl-matrix'; +import Point from '../geo/point'; import { clamp, interpolate, wrap } from '../util'; -import Aabb from '../utils/Aabb'; -import Frustum from '../utils/primitives'; import EdgeInsets, { IPaddingOptions } from './edge_insets'; import LngLat from './lng_lat'; import LngLatBounds from './lng_lat_bounds'; diff --git a/packages/map/src/handler/blockable_map_event.ts b/packages/map/src/handler/blockable_map_event.ts index e0c1dacf93..d5a42b4a5a 100644 --- a/packages/map/src/handler/blockable_map_event.ts +++ b/packages/map/src/handler/blockable_map_event.ts @@ -1,8 +1,7 @@ // @ts-ignore import { EarthMap } from '../earthmap'; -import Point from '../geo/point'; import { Map } from '../map'; -import { MapMouseEvent, MapTouchEvent, MapWheelEvent } from './events'; +import { MapMouseEvent } from './events'; export default class BlockableMapEventHandler { private map: Map | EarthMap; private delayContextMenu: boolean; diff --git a/packages/maps/src/amap/map.ts b/packages/maps/src/amap/map.ts index e4b99f4019..7b183ad44e 100644 --- a/packages/maps/src/amap/map.ts +++ b/packages/maps/src/amap/map.ts @@ -16,11 +16,10 @@ import { IStatusOptions, IViewport, MapServiceEvent, - MapStyle, TYPES, } from '@antv/l7-core'; import { DOM } from '@antv/l7-utils'; -import { mat4, vec2, vec3 } from 'gl-matrix'; +import { mat4, vec3 } from 'gl-matrix'; import { inject, injectable } from 'inversify'; import 'reflect-metadata'; import { IAMapEvent, IAMapInstance } from '../../typings/index'; diff --git a/packages/maps/src/amap2/map.ts b/packages/maps/src/amap2/map.ts index e5f12cefbc..346bf76afa 100644 --- a/packages/maps/src/amap2/map.ts +++ b/packages/maps/src/amap2/map.ts @@ -16,16 +16,14 @@ import { IStatusOptions, IViewport, MapServiceEvent, - MapStyle, - Point, TYPES, } from '@antv/l7-core'; import { amap2Project, DOM } from '@antv/l7-utils'; import { mat4, vec2, vec3 } from 'gl-matrix'; import { inject, injectable } from 'inversify'; import 'reflect-metadata'; -import { IAMapEvent, IAMapInstance } from '../../typings/index'; -import { ISimpleMapCoord, SimpleMapCoord } from '../simpleMapCoord'; +import { IAMapInstance } from '../../typings/index'; +import { SimpleMapCoord } from '../simpleMapCoord'; import { toPaddingOptions } from '../utils'; import { Version } from '../version'; import './logo.css'; diff --git a/packages/maps/src/earth/Viewport.ts b/packages/maps/src/earth/Viewport.ts index d943e77a4e..e2f4c4fceb 100644 --- a/packages/maps/src/earth/Viewport.ts +++ b/packages/maps/src/earth/Viewport.ts @@ -1,4 +1,4 @@ -import { IMapCamera, IViewport } from '@antv/l7-core'; +import { IViewport } from '@antv/l7-core'; import { mat4, vec3 } from 'gl-matrix'; import WebMercatorViewport from 'viewport-mercator-project'; diff --git a/packages/maps/src/mapbox/map.ts b/packages/maps/src/mapbox/map.ts index 0830e301b0..21b3298ace 100644 --- a/packages/maps/src/mapbox/map.ts +++ b/packages/maps/src/mapbox/map.ts @@ -18,9 +18,9 @@ import { TYPES, } from '@antv/l7-core'; import { DOM } from '@antv/l7-utils'; -import { mat4, vec2, vec3 } from 'gl-matrix'; +import { mat4, vec3 } from 'gl-matrix'; import { inject, injectable } from 'inversify'; -import mapboxgl, { IControl, Map } from 'mapbox-gl'; +import mapboxgl, { Map } from 'mapbox-gl'; // tslint:disable-next-line:no-submodule-imports import 'mapbox-gl/dist/mapbox-gl.css'; import 'reflect-metadata'; diff --git a/packages/renderer/src/regl/ReglFramebuffer.ts b/packages/renderer/src/regl/ReglFramebuffer.ts index d06df8d3e6..6363de8b80 100644 --- a/packages/renderer/src/regl/ReglFramebuffer.ts +++ b/packages/renderer/src/regl/ReglFramebuffer.ts @@ -1,5 +1,4 @@ import { - gl, IFramebuffer, IFramebufferInitializationOptions, IRenderbuffer, diff --git a/packages/renderer/src/regl/ReglModel.ts b/packages/renderer/src/regl/ReglModel.ts index 257c6ece81..3a2540acaa 100644 --- a/packages/renderer/src/regl/ReglModel.ts +++ b/packages/renderer/src/regl/ReglModel.ts @@ -8,7 +8,7 @@ import { IUniform, } from '@antv/l7-core'; import regl from 'l7regl'; -import { cloneDeep, extend, isPlainObject, isTypedArray } from 'lodash'; +import { cloneDeep, isPlainObject, isTypedArray } from 'lodash'; import { blendEquationMap, blendFuncMap, diff --git a/packages/source/src/transform/cluster.ts b/packages/source/src/transform/cluster.ts index 0ba685c59c..b7e85fe7bb 100644 --- a/packages/source/src/transform/cluster.ts +++ b/packages/source/src/transform/cluster.ts @@ -1,9 +1,4 @@ -import { - IClusterOptions, - IParserData, - ISourceCFG, - ITransform, -} from '@antv/l7-core'; +import { IClusterOptions, IParserData } from '@antv/l7-core'; // @ts-ignore // tslint:disable-next-line:no-submodule-imports import Supercluster from 'supercluster/dist/supercluster'; diff --git a/packages/source/src/transform/hexagon.ts b/packages/source/src/transform/hexagon.ts index e286f406e0..3d8b0b5f6b 100644 --- a/packages/source/src/transform/hexagon.ts +++ b/packages/source/src/transform/hexagon.ts @@ -1,12 +1,7 @@ import { aProjectFlat, Satistics } from '@antv/l7-utils'; import { hexbin } from 'd3-hexbin'; const R_EARTH = 6378000; -import { - IParseDataItem, - IParserData, - ISourceCFG, - ITransform, -} from '@antv/l7-core'; +import { IParseDataItem, IParserData, ITransform } from '@antv/l7-core'; interface IHexBinItem