mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1181825 - Enable eslint rules for Loop: no-extra-boolean cast, no-redeclare, r=dmose
This commit is contained in:
parent
a37f941c2d
commit
6eaa1cdc95
@ -47,10 +47,8 @@
|
||||
"no-console": 0, // Leave as 0. We use console logging in content code.
|
||||
"no-empty": 0, // TODO: Remove (use default)
|
||||
"no-extra-bind": 0, // Leave as 0
|
||||
"no-extra-boolean-cast": 0, // TODO: Remove (use default)
|
||||
"no-multi-spaces": 0, // TBD.
|
||||
"no-new": 0, // TODO: Remove (use default)
|
||||
"no-redeclare": 0, // TODO: Remove (use default)
|
||||
"no-return-assign": 0, // TODO: Remove (use default)
|
||||
"no-underscore-dangle": 0, // Leave as 0. Commonly used for private variables.
|
||||
"no-unexpected-multiline": 2,
|
||||
|
@ -700,7 +700,7 @@ loop.contacts = (function(_, mozL10n) {
|
||||
category: ["local"]
|
||||
};
|
||||
var tel = this.state.tel.trim();
|
||||
if (!!tel) {
|
||||
if (tel) {
|
||||
contact.tel = [{
|
||||
pref: true,
|
||||
type: ["fxos"],
|
||||
|
@ -700,7 +700,7 @@ loop.contacts = (function(_, mozL10n) {
|
||||
category: ["local"]
|
||||
};
|
||||
var tel = this.state.tel.trim();
|
||||
if (!!tel) {
|
||||
if (tel) {
|
||||
contact.tel = [{
|
||||
pref: true,
|
||||
type: ["fxos"],
|
||||
|
@ -151,8 +151,8 @@ loop.shared.mixins = (function() {
|
||||
boundingRect.width -= boundOffset;
|
||||
boundingRect.height -= boundOffset;
|
||||
|
||||
var x = menuNodeRect.left;
|
||||
var y = menuNodeRect.top;
|
||||
x = menuNodeRect.left;
|
||||
y = menuNodeRect.top;
|
||||
|
||||
// If there's an anchor present, position it relative to it first.
|
||||
var anchor = this.refs.anchor && this.refs.anchor.getDOMNode();
|
||||
@ -472,8 +472,8 @@ loop.shared.mixins = (function() {
|
||||
// Supply some sensible defaults for the remoteVideoDimensions if no remote
|
||||
// stream is connected (yet).
|
||||
if (!remoteVideoDimensions) {
|
||||
var node = this._getElement(".remote");
|
||||
var width = node.offsetWidth;
|
||||
node = this._getElement(".remote");
|
||||
width = node.offsetWidth;
|
||||
var height = node.offsetHeight;
|
||||
remoteVideoDimensions = {
|
||||
width: width,
|
||||
|
@ -173,13 +173,13 @@ XPCOMUtils.defineLazyGetter(this, "log", () => {
|
||||
});
|
||||
|
||||
function setJSONPref(aName, aValue) {
|
||||
let value = !!aValue ? JSON.stringify(aValue) : "";
|
||||
let value = aValue ? JSON.stringify(aValue) : "";
|
||||
Services.prefs.setCharPref(aName, value);
|
||||
}
|
||||
|
||||
function getJSONPref(aName) {
|
||||
let value = Services.prefs.getCharPref(aName);
|
||||
return !!value ? JSON.parse(value) : null;
|
||||
return value ? JSON.parse(value) : null;
|
||||
}
|
||||
|
||||
let gHawkClient = null;
|
||||
|
@ -1286,7 +1286,7 @@
|
||||
var warningsMismatch = caughtWarnings.length !== expectedWarningsCount;
|
||||
if (uncaughtError || warningsMismatch) {
|
||||
$("#results").append("<div class='failures'><em>" +
|
||||
(!!(uncaughtError && warningsMismatch) ? 2 : 1) + "</em></div>");
|
||||
((uncaughtError && warningsMismatch) ? 2 : 1) + "</em></div>");
|
||||
if (warningsMismatch) {
|
||||
$("#results").append("<li class='test fail'>" +
|
||||
"<h2>Unexpected number of warnings detected in UI-Showcase</h2>" +
|
||||
|
@ -1286,7 +1286,7 @@
|
||||
var warningsMismatch = caughtWarnings.length !== expectedWarningsCount;
|
||||
if (uncaughtError || warningsMismatch) {
|
||||
$("#results").append("<div class='failures'><em>" +
|
||||
(!!(uncaughtError && warningsMismatch) ? 2 : 1) + "</em></div>");
|
||||
((uncaughtError && warningsMismatch) ? 2 : 1) + "</em></div>");
|
||||
if (warningsMismatch) {
|
||||
$("#results").append("<li class='test fail'>" +
|
||||
"<h2>Unexpected number of warnings detected in UI-Showcase</h2>" +
|
||||
|
Loading…
Reference in New Issue
Block a user