Bug 1372427 - add "block-scoped-var" rule. r=mattn.
MozReview-Commit-ID: K3Zwr0jy6U2
--- a/toolkit/components/satchel/.eslintrc.js
+++ b/toolkit/components/satchel/.eslintrc.js
@@ -28,10 +28,11 @@ module.exports = {
Number: "number",
String: "string",
bool: "boolean",
},
requireParamDescription: false,
requireReturn: false,
requireReturnDescription: false,
}],
+ "block-scoped-var": "error",
},
};
--- a/toolkit/components/satchel/test/unit/test_db_update_v999a.js
+++ b/toolkit/components/satchel/test/unit/test_db_update_v999a.js
@@ -18,19 +18,19 @@ function run_test() {
iter.next();
}
function next_test() {
iter.next();
}
function* tests() {
+ var testnum = 0;
+
try {
- var testnum = 0;
-
// ===== test init =====
var testfile = do_get_file("formhistory_v999a.sqlite");
var profileDir = dirSvc.get("ProfD", Ci.nsIFile);
// Cleanup from any previous tests or failures.
var destFile = profileDir.clone();
destFile.append("formhistory.sqlite");
if (destFile.exists()) {
--- a/toolkit/components/satchel/test/unit/test_db_update_v999b.js
+++ b/toolkit/components/satchel/test/unit/test_db_update_v999b.js
@@ -18,19 +18,19 @@ function run_test() {
iter.next();
}
function next_test() {
iter.next();
}
function* tests() {
+ var testnum = 0;
+
try {
- var testnum = 0;
-
// ===== test init =====
var testfile = do_get_file("formhistory_v999b.sqlite");
var profileDir = dirSvc.get("ProfD", Ci.nsIFile);
// Cleanup from any previous tests or failures.
var destFile = profileDir.clone();
destFile.append("formhistory.sqlite");
if (destFile.exists()) {
--- a/toolkit/components/satchel/test/unit/test_notify.js
+++ b/toolkit/components/satchel/test/unit/test_notify.js
@@ -41,22 +41,20 @@ function run_test() {
testIterator.next();
}
function next_test() {
testIterator.next();
}
function* run_test_steps() {
+ var testnum = 0;
+ var testdesc = "Setup of test form history entries";
try {
-
- var testnum = 0;
- var testdesc = "Setup of test form history entries";
-
var entry1 = ["entry1", "value1"];
/* ========== 1 ========== */
testnum = 1;
testdesc = "Initial connection to storage module";
yield updateEntry("remove", null, null, next_test);
yield countEntries(null, null, function(num) {