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,10 +1,8 @@
|
||||
import {memoizeOne} from '../../../src/ol/functions.js';
|
||||
|
||||
|
||||
describe('ol/functions', function() {
|
||||
|
||||
describe('memoizeOne()', function() {
|
||||
it('returns the result from the first call when called a second time with the same args', function() {
|
||||
describe('ol/functions', function () {
|
||||
describe('memoizeOne()', function () {
|
||||
it('returns the result from the first call when called a second time with the same args', function () {
|
||||
const arg1 = {};
|
||||
const arg2 = {};
|
||||
const arg3 = {};
|
||||
@@ -16,7 +14,7 @@ describe('ol/functions', function() {
|
||||
expect(memoized(arg1, arg2, arg3)).to.be(result);
|
||||
});
|
||||
|
||||
it('returns the result from the first call when called a second time with the same this object', function() {
|
||||
it('returns the result from the first call when called a second time with the same this object', function () {
|
||||
const arg1 = {};
|
||||
const arg2 = {};
|
||||
const arg3 = {};
|
||||
@@ -31,7 +29,7 @@ describe('ol/functions', function() {
|
||||
expect(memoized.call(thisObj, arg1, arg2, arg3)).to.be(result);
|
||||
});
|
||||
|
||||
it('returns a different result when called a second time with the different args', function() {
|
||||
it('returns a different result when called a second time with the different args', function () {
|
||||
const arg1 = {};
|
||||
const arg2 = {};
|
||||
const arg3 = {};
|
||||
@@ -43,7 +41,7 @@ describe('ol/functions', function() {
|
||||
expect(memoized(arg3, arg2, arg1)).not.to.be(result);
|
||||
});
|
||||
|
||||
it('returns a different result when called a second time with a different this object', function() {
|
||||
it('returns a different result when called a second time with a different this object', function () {
|
||||
const arg1 = {};
|
||||
const arg2 = {};
|
||||
const arg3 = {};
|
||||
@@ -57,5 +55,4 @@ describe('ol/functions', function() {
|
||||
expect(memoized.call(secondThis, arg1, arg2, arg3)).not.to.be(result);
|
||||
});
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user