From 140ea48d5c80ed2ab7cf23e52a8e4a6b8b1cc70e Mon Sep 17 00:00:00 2001 From: Jonny Barnes Date: Tue, 14 Jun 2016 16:16:07 +0100 Subject: [PATCH 01/11] Configure eslint --- .eslintrc.yml | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 .eslintrc.yml diff --git a/.eslintrc.yml b/.eslintrc.yml new file mode 100644 index 00000000..2584354c --- /dev/null +++ b/.eslintrc.yml @@ -0,0 +1,21 @@ +env: + browser: true +extends: 'eslint:recommended' +rules: + indent: + - error + - 4 + linebreak-style: + - error + - unix + quotes: + - error + - single + semi: + - error + - always + no-console: + - error + - allow: + - warn + - error From 64115284c033cd4d54cf50218b54a5f52c8cdd4b Mon Sep 17 00:00:00 2001 From: Jonny Barnes Date: Tue, 14 Jun 2016 16:16:31 +0100 Subject: [PATCH 02/11] Get rid of the easy eslint errors in newnote.js --- public/assets/js/newnote.js | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/public/assets/js/newnote.js b/public/assets/js/newnote.js index 2a26b261..86903cc4 100644 --- a/public/assets/js/newnote.js +++ b/public/assets/js/newnote.js @@ -39,7 +39,7 @@ function addPlaces(latitude, longitude) { addMap(latitude, longitude); } }).catch(function (err) { - console.log(err); + console.error(err); }); } @@ -57,11 +57,11 @@ function addMap(latitude, longitude, places) { var map = L.mapbox.map('map', 'jonnybarnes.gnoihnim') .setView([latitude, longitude], 15) .addLayer(L.mapbox.tileLayer('jonnybarnes.gnoihnim', { - detectRetina: true, + detectRetina: true })); //add a marker for the current location var marker = L.marker([latitude, longitude], { - draggable: true, + draggable: true }).addTo(map); //when the location marker is dragged, if the new place form elements exist //update the lat/lng values @@ -87,7 +87,7 @@ function addMap(latitude, longitude, places) { form.insertBefore(selectEl, div); if (places !== null) { //add the places both to the map and