diff --git a/.travis.yml b/.travis.yml index 0ef616f7..5dba0dab 100644 --- a/.travis.yml +++ b/.travis.yml @@ -10,8 +10,6 @@ branches: only: - master - stable -before_install: - - "npm install -g istanbul" script: - "npm run test-ci" after_script: diff --git a/i18n.js b/i18n.js index 0870cac9..5606c46f 100644 --- a/i18n.js +++ b/i18n.js @@ -912,7 +912,9 @@ module.exports = (function() { // this will implicitly write/sync missing keys // to the rest of locales for (var l in locales) { - translate(l, singular, plural, true); + if ({}.hasOwnProperty.call(locales, l)) { + translate(l, singular, plural, true); + } } }; diff --git a/package.json b/package.json index e9a676e7..7276eb78 100644 --- a/package.json +++ b/package.json @@ -28,8 +28,9 @@ "devDependencies": { "async": "*", "cookie-parser": "^1.4.1", + "eslint": "2.13.*", "express": "^4.13.4", - "jshint": "*", + "istanbul": "0.4.*", "mocha": "*", "should": "*", "sinon": "*", @@ -40,9 +41,9 @@ "node": ">=0.10.0" }, "scripts": { - "jshint": "jshint --verbose .", - "test": "npm run jshint && make test", - "test-ci": "npm run jshint && istanbul cover ./node_modules/mocha/bin/_mocha" + "lint": "eslint .", + "test": "npm run lint && make test", + "test-ci": "npm run lint && istanbul cover ./node_modules/mocha/bin/_mocha" }, "license": "MIT" }