Update ESLint config and plugins

This commit is contained in:
Tim Schaub
2022-05-23 15:01:07 -06:00
parent f1fc38ce33
commit bbbca0ab78
11 changed files with 205 additions and 270 deletions

View File

@@ -365,12 +365,12 @@ class WkbReader {
class WkbWriter {
/**
* @type {object}
* @type {Object}
* @property {string} [layout] geometryLayout
* @property {boolean} [littleEndian=true] littleEndian
* @property {boolean} [ewkb=true] Whether writes in EWKB format
* @property {object} [nodata] NoData value for each axes
* @param {object} opts options
* @property {Object} [nodata] NoData value for each axes
* @param {Object} opts options
*/
constructor(opts) {
opts = opts || {};
@@ -385,7 +385,7 @@ class WkbWriter {
this.writeQueue_ = [];
/**
* @type {object}
* @type {Object}
* @property {number} X NoData value for X
* @property {number} Y NoData value for Y
* @property {number} Z NoData value for Z
@@ -421,7 +421,7 @@ class WkbWriter {
*/
writePoint(coords, layout) {
/**
* @type {object}
* @type {Object}
* @property {number} X NoData value for X
* @property {number} Y NoData value for Y
* @property {number} [Z] NoData value for Z

View File

@@ -1189,8 +1189,8 @@ class Executor {
}
++i;
break;
default:
++i; // consume the instruction anyway, to avoid an infinite loop
default: // consume the instruction anyway, to avoid an infinite loop
++i;
break;
}
}

View File

@@ -198,7 +198,7 @@ export function calculateSourceExtentResolution(
* @param {Array<ImageExtent>} sources Array of sources.
* @param {number} gutter Gutter of the sources.
* @param {boolean} [opt_renderEdges] Render reprojection edges.
* @param {object} [opt_interpolate] Use linear interpolation when resampling.
* @param {Object} [opt_interpolate] Use linear interpolation when resampling.
* @return {HTMLCanvasElement} Canvas with reprojected data.
*/
export function render(

View File

@@ -184,7 +184,7 @@ function getImagesForTIFF(tiff) {
/**
* @param {SourceInfo} source The GeoTIFF source.
* @param {object} options Options for the GeoTIFF source.
* @param {Object} options Options for the GeoTIFF source.
* @return {Promise<Array<GeoTIFFImage>>} Resolves to a list of images.
*/
function getImagesForSource(source, options) {
@@ -345,7 +345,7 @@ class GeoTIFFSource extends DataTile {
const numSources = this.sourceInfo_.length;
/**
* @type {object}
* @type {Object}
* @private
*/
this.sourceOptions_ = options.sourceOptions;

View File

@@ -424,8 +424,8 @@ class ImageWMS extends ImageSource {
case WMSServerType.QGIS:
params['DPI'] = 90 * pixelRatio;
break;
default:
assert(false, 8); // Unknown `serverType` configured
default: // Unknown `serverType` configured
assert(false, 8);
break;
}
}

View File

@@ -355,8 +355,8 @@ class TileWMS extends TileImage {
case WMSServerType.QGIS:
params['DPI'] = 90 * pixelRatio;
break;
default:
assert(false, 52); // Unknown `serverType` configured
default: // Unknown `serverType` configured
assert(false, 52);
break;
}
}

View File

@@ -180,8 +180,8 @@ class Zoomify extends TileImage {
height >>= 1;
}
break;
default:
assert(false, 53); // Unknown `tierSizeCalculation` configured
default: // Unknown `tierSizeCalculation` configured
assert(false, 53);
break;
}

View File

@@ -37,8 +37,7 @@ import {assert} from '../asserts.js';
* 1. The pixel coordinates of the geometry in GeoJSON notation.
* 2. The {@link module:ol/render~State} of the layer renderer.
*
* @typedef {function((import("../coordinate.js").Coordinate|Array<import("../coordinate.js").Coordinate>|Array<Array<import("../coordinate.js").Coordinate>>),import("../render.js").State): void}
* RenderFunction
* @typedef {function((import("../coordinate.js").Coordinate|Array<import("../coordinate.js").Coordinate>|Array<Array<import("../coordinate.js").Coordinate>>),import("../render.js").State): void} RenderFunction
*/
/**