Bug 1215455 - eslint no-multi-spaces [r=Standard8]

This commit is contained in:
Ed Lee 2015-10-16 01:10:56 -07:00
parent 671440aa56
commit 4563590767
11 changed files with 32 additions and 32 deletions

View File

@ -72,7 +72,7 @@
"no-lone-blocks": 2,
"no-loop-func": 2,
"no-mixed-spaces-and-tabs": 2,
"no-multi-spaces": 0, // TBD.
"no-multi-spaces": 2,
"no-multi-str": 2,
"no-multiple-empty-lines": 2,
"no-native-reassign": 2,

View File

@ -227,7 +227,7 @@ loop.shared.mixins = (function() {
// amount.
y += menuNodeRect.height - (boundingRect.height + y);
}
menu.style.marginTop = y + "px";
menu.style.marginTop = y + "px";
} else if (!menu.style.marginLeft) {
menu.style.marginTop = "auto";
}

View File

@ -405,7 +405,7 @@ var inChrome = typeof Components != "undefined" && "utils" in Components;
callUrl: callUrl
});
}
var bodyFooter = body + footer;
var bodyFooter = body + footer;
bodyFooter = bodyFooter.replace(/\r\n/g, "\n").replace(/\n/g, "\r\n");
mozLoop.composeEmail(
subject,
@ -507,11 +507,11 @@ var inChrome = typeof Components != "undefined" && "utils" in Components;
* @return {Number} The decoded value.
*/
function _b64ToUint6 (chr) {
return chr > 64 && chr < 91 ? chr - 65 :
return chr > 64 && chr < 91 ? chr - 65 :
chr > 96 && chr < 123 ? chr - 71 :
chr > 47 && chr < 58 ? chr + 4 :
chr === 43 ? 62 :
chr === 47 ? 63 : 0;
chr > 47 && chr < 58 ? chr + 4 :
chr === 43 ? 62 :
chr === 47 ? 63 : 0;
}
/**
@ -523,11 +523,11 @@ var inChrome = typeof Components != "undefined" && "utils" in Components;
* @return {Number} The encoded value.
*/
function _uint6ToB64 (uint6) {
return uint6 < 26 ? uint6 + 65 :
uint6 < 52 ? uint6 + 71 :
uint6 < 62 ? uint6 - 4 :
uint6 === 62 ? 43 :
uint6 === 63 ? 47 : 65;
return uint6 < 26 ? uint6 + 65 :
uint6 < 52 ? uint6 + 71 :
uint6 < 62 ? uint6 - 4 :
uint6 === 62 ? 43 :
uint6 === 63 ? 47 : 65;
}
/**
@ -546,10 +546,10 @@ var inChrome = typeof Components != "undefined" && "utils" in Components;
// Mapping.
for (var mapIndex = 0; mapIndex < inLength; mapIndex++) {
chr = inString.charCodeAt(mapIndex);
arrayLength += chr < 0x80 ? 1 :
chr < 0x800 ? 2 :
chr < 0x10000 ? 3 :
chr < 0x200000 ? 4 :
arrayLength += chr < 0x80 ? 1 :
chr < 0x800 ? 2 :
chr < 0x10000 ? 3 :
chr < 0x200000 ? 4 :
chr < 0x4000000 ? 5 : 6;
}

View File

@ -113,9 +113,9 @@ loop.validate = (function() {
_dependencyMatchTypes: function(value, types) {
return types.some(function(Type) {
try {
return typeof Type === "undefined" || // skip checking
Type === null && value === null || // null type
value.constructor === Type || // native type
return typeof Type === "undefined" || // skip checking
Type === null && value === null || // null type
value.constructor === Type || // native type
Type.prototype.isPrototypeOf(value) || // custom type
typeName(value) === typeName(Type); // type string eq.
} catch (e) {

View File

@ -917,7 +917,7 @@ var LoopRoomsInternal = {
// See if we received a notification for the channel that's currently active:
let channelIDs = MozLoopService.channelIDs;
if ((this.sessionType == LOOP_SESSION_TYPE.GUEST && channelID != channelIDs.roomsGuest) ||
(this.sessionType == LOOP_SESSION_TYPE.FXA && channelID != channelIDs.roomsFxA)) {
(this.sessionType == LOOP_SESSION_TYPE.FXA && channelID != channelIDs.roomsFxA)) {
return;
}

View File

@ -503,7 +503,7 @@ loop.standaloneRoomViews = (function(mozL10n) {
* @return {Boolean}
*/
_roomIsActive: function() {
return this.state.roomState === ROOM_STATES.JOINED ||
return this.state.roomState === ROOM_STATES.JOINED ||
this.state.roomState === ROOM_STATES.SESSION_CONNECTED ||
this.state.roomState === ROOM_STATES.HAS_PARTICIPANTS;
},

View File

@ -503,7 +503,7 @@ loop.standaloneRoomViews = (function(mozL10n) {
* @return {Boolean}
*/
_roomIsActive: function() {
return this.state.roomState === ROOM_STATES.JOINED ||
return this.state.roomState === ROOM_STATES.JOINED ||
this.state.roomState === ROOM_STATES.SESSION_CONNECTED ||
this.state.roomState === ROOM_STATES.HAS_PARTICIPANTS;
},

View File

@ -366,7 +366,7 @@ describe("loop.shared.utils", function() {
sharedUtils.composeCallUrlEmail("http://invalid", null,
"Hello, is me you're looking for?", "callfailed");
sinon.assert.calledOnce(telemetryAddValue, "LOOP_SHARING_ROOM_URL", 2);
sinon.assert.calledOnce(telemetryAddValue, "LOOP_SHARING_ROOM_URL", 2);
});
it("should log an error for invalid URLs", function() {

View File

@ -151,7 +151,7 @@ const kRoomUpdates = {
displayName: "Alexis",
account: "alexis@example.com",
roomConnectionId: "2a1787a6-4a73-43b5-ae3e-906ec1e763cb"
}, {
}, {
displayName: "Ruharb",
roomConnectionId: "5de6281c-6568-455f-af08-c0b0a973100e"
}]

View File

@ -23,9 +23,9 @@
var DesktopRoomConversationView = loop.roomViews.DesktopRoomConversationView;
// 2. Standalone webapp
var UnsupportedBrowserView = loop.webapp.UnsupportedBrowserView;
var UnsupportedDeviceView = loop.webapp.UnsupportedDeviceView;
var StandaloneRoomView = loop.standaloneRoomViews.StandaloneRoomView;
var UnsupportedBrowserView = loop.webapp.UnsupportedBrowserView;
var UnsupportedDeviceView = loop.webapp.UnsupportedDeviceView;
var StandaloneRoomView = loop.standaloneRoomViews.StandaloneRoomView;
var StandaloneHandleUserAgentView = loop.standaloneRoomViews.StandaloneHandleUserAgentView;
// 3. Shared components

View File

@ -23,9 +23,9 @@
var DesktopRoomConversationView = loop.roomViews.DesktopRoomConversationView;
// 2. Standalone webapp
var UnsupportedBrowserView = loop.webapp.UnsupportedBrowserView;
var UnsupportedDeviceView = loop.webapp.UnsupportedDeviceView;
var StandaloneRoomView = loop.standaloneRoomViews.StandaloneRoomView;
var UnsupportedBrowserView = loop.webapp.UnsupportedBrowserView;
var UnsupportedDeviceView = loop.webapp.UnsupportedDeviceView;
var StandaloneRoomView = loop.standaloneRoomViews.StandaloneRoomView;
var StandaloneHandleUserAgentView = loop.standaloneRoomViews.StandaloneHandleUserAgentView;
// 3. Shared components
@ -1290,12 +1290,12 @@
width={800}>
<SVGIcons size="10x10"/>
</FramedExample>
<FramedExample height={350}
<FramedExample height={350}
summary="14x14"
width={800}>
<SVGIcons size="14x14" />
</FramedExample>
<FramedExample height={480}
<FramedExample height={480}
summary="16x16"
width={800}>
<SVGIcons size="16x16"/>