зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1278138 - Enforce stricter eslint rules (comma-style) on passwordmgr. r=MattN
MozReview-Commit-ID: A16S8XGZ6Kg --HG-- extra : rebase_source : 2263406eef7550e6a6691a223478a08328b800dc
This commit is contained in:
Родитель
c5d392a9bc
Коммит
cd336e617c
|
@ -0,0 +1,10 @@
|
|||
{
|
||||
"extends": "../../.eslintrc",
|
||||
"rules": {
|
||||
// No space before always a space after a comma
|
||||
"comma-spacing": [2, {"before": false, "after": true}],
|
||||
|
||||
// Commas at the end of the line not the start
|
||||
"comma-style": 2,
|
||||
}
|
||||
}
|
|
@ -1187,7 +1187,7 @@ var LoginUtils = {
|
|||
|
||||
// nsIAutoCompleteResult implementation
|
||||
function UserAutoCompleteResult (aSearchString, matchingLogins, messageManager) {
|
||||
function loginSort(a,b) {
|
||||
function loginSort(a, b) {
|
||||
var userA = a.username.toLowerCase();
|
||||
var userB = b.username.toLowerCase();
|
||||
|
||||
|
|
|
@ -183,8 +183,8 @@ function LoadSignons() {
|
|||
var element = document.getElementById("removeAllSignons");
|
||||
var toggle = document.getElementById("togglePasswords");
|
||||
if (signons.length == 0) {
|
||||
element.setAttribute("disabled","true");
|
||||
toggle.setAttribute("disabled","true");
|
||||
element.setAttribute("disabled", "true");
|
||||
toggle.setAttribute("disabled", "true");
|
||||
} else {
|
||||
element.removeAttribute("disabled");
|
||||
toggle.removeAttribute("disabled");
|
||||
|
|
|
@ -99,7 +99,7 @@ function DeleteAllFromTree(tree, view, table, deletedTable, removeButton, remove
|
|||
|
||||
// disable buttons
|
||||
document.getElementById(removeButton).setAttribute("disabled", "true")
|
||||
document.getElementById(removeAllButton).setAttribute("disabled","true");
|
||||
document.getElementById(removeAllButton).setAttribute("disabled", "true");
|
||||
}
|
||||
|
||||
function DeleteSelectedItemFromTree
|
||||
|
@ -138,7 +138,7 @@ function DeleteSelectedItemFromTree
|
|||
} else {
|
||||
// disable buttons
|
||||
document.getElementById(removeButton).setAttribute("disabled", "true")
|
||||
document.getElementById(removeAllButton).setAttribute("disabled","true");
|
||||
document.getElementById(removeAllButton).setAttribute("disabled", "true");
|
||||
}
|
||||
tree.view.selection.selectEventsSuppressed = false;
|
||||
}
|
||||
|
|
|
@ -16,10 +16,10 @@ function RejectsStartup() {
|
|||
var rejectsTreeView = {
|
||||
rowCount : 0,
|
||||
setTree : function(tree){},
|
||||
getImageSrc : function(row,column) {},
|
||||
getProgressMode : function(row,column) {},
|
||||
getCellValue : function(row,column) {},
|
||||
getCellText : function(row,column){
|
||||
getImageSrc : function(row, column) {},
|
||||
getProgressMode : function(row, column) {},
|
||||
getCellValue : function(row, column) {},
|
||||
getCellText : function(row, column){
|
||||
var rv="";
|
||||
if (column.id=="rejectCol") {
|
||||
rv = rejects[row].host;
|
||||
|
@ -32,7 +32,7 @@ var rejectsTreeView = {
|
|||
cycleHeader : function(column) {},
|
||||
getRowProperties : function(row){ return ""; },
|
||||
getColumnProperties : function(column){ return ""; },
|
||||
getCellProperties : function(row,column){
|
||||
getCellProperties : function(row, column) {
|
||||
if (column.element.getAttribute("id") == "rejectCol")
|
||||
return "ltr";
|
||||
|
||||
|
@ -56,7 +56,7 @@ function LoadRejects() {
|
|||
|
||||
var element = document.getElementById("removeAllRejects");
|
||||
if (rejects.length == 0) {
|
||||
element.setAttribute("disabled","true");
|
||||
element.setAttribute("disabled", "true");
|
||||
} else {
|
||||
element.removeAttribute("disabled");
|
||||
}
|
||||
|
|
|
@ -73,14 +73,14 @@ const TESTCASES = [
|
|||
description: "2 password fields outside of a <form> with 1 linked via @form + skipEmpty",
|
||||
document: `<input id="pw1" type=password><input id="pw2" type=password form="form1">
|
||||
<form id="form1"></form>`,
|
||||
returnedFieldIDsByFormLike: [[],[]],
|
||||
returnedFieldIDsByFormLike: [[], []],
|
||||
skipEmptyFields: true,
|
||||
},
|
||||
{
|
||||
description: "2 password fields outside of a <form> with 1 linked via @form + skipEmpty with 1 empty",
|
||||
document: `<input id="pw1" type=password value="pass1"><input id="pw2" type=password form="form1">
|
||||
<form id="form1"></form>`,
|
||||
returnedFieldIDsByFormLike: [["pw1"],[]],
|
||||
returnedFieldIDsByFormLike: [["pw1"], []],
|
||||
skipEmptyFields: true,
|
||||
},
|
||||
];
|
||||
|
|
Загрузка…
Ссылка в новой задаче