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:
@@ -1,16 +1,15 @@
|
||||
import Map from '../src/ol/Map.js';
|
||||
import View from '../src/ol/View.js';
|
||||
import ImageLayer from '../src/ol/layer/Image.js';
|
||||
import ImageMapGuide from '../src/ol/source/ImageMapGuide.js';
|
||||
import Map from '../src/ol/Map.js';
|
||||
import View from '../src/ol/View.js';
|
||||
|
||||
const mdf = 'Library://Samples/Sheboygan/Maps/Sheboygan.MapDefinition';
|
||||
const agentUrl =
|
||||
'http://138.197.230.93:8008/mapguide/mapagent/mapagent.fcgi?';
|
||||
const agentUrl = 'http://138.197.230.93:8008/mapguide/mapagent/mapagent.fcgi?';
|
||||
const bounds = [
|
||||
-87.865114442365922,
|
||||
43.665065564837931,
|
||||
-87.595394059497067,
|
||||
43.823852564430069
|
||||
43.823852564430069,
|
||||
];
|
||||
const map = new Map({
|
||||
layers: [
|
||||
@@ -26,16 +25,16 @@ const map = new Map({
|
||||
FORMAT: 'PNG',
|
||||
VERSION: '3.0.0',
|
||||
USERNAME: 'OLGuest',
|
||||
PASSWORD: 'olguest'
|
||||
PASSWORD: 'olguest',
|
||||
},
|
||||
ratio: 2
|
||||
})
|
||||
})
|
||||
ratio: 2,
|
||||
}),
|
||||
}),
|
||||
],
|
||||
target: 'map',
|
||||
view: new View({
|
||||
center: [-87.7302542509315, 43.744459064634],
|
||||
projection: 'EPSG:4326',
|
||||
zoom: 12
|
||||
})
|
||||
zoom: 12,
|
||||
}),
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user