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,24 +1,24 @@
|
||||
import {VOID} from '../../../../src/ol/functions.js';
|
||||
import {listen} from '../../../../src/ol/events.js';
|
||||
import {shared as iconImageCache} from '../../../../src/ol/style/IconImageCache.js';
|
||||
import IconImage from '../../../../src/ol/style/IconImage.js';
|
||||
import {VOID} from '../../../../src/ol/functions.js';
|
||||
import {shared as iconImageCache} from '../../../../src/ol/style/IconImageCache.js';
|
||||
import {listen} from '../../../../src/ol/events.js';
|
||||
|
||||
describe('ol.style.IconImageCache', function() {
|
||||
describe('ol.style.IconImageCache', function () {
|
||||
let originalMaxCacheSize;
|
||||
|
||||
beforeEach(function() {
|
||||
beforeEach(function () {
|
||||
iconImageCache.clear();
|
||||
originalMaxCacheSize = iconImageCache.maxCacheSize;
|
||||
iconImageCache.maxCacheSize_ = 4;
|
||||
});
|
||||
|
||||
afterEach(function() {
|
||||
afterEach(function () {
|
||||
iconImageCache.maxCacheSize_ = originalMaxCacheSize;
|
||||
iconImageCache.clear();
|
||||
});
|
||||
|
||||
describe('#expire', function() {
|
||||
it('expires images when expected', function() {
|
||||
describe('#expire', function () {
|
||||
it('expires images when expected', function () {
|
||||
let i, src, iconImage;
|
||||
|
||||
for (i = 0; i < 4; ++i) {
|
||||
@@ -59,8 +59,8 @@ describe('ol.style.IconImageCache', function() {
|
||||
});
|
||||
});
|
||||
|
||||
describe('#setSize', function() {
|
||||
it('sets max cache size and expires cache', function() {
|
||||
describe('#setSize', function () {
|
||||
it('sets max cache size and expires cache', function () {
|
||||
let i, src, iconImage;
|
||||
|
||||
for (i = 0; i < 3; ++i) {
|
||||
|
||||
Reference in New Issue
Block a user