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

@@ -11,7 +11,7 @@ describe('ol.VectorTile', function() {
it('loader sets features on the tile and updates proj units', function(done) {
// mock format that return a tile-pixels feature
var format = new TextFeature();
const format = new TextFeature();
format.readProjection = function(source) {
return new Projection({
code: '',
@@ -22,11 +22,11 @@ describe('ol.VectorTile', function() {
return [new Feature()];
};
var tile = new VectorTile([0, 0, 0], null, null, format);
var url = 'spec/ol/data/point.json';
const tile = new VectorTile([0, 0, 0], null, null, format);
const url = 'spec/ol/data/point.json';
defaultLoadFunction(tile, url);
var loader = tile.loader_;
const loader = tile.loader_;
_ol_events_.listen(tile, 'change', function(e) {
expect(tile.getFeatures().length).to.be.greaterThan(0);
expect(tile.getProjection().getUnits()).to.be('tile-pixels');