Bug 1577835 - Fix remaining linting errors in editor/. r=mkmelin

--HG--
extra : amend_source : dee5c2a6f956447012a9684992631286b573726c
This commit is contained in:
Paul Morris 2019-08-30 15:54:33 -04:00
Родитель 9c14bf57b9
Коммит 951b5b03ff
3 изменённых файлов: 12 добавлений и 7 удалений

Просмотреть файл

@ -29,7 +29,7 @@
<label value="&chooseColor1.label;"/>
<html:input type="color" id="ColorPicker"
onclick="SetDefaultToOk();"
ondblclick="if (onAccept()) window.close();"
ondblclick="if (onAccept()) { window.close(); }"
onkeypress="SelectColorByKeypress(event);"
onchange="SelectColor();"/>

Просмотреть файл

@ -30,7 +30,8 @@ function getParentIndex(index) {
case 1:
return 0;
}
while (itemArray[--index].level > 1) {}
// eslint-disable-next-line curly
while (itemArray[--index].level > 1);
return index;
}
@ -276,7 +277,8 @@ optgroupObject.prototype.moveUp = function() {
// Find the index of the previous and next elements at the same level
var index = treeSelection.currentIndex;
var i = index;
while (itemArray[--index].level > 1) {}
// eslint-disable-next-line curly
while (itemArray[--index].level > 1);
var j = gDialog.nextChild(i);
// Cut out the element, cut the array in two, then join together
var movedItems = itemArray.splice(i, j - i);
@ -433,13 +435,15 @@ function Startup() {
// helper methods
// Find the index of the next immediate child of the select
nextChild(index) {
while (++index < itemArray.length && itemArray[index].level > 1) {}
// eslint-disable-next-line curly
while (++index < itemArray.length && itemArray[index].level > 1);
return index;
},
// Find the index of the last immediate child of the select
lastChild() {
var index = itemArray.length;
while (itemArray[--index].level > 1) {}
// eslint-disable-next-line curly
while (itemArray[--index].level > 1);
return index;
},
};
@ -748,11 +752,12 @@ function onSelectMultipleClick() {
selectedOptionCount == 1 &&
!selectedOption
) {
// eslint-disable-next-line curly
for (
var i = 1;
!(selectedOption = itemArray[i].element).hasAttribute("selected");
i++
) {}
);
}
}

Просмотреть файл

@ -57,7 +57,7 @@
<richlistbox id="SuggestedList"
class="theme-listbox"
onselect="SelectSuggestedWord()"
ondblclick="if (gAllowSelectWord) Replace(event.target.value);"/>
ondblclick="if (gAllowSelectWord) { Replace(event.target.value); }"/>
<vbox>
<grid>
<columns><column class="spell-check" flex="1"/><column class="spell-check" flex="1"/></columns>