Lint modules directory

This commit is contained in:
Kushan Joshi
2016-06-14 18:50:56 +05:30
parent 9e03edc493
commit 092e7be197
5 changed files with 11 additions and 5 deletions
+1 -2
View File
@@ -4,11 +4,11 @@
"dot-notation": 2,
"eqeqeq": [2, "smart"],
"indent": [0, 4],
"keyword-spacing": 2,
"linebreak-style": [2, "unix"],
"no-caller": 2,
"no-catch-shadow": 2,
"no-div-regex": 2,
"no-empty-label": 2,
"no-extend-native": 2,
"no-extra-bind": 2,
"no-floating-decimal": 2,
@@ -45,7 +45,6 @@
"no-use-before-define": [0, "nofunc"],
"semi": [2, "always"],
"semi-spacing": 2,
"space-return-throw-case": 2,
"space-unary-ops": 2,
"wrap-regex": 0,
"quotes": [2, "single"]
+1 -1
View File
@@ -23,7 +23,7 @@ window.iD = function () {
if (arguments.length === 1) return storage.getItem(k);
else if (v === null) storage.removeItem(k);
else storage.setItem(k, v);
} catch(e) {
} catch (e) {
// localstorage quota exceeded
/* eslint-disable no-console */
if (typeof console !== 'undefined') console.error('localStorage quota exceeded');
+1 -1
View File
@@ -15,7 +15,7 @@ iD.modes.Save = function(context) {
try {
var cn = graph.childNodes(e);
result.push.apply(result, _.map(_.filter(cn, 'version'), 'id'));
} catch(err) {
} catch (err) {
/* eslint-disable no-console */
if (typeof console !== 'undefined') console.error(err);
/* eslint-enable no-console */
+6
View File
@@ -0,0 +1,6 @@
{
"parserOptions": {
"ecmaVersion": 6,
"sourceType": "module"
}
}
+2 -1
View File
@@ -12,6 +12,7 @@
"test": "npm run lint && phantomjs node_modules/mocha-phantomjs-core/mocha-phantomjs-core.js test/index.html dot && make && phantomjs node_modules/mocha-phantomjs-core/mocha-phantomjs-core.js test/index_packaged.html dot",
"start": "http-server .",
"lint": "eslint js/id && npm run lint:spec:actions",
"lint:modules": "eslint modules",
"lint:spec:actions": "eslint test/spec/actions"
},
"repository": {
@@ -27,7 +28,7 @@
"chai": "~1.9.2",
"d3": "3.5.5",
"editor-layer-index": "git://github.com/osmlab/editor-layer-index.git#gh-pages",
"eslint": "^1.10.3",
"eslint": "^2.12.0",
"glob": "~3.1.21",
"happen": "0.1.2",
"http-server": "^0.9.0",