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
+6 -6
View File
@@ -5,14 +5,14 @@ describe('ol.geom.flat.deflate', function() {
describe('ol.geom.flat.deflate.coordinates', function() {
var flatCoordinates;
let flatCoordinates;
beforeEach(function() {
flatCoordinates = [];
});
it('flattens coordinates', function() {
var offset = _ol_geom_flat_deflate_.coordinates(
flatCoordinates, 0, [[1, 2], [3, 4]], 2);
const offset = _ol_geom_flat_deflate_.coordinates(
flatCoordinates, 0, [[1, 2], [3, 4]], 2);
expect(offset).to.be(4);
expect(flatCoordinates).to.eql([1, 2, 3, 4]);
});
@@ -21,14 +21,14 @@ describe('ol.geom.flat.deflate', function() {
describe('ol.geom.flat.deflate.coordinatess', function() {
var flatCoordinates;
let flatCoordinates;
beforeEach(function() {
flatCoordinates = [];
});
it('flattens arrays of coordinates', function() {
var ends = _ol_geom_flat_deflate_.coordinatess(flatCoordinates, 0,
[[[1, 2], [3, 4]], [[5, 6], [7, 8]]], 2);
const ends = _ol_geom_flat_deflate_.coordinatess(flatCoordinates, 0,
[[[1, 2], [3, 4]], [[5, 6], [7, 8]]], 2);
expect(ends).to.eql([4, 8]);
expect(flatCoordinates).to.eql([1, 2, 3, 4, 5, 6, 7, 8]);
});