Merge branch 'inter-require' of github.com:openstreetmap/iD into inter-require

This commit is contained in:
Tom MacWright
2016-06-14 11:12:25 -04:00
21 changed files with 27 additions and 21 deletions

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"]

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');

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
modules/.eslintrc Normal file
View File

@@ -0,0 +1,6 @@
{
"parserOptions": {
"ecmaVersion": 6,
"sourceType": "module"
}
}

View File

@@ -2,4 +2,4 @@ export function AddEntity(way) {
return function(graph) {
return graph.replace(way);
};
};
}

View File

@@ -26,4 +26,4 @@ export function AddMember(relationId, member, memberIndex) {
return graph.replace(relation.addMember(member, memberIndex));
};
};
}

View File

@@ -20,4 +20,4 @@ export function AddMidpoint(midpoint, node) {
return graph;
};
};
}

View File

@@ -3,4 +3,4 @@ export function AddVertex(wayId, nodeId, index) {
return function(graph) {
return graph.replace(graph.entity(wayId).addNode(nodeId, index));
};
};
}

View File

@@ -2,4 +2,4 @@ export function ChangeMember(relationId, member, memberIndex) {
return function(graph) {
return graph.replace(graph.entity(relationId).updateMember(member, memberIndex));
};
};
}

View File

@@ -9,4 +9,4 @@ export function ChangePreset(entityId, oldPreset, newPreset) {
return graph.replace(entity.update({tags: tags}));
};
};
}

View File

@@ -3,4 +3,4 @@ export function ChangeTags(entityId, tags) {
var entity = graph.entity(entityId);
return graph.replace(entity.update({tags: tags}));
};
};
}

View File

@@ -180,4 +180,4 @@ export function Circularize(wayId, projection, maxAngle) {
};
return action;
};
}

View File

@@ -41,4 +41,4 @@ export function Connect(nodeIds) {
return graph;
};
};
}

View File

@@ -18,4 +18,4 @@ export function CopyEntities(ids, fromGraph) {
};
return action;
};
}

View File

@@ -12,4 +12,4 @@ export function DeleteMember(relationId, memberIndex) {
return graph;
};
};
}

View File

@@ -28,4 +28,4 @@ export function DeleteMultiple(ids) {
};
return action;
};
}

View File

@@ -34,4 +34,4 @@ export function DeleteNode(nodeId) {
};
return action;
};
}

View File

@@ -48,4 +48,4 @@ export function DeleteWay(wayId) {
};
return action;
};
}

View File

@@ -254,4 +254,4 @@ export function MergeRemoteChanges(id, localGraph, remoteGraph, formatUser) {
};
return action;
};
}

View File

@@ -276,4 +276,4 @@ export function Move(moveIds, tryDelta, projection, cache) {
};
return action;
};
}

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",