Bug 1271084 - Apply ESLint autofixes to ignored /devtools files. r=tromey

For simple rules like function spacing, we can auto-fix these across the code
base so they are followed in a consistent way.

To generate this patch, I ran:

./mach eslint devtools --no-ignore --fix

After this, I reverted any changes to third party files that we really do want
to ignore.

MozReview-Commit-ID: 6Q8BApkAW20
This commit is contained in:
J. Ryan Stinnett
2016-05-17 13:25:54 -05:00
parent 8c302515f8
commit 530b903fcf
1647 changed files with 18387 additions and 18387 deletions

View File

@@ -29,7 +29,7 @@ var Promise = require("promise");
*/
exports.asyncOnce = function asyncOnce(func) {
const promises = new WeakMap();
return function(...args) {
return function (...args) {
let promise = promises.get(this);
if (!promise) {
promise = Task.spawn(func.apply(this, args));
@@ -53,11 +53,11 @@ exports.asyncOnce = function asyncOnce(func) {
* happens
*/
exports.listenOnce = function listenOnce(element, event, useCapture) {
return new Promise(function(resolve, reject) {
var onEvent = function(ev) {
return new Promise(function (resolve, reject) {
var onEvent = function (ev) {
element.removeEventListener(event, onEvent, useCapture);
resolve(ev);
}
};
element.addEventListener(event, onEvent, useCapture);
});
};