Make code prettier

This updates ESLint and our shared eslint-config-openlayers to use Prettier.  Most formatting changes were automatically applied with this:

    npm run lint -- --fix

A few manual changes were required:

 * In `examples/offscreen-canvas.js`, the `//eslint-disable-line` comment needed to be moved to the appropriate line to disable the error about the `'worker-loader!./offscreen-canvas.worker.js'` import.
 * In `examples/webpack/exapmle-builder.js`, spaces could not be added after a couple `function`s for some reason.  While editing this, I reworked `ExampleBuilder` to be a class.
 * In `src/ol/format/WMSGetFeatureInfo.js`, the `// @ts-ignore` comment needed to be moved down one line so it applied to the `parsersNS` argument.
This commit is contained in:
Tim Schaub
2020-04-06 12:25:12 -06:00
parent 53b48baf62
commit 054af09032
790 changed files with 46833 additions and 33765 deletions
+10 -26
View File
@@ -2,7 +2,6 @@
* @module ol/webgl
*/
/**
* Constants taken from goog.webgl
*/
@@ -17,7 +16,6 @@
*/
export const ARRAY_BUFFER = 0x8892;
/**
* Used by {@link module:ol/webgl/Helper~WebGLHelper} for buffers containing indices data.
* Index buffers are essentially lists of references to vertices defined in a vertex buffer
@@ -28,6 +26,13 @@ export const ARRAY_BUFFER = 0x8892;
*/
export const ELEMENT_ARRAY_BUFFER = 0x8893;
/**
* Used by {link module:ol/webgl/Buffer~WebGLArrayBuffer}.
* @const
* @type {number}
* @api
*/
export const STREAM_DRAW = 0x88e0;
/**
* Used by {link module:ol/webgl/Buffer~WebGLArrayBuffer}.
@@ -35,8 +40,7 @@ export const ELEMENT_ARRAY_BUFFER = 0x8893;
* @type {number}
* @api
*/
export const STREAM_DRAW = 0x88E0;
export const STATIC_DRAW = 0x88e4;
/**
* Used by {link module:ol/webgl/Buffer~WebGLArrayBuffer}.
@@ -44,17 +48,7 @@ export const STREAM_DRAW = 0x88E0;
* @type {number}
* @api
*/
export const STATIC_DRAW = 0x88E4;
/**
* Used by {link module:ol/webgl/Buffer~WebGLArrayBuffer}.
* @const
* @type {number}
* @api
*/
export const DYNAMIC_DRAW = 0x88E8;
export const DYNAMIC_DRAW = 0x88e8;
/**
* @const
@@ -62,21 +56,18 @@ export const DYNAMIC_DRAW = 0x88E8;
*/
export const UNSIGNED_BYTE = 0x1401;
/**
* @const
* @type {number}
*/
export const UNSIGNED_SHORT = 0x1403;
/**
* @const
* @type {number}
*/
export const UNSIGNED_INT = 0x1405;
/**
* @const
* @type {number}
@@ -86,18 +77,11 @@ export const FLOAT = 0x1406;
/** end of goog.webgl constants
*/
/**
* @const
* @type {Array<string>}
*/
const CONTEXT_IDS = [
'experimental-webgl',
'webgl',
'webkit-3d',
'moz-webgl'
];
const CONTEXT_IDS = ['experimental-webgl', 'webgl', 'webkit-3d', 'moz-webgl'];
/**
* @param {HTMLCanvasElement} canvas Canvas.