Enable no-undef-init eslint rule

This commit is contained in:
Quincy Morgan
2020-10-23 11:33:47 -04:00
parent 6549bcc197
commit 3f9ac9105b
3 changed files with 3 additions and 2 deletions

View File

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

View File

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

View File

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