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
+8 -8
View File
@@ -4,15 +4,15 @@ import View from '../../../src/ol/View.js';
describe('ol.Overlay', function() {
var target, map;
let target, map;
var width = 360;
var height = 180;
const width = 360;
const height = 180;
beforeEach(function() {
target = document.createElement('div');
var style = target.style;
const style = target.style;
style.position = 'absolute';
style.left = '-1000px';
style.top = '-1000px';
@@ -38,12 +38,12 @@ describe('ol.Overlay', function() {
describe('constructor', function() {
it('can be constructed with minimal arguments', function() {
var instance = new Overlay({});
const instance = new Overlay({});
expect(instance).to.be.an(Overlay);
});
it('can be constructed with className', function() {
var instance = new Overlay({className: 'my-class'});
const instance = new Overlay({className: 'my-class'});
expect(instance).to.be.an(Overlay);
expect(instance.element.className).to.be('my-class');
});
@@ -51,7 +51,7 @@ describe('ol.Overlay', function() {
});
describe('#getId()', function() {
var overlay, target;
let overlay, target;
beforeEach(function() {
target = document.createElement('div');
@@ -80,7 +80,7 @@ describe('ol.Overlay', function() {
});
describe('#setVisible()', function() {
var overlay, target;
let overlay, target;
beforeEach(function() {
target = document.createElement('div');