Use blocked scoped variables

In addition to using const and let, this also upgrades our linter config and removes lint (mostly whitespace).
This commit is contained in:
Tim Schaub
2018-01-11 23:32:36 -07:00
parent 0bf2b04dee
commit ad62739a6e
684 changed files with 18120 additions and 18184 deletions

View File

@@ -4,27 +4,27 @@ import * as transforms from '../../../../src/ol/proj/transforms.js';
describe('transforms.remove()', function() {
var extent = [180, -90, 180, 90];
var units = 'degrees';
const extent = [180, -90, 180, 90];
const units = 'degrees';
it('removes functions cached by transforms.add()', function() {
var foo = new Projection({
const foo = new Projection({
code: 'foo',
units: units,
extent: extent
});
var bar = new Projection({
const bar = new Projection({
code: 'bar',
units: units,
extent: extent
});
var transform = function(input, output, dimension) {
const transform = function(input, output, dimension) {
return input;
};
transforms.add(foo, bar, transform);
expect(transforms.get('foo', 'bar')).to.be(transform);
var removed = transforms.remove(foo, bar);
const removed = transforms.remove(foo, bar);
expect(removed).to.be(transform);
expect(transforms.get('foo', 'bar')).to.be(undefined);
});