diff --git a/examples/gallery/build-tools/constants.js b/examples/gallery/build-tools/constants.js index 63f6186d30a..100fa077ca2 100644 --- a/examples/gallery/build-tools/constants.js +++ b/examples/gallery/build-tools/constants.js @@ -4,7 +4,7 @@ const PORT = 3000; const INPUT_DIR = 'src'; const IMAGE_DIR = 'images'; -/* eslint-disable */ +/* eslint-disable-next-line */ const MAPBOX_TOKEN = process.env.MapboxAccessToken; if (!MAPBOX_TOKEN) { console.log('Missing environment variable: MapboxAccessToken'); diff --git a/examples/layer-browser/src/app.js b/examples/layer-browser/src/app.js index 71ef6ab58f8..1de75c52760 100644 --- a/examples/layer-browser/src/app.js +++ b/examples/layer-browser/src/app.js @@ -160,7 +160,7 @@ export default class App extends PureComponent { return new Layer(layerProps); } - /* eslint-disable max-depth */ + /* eslint-disable-next-line max-depth */ _renderExamples() { let index = 1; const layers = [ diff --git a/examples/layer-browser/src/components/layer-controls.js b/examples/layer-browser/src/components/layer-controls.js index eae738d5dee..2308818b97e 100644 --- a/examples/layer-browser/src/components/layer-controls.js +++ b/examples/layer-browser/src/components/layer-controls.js @@ -215,7 +215,7 @@ export default class LayerControls extends PureComponent { ); } - /* eslint-disable complexity */ + /* eslint-disable-next-line complexity */ _renderSetting({settingName, value, propType, data, transitions}) { const originalValue = value; diff --git a/examples/layer-browser/src/examples/additional-layers.js b/examples/layer-browser/src/examples/additional-layers.js index 4ca5db50de7..7f267fc6aef 100644 --- a/examples/layer-browser/src/examples/additional-layers.js +++ b/examples/layer-browser/src/examples/additional-layers.js @@ -122,8 +122,8 @@ const TripsLayerExample = { } }; -/* eslint-disable quote-props */ export default { + /* eslint-disable-next-line quote-props */ 'Geo Layers': { S2Layer: S2LayerExample, QuadkeyLayer: QuadkeyLayerExample, diff --git a/examples/website/plot/plot-layer/surface-layer.js b/examples/website/plot/plot-layer/surface-layer.js index 7c9fde03f22..64a564910ea 100644 --- a/examples/website/plot/plot-layer/surface-layer.js +++ b/examples/website/plot/plot-layer/surface-layer.js @@ -41,7 +41,6 @@ export default class SurfaceLayer extends Layer { const attributeManager = this.getAttributeManager(); const noAlloc = true; - /* eslint-disable max-len */ attributeManager.add({ indices: {size: 1, isIndexed: true, update: this.calculateIndices, noAlloc}, positions: {size: 4, accessor: 'getPosition', update: this.calculatePositions, noAlloc}, @@ -176,7 +175,7 @@ export default class SurfaceLayer extends Layer { } // the fourth component is a flag for invalid z (NaN or Infinity) - /* eslint-disable max-statements */ + /* eslint-disable-next-line max-statements */ calculatePositions(attribute) { const {vertexCount} = this.state; const {uCount, vCount, getPosition, xScale, yScale, zScale} = this.props; diff --git a/examples/website/point-cloud/app.js b/examples/website/point-cloud/app.js index 62f64b8ec98..7af5bd995c2 100644 --- a/examples/website/point-cloud/app.js +++ b/examples/website/point-cloud/app.js @@ -1,4 +1,3 @@ -/* eslint-disable no-unused-vars */ import React, {useState, useEffect} from 'react'; import {render} from 'react-dom'; import DeckGL from '@deck.gl/react'; diff --git a/examples/website/tagmap/app.js b/examples/website/tagmap/app.js index 74af3ceb2b7..0694b1fda51 100644 --- a/examples/website/tagmap/app.js +++ b/examples/website/tagmap/app.js @@ -1,4 +1,3 @@ -/* eslint-disable max-len */ import React from 'react'; import {render} from 'react-dom'; import {StaticMap} from 'react-map-gl'; diff --git a/examples/website/tagmap/tagmap-layer/tagmap-layer.js b/examples/website/tagmap/tagmap-layer/tagmap-layer.js index 950b26268d0..21467ca885f 100644 --- a/examples/website/tagmap/tagmap-layer/tagmap-layer.js +++ b/examples/website/tagmap/tagmap-layer/tagmap-layer.js @@ -1,4 +1,3 @@ -/* eslint-disable max-len */ import {CompositeLayer} from '@deck.gl/core'; import {TextLayer} from '@deck.gl/layers'; import {scaleQuantile} from 'd3-scale'; diff --git a/examples/website/tagmap/tagmap-layer/tagmap-wrapper.js b/examples/website/tagmap/tagmap-layer/tagmap-wrapper.js index 2b7f40b94a6..09a46119d30 100644 --- a/examples/website/tagmap/tagmap-layer/tagmap-wrapper.js +++ b/examples/website/tagmap/tagmap-layer/tagmap-wrapper.js @@ -1,5 +1,4 @@ /* create a tagmap instance, set colorscheme, sizeMeasurer */ -/* eslint-disable max-len */ /* global document */ import TagMap from 'tagmap.js'; import RBush from 'rbush'; diff --git a/modules/aggregation-layers/src/cpu-grid-layer/grid-aggregator.js b/modules/aggregation-layers/src/cpu-grid-layer/grid-aggregator.js index 93f17f31169..428c6911ff3 100644 --- a/modules/aggregation-layers/src/cpu-grid-layer/grid-aggregator.js +++ b/modules/aggregation-layers/src/cpu-grid-layer/grid-aggregator.js @@ -57,7 +57,7 @@ export function pointToDensityGridDataCPU(props, aggregationParams) { * @param {function} getPosition - position accessor * @returns {object} - grid hash and cell dimension */ -/* eslint-disable max-statements, complexity */ +/* eslint-disable-next-line max-statements, complexity */ function pointsToGridHashing(props, aggregationParams) { const {data = [], cellSize} = props; const {attributes, viewport, projectPoints, numInstances} = aggregationParams; diff --git a/modules/aggregation-layers/src/index.ts b/modules/aggregation-layers/src/index.ts index 01a87c1c933..a231fe12b7f 100644 --- a/modules/aggregation-layers/src/index.ts +++ b/modules/aggregation-layers/src/index.ts @@ -17,7 +17,6 @@ // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN // THE SOFTWARE. -/* eslint-disable max-len */ export {default as ScreenGridLayer} from './screen-grid-layer/screen-grid-layer'; export {default as CPUGridLayer} from './cpu-grid-layer/cpu-grid-layer'; diff --git a/modules/aggregation-layers/src/utils/grid-aggregation-utils.js b/modules/aggregation-layers/src/utils/grid-aggregation-utils.js index 2c68665fe77..17e9ce4886f 100644 --- a/modules/aggregation-layers/src/utils/grid-aggregation-utils.js +++ b/modules/aggregation-layers/src/utils/grid-aggregation-utils.js @@ -6,7 +6,7 @@ function toFinite(n) { } // Parse input data to build positions, wights and bounding box. -/* eslint-disable max-statements */ +/* eslint-disable-next-line max-statements */ export function getBoundingBox(attributes, vertexCount) { // TODO - value might not exist (e.g. attribute transition) const positions = attributes.positions.value; diff --git a/modules/core/package.json b/modules/core/package.json index f3263ff87d9..bb6a899bcd6 100644 --- a/modules/core/package.json +++ b/modules/core/package.json @@ -37,8 +37,12 @@ "dependencies": { "@loaders.gl/core": "^3.2.10", "@loaders.gl/images": "^3.2.10", - "@luma.gl/constants": "9.0.0-alpha.9", - "@luma.gl/core": "9.0.0-alpha.9", + "@luma.gl/api": "9.0.0-alpha.8", + "@luma.gl/constants": "9.0.0-alpha.8", + "@luma.gl/core": "9.0.0-alpha.8", + "@luma.gl/gltools": "9.0.0-alpha.8", + "@luma.gl/shadertools": "9.0.0-alpha.8", + "@luma.gl/webgl": "9.0.0-alpha.8", "@math.gl/core": "^3.6.2", "@math.gl/sun": "^3.6.2", "@math.gl/web-mercator": "^3.6.2", diff --git a/modules/core/src/lib/attribute/attribute-manager.ts b/modules/core/src/lib/attribute/attribute-manager.ts index f545177216e..9ea1ac9e520 100644 --- a/modules/core/src/lib/attribute/attribute-manager.ts +++ b/modules/core/src/lib/attribute/attribute-manager.ts @@ -172,7 +172,8 @@ export default class AttributeManager { debug(TRACE_INVALIDATE, this, 'all'); } - // Ensure all attribute buffers are updated from props or data. + /** Ensure all attribute buffers are updated from props or data. */ + /* eslint-disable complexity */ update({ data, numInstances, diff --git a/modules/core/src/lib/composite-layer.ts b/modules/core/src/lib/composite-layer.ts index 49c0bfd6112..9f0e725c7df 100644 --- a/modules/core/src/lib/composite-layer.ts +++ b/modules/core/src/lib/composite-layer.ts @@ -151,8 +151,8 @@ export default abstract class CompositeLayer extends Layer< return accessor; } - // eslint-disable-next-line complexity /** Returns sub layer props for a specific sublayer */ + /* eslint-disable-next-line complexity */ protected getSubLayerProps( sublayerProps: { id?: string; diff --git a/modules/core/src/lib/deck-picker.ts b/modules/core/src/lib/deck-picker.ts index 42770a0a1a2..105a7aa3aa9 100644 --- a/modules/core/src/lib/deck-picker.ts +++ b/modules/core/src/lib/deck-picker.ts @@ -182,8 +182,8 @@ export default class DeckPicker { return pickableLayers.length ? pickableLayers : null; } - // eslint-disable-next-line max-statements,complexity /** Pick the closest object at the given coordinate */ + /* eslint-disable-next-line max-statements,complexity */ _pickClosestObject({ layers, views, diff --git a/modules/core/src/lib/deck.ts b/modules/core/src/lib/deck.ts index 78e1203e423..0d5a31228b7 100644 --- a/modules/core/src/lib/deck.ts +++ b/modules/core/src/lib/deck.ts @@ -737,14 +737,14 @@ export default class Deck { private _createAnimationLoop(props: DeckProps): AnimationLoop { const { - width, - height, + // width, + // height, gl, glOptions, debug, onError, - onBeforeRender, - onAfterRender, + // onBeforeRender, + // onAfterRender, useDevicePixels } = props; diff --git a/modules/core/src/lib/layer.ts b/modules/core/src/lib/layer.ts index 044c2d6327a..739752d2b3e 100644 --- a/modules/core/src/lib/layer.ts +++ b/modules/core/src/lib/layer.ts @@ -449,8 +449,8 @@ export default abstract class Layer extends Component>): void { const attributeManager = this.getAttributeManager(); const {dataChanged} = params.changeFlags; diff --git a/modules/core/src/shaderlib/shadow/shadow.ts b/modules/core/src/shaderlib/shadow/shadow.ts index 87b99138e84..8a54a643d2d 100644 --- a/modules/core/src/shaderlib/shadow/shadow.ts +++ b/modules/core/src/shaderlib/shadow/shadow.ts @@ -178,7 +178,7 @@ function getViewProjectionMatrices({ return projectionMatrices; } -/* eslint-disable camelcase */ +/* eslint-disable camelcase, complexity */ function createShadowUniforms( opts: ShadowModuleSettings, context: ProjectUniforms diff --git a/modules/core/src/viewports/viewport.ts b/modules/core/src/viewports/viewport.ts index 6a090e57c0f..96f865bdf97 100644 --- a/modules/core/src/viewports/viewport.ts +++ b/modules/core/src/viewports/viewport.ts @@ -178,6 +178,7 @@ export default class Viewport { private _frustumPlanes: {[name: string]: FrustumPlane} = {}; + /* eslint-disable complexity */ constructor(opts: ViewportOptions = {}) { // @ts-ignore this.id = opts.id || this.constructor.displayName || 'viewport'; diff --git a/modules/geo-layers/src/h3-layers/h3-cluster-layer.ts b/modules/geo-layers/src/h3-layers/h3-cluster-layer.ts index d0c51480128..2b5ee85fa12 100644 --- a/modules/geo-layers/src/h3-layers/h3-cluster-layer.ts +++ b/modules/geo-layers/src/h3-layers/h3-cluster-layer.ts @@ -1,7 +1,7 @@ import {h3SetToMultiPolygon, H3IndexInput} from 'h3-js'; import {AccessorFunction, createIterable, UpdateParameters, DefaultProps} from '@deck.gl/core'; -import {H3HexagonLayer} from '@deck.gl/geo-layers'; +import H3HexagonLayer from '../h3-layers/h3-hexagon-layer'; import GeoCellLayer, {GeoCellLayerProps} from '../geo-cell-layer/GeoCellLayer'; const defaultProps: DefaultProps = { diff --git a/modules/jupyter-widget/src/playground/create-deck.js b/modules/jupyter-widget/src/playground/create-deck.js index f63de637424..7084e51a71e 100644 --- a/modules/jupyter-widget/src/playground/create-deck.js +++ b/modules/jupyter-widget/src/playground/create-deck.js @@ -16,7 +16,7 @@ import {addSupportComponents} from '../lib/components/index'; import * as deck from '../deck-bundle'; const classesFilter = x => x.charAt(0) === x.charAt(0).toUpperCase(); -const functionsFilter = x => x.charAt(0) === x.charAt(0).toLowerCase() && x.charAt(0) != '_'; +const functionsFilter = x => x.charAt(0) === x.charAt(0).toLowerCase() && x.charAt(0) !== '_'; function extractElements(library = {}, filter) { // Extracts exported elements as a dictionary from a library diff --git a/modules/layers/src/geojson-layer/geojson.ts b/modules/layers/src/geojson-layer/geojson.ts index 2f31e9c5dbb..d4c69d07d01 100644 --- a/modules/layers/src/geojson-layer/geojson.ts +++ b/modules/layers/src/geojson-layer/geojson.ts @@ -94,7 +94,7 @@ export function separateGeojsonFeatures( if (!geometry) { // geometry can be null per specification - continue; + continue; // eslint-disable-line } if (geometry.type === 'GeometryCollection') { diff --git a/modules/layers/src/solid-polygon-layer/polygon.ts b/modules/layers/src/solid-polygon-layer/polygon.ts index 09d27ccad12..4aca59992eb 100644 --- a/modules/layers/src/solid-polygon-layer/polygon.ts +++ b/modules/layers/src/solid-polygon-layer/polygon.ts @@ -316,9 +316,10 @@ function permutePositions(positions: NumericArray, xIndex: number, yIndex: numbe } } -/* +/** * Get vertex indices for drawing polygon mesh (triangulation) */ +/* eslint-disable complexity, max-statements */ export function getSurfaceIndices( polygon: NormalizedPolygonGeometry, positionSize: number, diff --git a/modules/layers/src/text-layer/multi-icon-layer/multi-icon-layer.ts b/modules/layers/src/text-layer/multi-icon-layer/multi-icon-layer.ts index 7a7e7395ff3..e388d59b179 100644 --- a/modules/layers/src/text-layer/multi-icon-layer/multi-icon-layer.ts +++ b/modules/layers/src/text-layer/multi-icon-layer/multi-icon-layer.ts @@ -26,7 +26,6 @@ import fs from './multi-icon-layer-fragment.glsl'; import type {IconLayerProps} from '../../icon-layer/icon-layer'; import type {Accessor, Color, UpdateParameters, DefaultProps} from '@deck.gl/core'; -import {Character} from '../utils'; // TODO expose as layer properties const DEFAULT_BUFFER = 192.0 / 256; diff --git a/modules/main/bundle.ts b/modules/main/bundle.ts index 77ef878e7e3..281a7a048d2 100644 --- a/modules/main/bundle.ts +++ b/modules/main/bundle.ts @@ -1,3 +1,4 @@ +/* global window */ const deck = require('../core/bundle'); Object.assign( diff --git a/modules/mapbox/package.json b/modules/mapbox/package.json index 5126882eeda..ec4dd86c589 100644 --- a/modules/mapbox/package.json +++ b/modules/mapbox/package.json @@ -30,6 +30,7 @@ "prepublishOnly": "npm run build-bundle && npm run build-bundle -- --env.dev" }, "dependencies": { + "@math.gl/web-mercator": "^3.6.2", "@types/mapbox-gl": "^2.6.3" }, "peerDependencies": { diff --git a/modules/mapbox/src/resolve-layers.ts b/modules/mapbox/src/resolve-layers.ts index 43436365638..f662c5bb761 100644 --- a/modules/mapbox/src/resolve-layers.ts +++ b/modules/mapbox/src/resolve-layers.ts @@ -7,6 +7,7 @@ import type {Map} from 'mapbox-gl'; const UNDEFINED_BEFORE_ID = '__UNDEFINED__'; /** Insert Deck layers into the mapbox Map according to the user-defined order */ +/* eslint-disable complexity, max-statements */ export function resolveLayers( map?: Map, deck?: Deck, diff --git a/test/modules/core/effects/lighting-effect.spec.ts b/test/modules/core/effects/lighting-effect.spec.ts index b3429be4d9a..07ae864b2c2 100644 --- a/test/modules/core/effects/lighting-effect.spec.ts +++ b/test/modules/core/effects/lighting-effect.spec.ts @@ -1,5 +1,5 @@ import test from 'tape-promise/tape'; -import LightingEffect from '@deck.gl/core/effects/lighting/lighting-effect'; +import {LightingEffect} from '@deck.gl/core'; import {_CameraLight as CameraLight, DirectionalLight, PointLight} from '@deck.gl/core'; import {MapView, LayerManager} from '@deck.gl/core'; import {PolygonLayer} from '@deck.gl/layers'; diff --git a/test/modules/mapbox/mapbox-gl-mock/evented.js b/test/modules/mapbox/mapbox-gl-mock/evented.js index b48728aeb14..f32ebd08d4a 100644 --- a/test/modules/mapbox/mapbox-gl-mock/evented.js +++ b/test/modules/mapbox/mapbox-gl-mock/evented.js @@ -66,6 +66,7 @@ export class Evented { return this; } + /* eslint-disable complexity */ fire(event, properties) { // Compatibility with (type: string, properties: Object) signature from previous versions. // See https://github.com/mapbox/mapbox-gl-js/issues/6522,