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
+5 -5
View File
@@ -21,21 +21,21 @@ import Zoom from './control/Zoom.js';
*/
export function defaults(opt_options) {
var options = opt_options ? opt_options : {};
const options = opt_options ? opt_options : {};
var controls = new Collection();
const controls = new Collection();
var zoomControl = options.zoom !== undefined ? options.zoom : true;
const zoomControl = options.zoom !== undefined ? options.zoom : true;
if (zoomControl) {
controls.push(new Zoom(options.zoomOptions));
}
var rotateControl = options.rotate !== undefined ? options.rotate : true;
const rotateControl = options.rotate !== undefined ? options.rotate : true;
if (rotateControl) {
controls.push(new Rotate(options.rotateOptions));
}
var attributionControl = options.attribution !== undefined ?
const attributionControl = options.attribution !== undefined ?
options.attribution : true;
if (attributionControl) {
controls.push(new Attribution(options.attributionOptions));