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:
@@ -2,9 +2,8 @@
|
||||
* @module ol/interaction/Interaction
|
||||
*/
|
||||
import BaseObject from '../Object.js';
|
||||
import {easeOut, linear} from '../easing.js';
|
||||
import InteractionProperty from './Property.js';
|
||||
|
||||
import {easeOut, linear} from '../easing.js';
|
||||
|
||||
/**
|
||||
* Object literal with config options for interactions.
|
||||
@@ -17,7 +16,6 @@ import InteractionProperty from './Property.js';
|
||||
* are traversed in reverse order of the interactions collection of the map.
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* @classdesc
|
||||
* Abstract base class; normally only used for creating subclasses and not
|
||||
@@ -101,7 +99,6 @@ class Interaction extends BaseObject {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param {import("../View.js").default} view View.
|
||||
* @param {import("../coordinate.js").Coordinate} delta Delta.
|
||||
@@ -114,7 +111,7 @@ export function pan(view, delta, opt_duration) {
|
||||
view.animateInternal({
|
||||
duration: opt_duration !== undefined ? opt_duration : 250,
|
||||
easing: linear,
|
||||
center: view.getConstrainedCenter(center)
|
||||
center: view.getConstrainedCenter(center),
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -142,7 +139,7 @@ export function zoomByDelta(view, delta, opt_anchor, opt_duration) {
|
||||
resolution: newResolution,
|
||||
anchor: opt_anchor,
|
||||
duration: opt_duration !== undefined ? opt_duration : 250,
|
||||
easing: easeOut
|
||||
easing: easeOut,
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user