From e14de7c6598f79d52c9b62dc5df47704bbaa3a58 Mon Sep 17 00:00:00 2001 From: Matt Simerson Date: Thu, 6 Oct 2016 18:20:16 -0700 Subject: [PATCH] add missing badge url * update code for config settings --- .eslintrc | 7 ++++--- README.md | 3 ++- index.js | 4 ++-- package.json | 2 +- 4 files changed, 9 insertions(+), 7 deletions(-) diff --git a/.eslintrc b/.eslintrc index 8675677..ec53b1c 100644 --- a/.eslintrc +++ b/.eslintrc @@ -8,9 +8,10 @@ "one-var": [2, "never"], "no-trailing-spaces": [2, { "skipBlankLines": false }], "keyword-spacing": [2, { - "after": true, - "overrides": {}, - }], + "overrides": { }, + "before": true, + "after": true + }], "no-delete-var": 2, "no-label-var": 2, "no-shadow": 2, diff --git a/README.md b/README.md index 302cfb2..01d363b 100644 --- a/README.md +++ b/README.md @@ -115,4 +115,5 @@ Databases: http://geolite.maxmind.com/download/geoip/database [cov-url]: https://codecov.io/github/haraka/haraka-plugin-geoip [clim-img]: https://codeclimate.com/github/haraka/haraka-plugin-geoip/badges/gpa.svg [clim-url]: https://codeclimate.com/github/haraka/haraka-plugin-geoip -[npm-img]: https://nodei.co/npm/haraka-plugin-geoip.png \ No newline at end of file +[npm-img]: https://nodei.co/npm/haraka-plugin-geoip.png +[npm-url]: https://www.npmjs.com/package/haraka-plugin-geoip diff --git a/index.js b/index.js index 719b553..14b2429 100644 --- a/index.js +++ b/index.js @@ -113,11 +113,11 @@ exports.lookup_maxmind = function (next, connection) { } if (loc.city && loc.city !== '--') { connection.results.add(plugin, {city: loc.city}); - if (plugin.cfg.main.show_city) show.push(loc.city); + if (plugin.cfg.show.city) show.push(loc.city); } if (loc.region && loc.region !== '--') { connection.results.add(plugin, {region: loc.region}); - if (plugin.cfg.main.show_region) show.push(loc.region); + if (plugin.cfg.show.region) show.push(loc.region); } if (loc.latitude) { connection.results.add(plugin, {ll: [loc.latitude, loc.longitude]}); diff --git a/package.json b/package.json index 2547ea5..398fe9b 100644 --- a/package.json +++ b/package.json @@ -8,7 +8,7 @@ }, "scripts": { "test": "./run_tests", - "lint": "eslint index.js", + "lint": "./node_modules/.bin/eslint index.js test/*.js", "coverage": "./node_modules/.bin/istanbul cover ./run_tests" }, "repository": {