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 -3
View File
@@ -2,7 +2,7 @@
* @module ol/RotationConstraint
*/
import {toRadians} from './math.js';
var RotationConstraint = {};
const RotationConstraint = {};
/**
@@ -38,7 +38,7 @@ RotationConstraint.none = function(rotation, delta) {
* @return {ol.RotationConstraintType} Rotation constraint.
*/
RotationConstraint.createSnapToN = function(n) {
var theta = 2 * Math.PI / n;
const theta = 2 * Math.PI / n;
return (
/**
* @param {number|undefined} rotation Rotation.
@@ -61,7 +61,7 @@ RotationConstraint.createSnapToN = function(n) {
* @return {ol.RotationConstraintType} Rotation constraint.
*/
RotationConstraint.createSnapToZero = function(opt_tolerance) {
var tolerance = opt_tolerance || toRadians(5);
const tolerance = opt_tolerance || toRadians(5);
return (
/**
* @param {number|undefined} rotation Rotation.