diff --git a/.eslintrc b/.eslintrc index 376e73565..f3c152b1a 100644 --- a/.eslintrc +++ b/.eslintrc @@ -65,6 +65,7 @@ "no-template-curly-in-string": "warn", "no-throw-literal": "error", "no-undef": "error", + "no-undef-init": "warn", "no-unexpected-multiline": "error", "no-unneeded-ternary": "error", "no-unmodified-loop-condition": "error", diff --git a/modules/osm/intersection.js b/modules/osm/intersection.js index a2f780c48..ffb3b6c49 100644 --- a/modules/osm/intersection.js +++ b/modules/osm/intersection.js @@ -380,7 +380,7 @@ export function osmIntersection(graph, startVertexId, maxDistance) { if (currPath.indexOf(way.id) !== -1 && currPath.length >= 3) continue; // Check all "current" restrictions (where we've already walked the `FROM`) - var restrict = undefined; + var restrict; for (j = 0; j < currRestrictions.length; j++) { var restriction = currRestrictions[j]; var f = restriction.memberByRole('from'); diff --git a/test/spec/actions/upgrade_tags.js b/test/spec/actions/upgrade_tags.js index 0f35bf1e6..3fa921d58 100644 --- a/test/spec/actions/upgrade_tags.js +++ b/test/spec/actions/upgrade_tags.js @@ -34,7 +34,7 @@ describe('iD.actionUpgradeTags', function () { it('upgrades a tag with no replacement tags', function () { var oldTags = { highway: 'no' }, - newTags = undefined, + newTags, entity = iD.osmEntity({ tags: { highway: 'no', name: 'Foo' }}), graph = iD.actionUpgradeTags(entity.id, oldTags, newTags)(iD.coreGraph([entity])); expect(graph.entity(entity.id).tags).to.eql({ name: 'Foo' });