From cede8980877a5ba736291b352115f27941bb2ecc Mon Sep 17 00:00:00 2001 From: Vladimir Agafonkin Date: Mon, 26 Oct 2015 18:39:15 +0200 Subject: [PATCH] switch to eslint, update deps --- package.json | 16 +++++++++++++--- src/HeatLayer.js | 8 ++------ 2 files changed, 15 insertions(+), 9 deletions(-) diff --git a/package.json b/package.json index 7b30dbe..372d687 100644 --- a/package.json +++ b/package.json @@ -18,13 +18,23 @@ }, "main": "dist/leaflet-heat.js", "devDependencies": { + "eslint": "^1.7.3", + "eslint-config-mourner": "^1.0.1", "simpleheat": "~0.2.0", - "uglify-js": "~2.4.15" + "uglify-js": "^2.5.0" + }, + "eslintConfig": { + "extends": "mourner", + "globals": { + "L": false, + "simpleheat": false + } }, "scripts": { - "test": "jshint src", - "prepublish": "uglifyjs node_modules/simpleheat/simpleheat.js src/HeatLayer.js -c -m --comments /Vladimir/ -o dist/leaflet-heat.js" + "test": "eslint src", + "prepublish": "uglifyjs node_modules/simpleheat/simpleheat.js src/HeatLayer.js -c -m -o dist/leaflet-heat.js" }, + "license": "BSD-2-Clause", "jshintConfig": { "quotmark": "single", "globals": { diff --git a/src/HeatLayer.js b/src/HeatLayer.js index d391502..455df17 100644 --- a/src/HeatLayer.js +++ b/src/HeatLayer.js @@ -1,8 +1,4 @@ -/* - (c) 2014, Vladimir Agafonkin - Leaflet.heat, a tiny and fast heatmap plugin for Leaflet. - https://github.com/Leaflet/Leaflet.heat -*/ +'use strict'; L.HeatLayer = (L.Layer ? L.Layer : L.Class).extend({ @@ -193,7 +189,7 @@ L.HeatLayer = (L.Layer ? L.Layer : L.Class).extend({ offset = this._map._getCenterOffset(e.center)._multiplyBy(-scale).subtract(this._map._getMapPanePos()); if (L.DomUtil.setTransform) { - L.DomUtil.setTransform(this._canvas, offset, scale); + L.DomUtil.setTransform(this._canvas, offset, scale); } else { this._canvas.style[L.DomUtil.TRANSFORM] = L.DomUtil.getTranslateString(offset) + ' scale(' + scale + ')';