Enable curly and block-spacing eslint rules

This commit is contained in:
Quincy Morgan
2020-11-10 14:19:11 -05:00
parent d247ec3aed
commit ba48a861bc
24 changed files with 138 additions and 107 deletions
+8 -5
View File
@@ -49,7 +49,8 @@ var helpStringReplacements;
// with custom `replacements`
export function helpHtml(id, replacements) {
// only load these the first time
if (!helpStringReplacements) helpStringReplacements = {
if (!helpStringReplacements) {
helpStringReplacements = {
// insert icons corresponding to various UI elements
point_icon: icon('#iD-icon-point', 'inline'),
line_icon: icon('#iD-icon-line', 'inline'),
@@ -144,7 +145,8 @@ export function helpHtml(id, replacements) {
start_the_walkthrough: t.html('splash.walkthrough'),
help: t.html('help.title'),
ok: t.html('intro.ok')
};
};
}
var reps;
if (replacements) {
@@ -255,10 +257,11 @@ export function selectMenuItem(context, operation) {
export function transitionTime(point1, point2) {
var distance = geoSphericalDistance(point1, point2);
if (distance === 0)
if (distance === 0) {
return 0;
else if (distance < 80)
} else if (distance < 80) {
return 500;
else
} else {
return 1000;
}
}
+4 -3
View File
@@ -211,12 +211,13 @@ export function uiIntroLine(context, reveal) {
reveal('.surface', continueLineText);
context.on('enter.intro', function(mode) {
if (mode.id === 'draw-line')
if (mode.id === 'draw-line') {
return;
else if (mode.id === 'select')
} else if (mode.id === 'select') {
return continueTo(chooseCategoryRoad);
else
} else {
return chapter.restart();
}
});
function continueTo(nextStep) {