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
+3 -4
View File
@@ -1,7 +1,7 @@
/**
* @module ol/geom/flat/reverse
*/
var _ol_geom_flat_reverse_ = {};
const _ol_geom_flat_reverse_ = {};
/**
@@ -12,9 +12,8 @@ var _ol_geom_flat_reverse_ = {};
*/
_ol_geom_flat_reverse_.coordinates = function(flatCoordinates, offset, end, stride) {
while (offset < end - stride) {
var i;
for (i = 0; i < stride; ++i) {
var tmp = flatCoordinates[offset + i];
for (let i = 0; i < stride; ++i) {
const tmp = flatCoordinates[offset + i];
flatCoordinates[offset + i] = flatCoordinates[end - stride + i];
flatCoordinates[end - stride + i] = tmp;
}