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
+18 -12
View File
@@ -1,13 +1,15 @@
import Map from '../src/ol/Map.js';
import View from '../src/ol/View.js';
import {ScaleLine} from '../src/ol/control.js';
import OSM from '../src/ol/source/OSM.js';
import TileLayer from '../src/ol/layer/Tile.js';
import View from '../src/ol/View.js';
import proj4 from 'proj4';
import {ScaleLine} from '../src/ol/control.js';
import {fromLonLat, transformExtent} from '../src/ol/proj.js';
import {register} from '../src/ol/proj/proj4.js';
import OSM from '../src/ol/source/OSM.js';
import proj4 from 'proj4';
proj4.defs('Indiana-East', 'PROJCS["IN83-EF",GEOGCS["LL83",DATUM["NAD83",' +
proj4.defs(
'Indiana-East',
'PROJCS["IN83-EF",GEOGCS["LL83",DATUM["NAD83",' +
'SPHEROID["GRS1980",6378137.000,298.25722210]],PRIMEM["Greenwich",0],' +
'UNIT["Degree",0.017453292519943295]],PROJECTION["Transverse_Mercator"],' +
'PARAMETER["false_easting",328083.333],' +
@@ -15,24 +17,28 @@ proj4.defs('Indiana-East', 'PROJCS["IN83-EF",GEOGCS["LL83",DATUM["NAD83",' +
'PARAMETER["scale_factor",0.999966666667],' +
'PARAMETER["central_meridian",-85.66666666666670],' +
'PARAMETER["latitude_of_origin",37.50000000000000],' +
'UNIT["Foot_US",0.30480060960122]]');
'UNIT["Foot_US",0.30480060960122]]'
);
register(proj4);
const map = new Map({
layers: [
new TileLayer({
source: new OSM()
})
source: new OSM(),
}),
],
target: 'map',
view: new View({
projection: 'Indiana-East',
center: fromLonLat([-85.685, 39.891], 'Indiana-East'),
zoom: 7,
extent: transformExtent([-172.54, 23.81, -47.74, 86.46],
'EPSG:4326', 'Indiana-East'),
minZoom: 6
})
extent: transformExtent(
[-172.54, 23.81, -47.74, 86.46],
'EPSG:4326',
'Indiana-East'
),
minZoom: 6,
}),
});
map.addControl(new ScaleLine({units: 'us'}));