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:
+17
-17
@@ -1,17 +1,17 @@
|
||||
import Feature from '../src/ol/Feature.js';
|
||||
import Map from '../src/ol/Map.js';
|
||||
import View from '../src/ol/View.js';
|
||||
import {circular as circularPolygon} from '../src/ol/geom/Polygon.js';
|
||||
import {Tile as TileLayer, Vector as VectorLayer} from '../src/ol/layer.js';
|
||||
import TileWMS from '../src/ol/source/TileWMS.js';
|
||||
import VectorSource from '../src/ol/source/Vector.js';
|
||||
import View from '../src/ol/View.js';
|
||||
import {Tile as TileLayer, Vector as VectorLayer} from '../src/ol/layer.js';
|
||||
import {circular as circularPolygon} from '../src/ol/geom/Polygon.js';
|
||||
|
||||
const vectorLayer4326 = new VectorLayer({
|
||||
source: new VectorSource()
|
||||
source: new VectorSource(),
|
||||
});
|
||||
|
||||
const vectorLayer3857 = new VectorLayer({
|
||||
source: new VectorSource()
|
||||
source: new VectorSource(),
|
||||
});
|
||||
|
||||
const map4326 = new Map({
|
||||
@@ -21,18 +21,18 @@ const map4326 = new Map({
|
||||
url: 'https://ahocevar.com/geoserver/wms',
|
||||
params: {
|
||||
'LAYERS': 'ne:NE1_HR_LC_SR_W_DR',
|
||||
'TILED': true
|
||||
}
|
||||
})
|
||||
'TILED': true,
|
||||
},
|
||||
}),
|
||||
}),
|
||||
vectorLayer4326
|
||||
vectorLayer4326,
|
||||
],
|
||||
target: 'map4326',
|
||||
view: new View({
|
||||
projection: 'EPSG:4326',
|
||||
center: [0, 0],
|
||||
zoom: 2
|
||||
})
|
||||
zoom: 2,
|
||||
}),
|
||||
});
|
||||
|
||||
const map3857 = new Map({
|
||||
@@ -42,17 +42,17 @@ const map3857 = new Map({
|
||||
url: 'https://ahocevar.com/geoserver/wms',
|
||||
params: {
|
||||
'LAYERS': 'ne:NE1_HR_LC_SR_W_DR',
|
||||
'TILED': true
|
||||
}
|
||||
})
|
||||
'TILED': true,
|
||||
},
|
||||
}),
|
||||
}),
|
||||
vectorLayer3857
|
||||
vectorLayer3857,
|
||||
],
|
||||
target: 'map3857',
|
||||
view: new View({
|
||||
center: [0, 0],
|
||||
zoom: 2
|
||||
})
|
||||
zoom: 2,
|
||||
}),
|
||||
});
|
||||
|
||||
const radius = 800000;
|
||||
|
||||
Reference in New Issue
Block a user