[Pkg-mozext-commits] [tabmixplus] 21/34: Enable Eslint object-property-newline rule, Object properties must go on a new line if they aren't all on the same line
David Prévot
taffit at moszumanska.debian.org
Mon Jun 27 13:57:57 UTC 2016
This is an automated email from the git hooks/post-receive script.
taffit pushed a commit to branch master
in repository tabmixplus.
commit cbd11a26a7cad2d1f13a6302e8ed37461c54591b
Author: onemen <tabmix.onemen at gmail.com>
Date: Wed Jun 15 00:00:14 2016 +0300
Enable Eslint object-property-newline rule, Object properties must go on a new line if they aren't all on the same line
---
.eslintrc.js | 4 ++--
chrome/content/changecode.js | 12 ++++++++----
chrome/content/extensions/extensions.js | 6 ++++--
chrome/content/minit/tablib.js | 8 ++++++--
chrome/content/preferences/preferences.js | 6 ++++--
chrome/content/scripts/content.js | 22 +++++++++++++++-------
chrome/content/session/session.js | 6 ++++--
chrome/content/tab/tab.js | 6 ++++--
chrome/content/utils.js | 6 ++++--
modules/DownloadLastDir.jsm | 3 ++-
modules/Shortcuts.jsm | 3 ++-
11 files changed, 55 insertions(+), 27 deletions(-)
diff --git a/.eslintrc.js b/.eslintrc.js
index 25ae709..a160d84 100644
--- a/.eslintrc.js
+++ b/.eslintrc.js
@@ -113,8 +113,7 @@ module.exports = {
"no-sparse-arrays": 2,
// "no-sync": 0, // node
"no-ternary": 0,
- // the editor remove trailing-spaces on save
- "no-trailing-spaces": 0,
+ "no-trailing-spaces": 2,
"no-this-before-super": 2,
"no-throw-literal": 2,
"no-undef": 2,
@@ -198,6 +197,7 @@ module.exports = {
"ObjectPattern": "never"
}],
"object-curly-spacing": [2, "never"],
+ "object-property-newline": [2, {"allowMultiplePropertiesPerLine": true}],
"object-shorthand": 0, // since Firefox 33
"one-var": 0,
"one-var-declaration-per-line": 0,
diff --git a/chrome/content/changecode.js b/chrome/content/changecode.js
index 9888306..d99f29f 100644
--- a/chrome/content/changecode.js
+++ b/chrome/content/changecode.js
@@ -29,7 +29,8 @@ Tabmix.changeCode = function(aParent, afnName, aOptions) {
}
ChangeCode.prototype = {
- value: "", errMsg: "",
+ value: "",
+ errMsg: "",
_replace: function TMP_utils__replace(substr, newString, aParams) {
// Don't insert new code before "use strict";
if (substr == "{") {
@@ -168,8 +169,10 @@ Tabmix.changeCode = function(aParent, afnName, aOptions) {
let name = afnName.split(".").pop();
try {
return new ChangeCode({
- obj: aParent, fnName: name,
- fullName: afnName, options: aOptions
+ obj: aParent,
+ fnName: name,
+ fullName: afnName,
+ options: aOptions
});
} catch (ex) {
console.clog(console.callerName() + " failed to change " + afnName + "\nError: " + ex.message);
@@ -183,7 +186,8 @@ Tabmix.setNewFunction = function(aObj, aName, aCode) {
if (!Object.getOwnPropertyDescriptor(aObj, aName)) {
Object.defineProperty(aObj, aName, {
value: aCode,
- writable: true, configurable: true
+ writable: true,
+ configurable: true
});
} else {
aObj[aName] = aCode;
diff --git a/chrome/content/extensions/extensions.js b/chrome/content/extensions/extensions.js
index ab736d6..19a688d 100644
--- a/chrome/content/extensions/extensions.js
+++ b/chrome/content/extensions/extensions.js
@@ -18,8 +18,10 @@ var TMP_extensionsCompatibility = {
onContentLoaded: function TMP_EC_onContentLoaded() {
Tabmix.extensions = {
- treeStyleTab: false, tabGroupManager: false,
- verticalTabBar: false, ieTab2: false,
+ treeStyleTab: false,
+ tabGroupManager: false,
+ verticalTabBar: false,
+ ieTab2: false,
gIeTab: false, /* for ieTab and ieTab2 */
ctr: false/* classic theme restorer */
};
diff --git a/chrome/content/minit/tablib.js b/chrome/content/minit/tablib.js
index c0a64a7..a7e4044 100644
--- a/chrome/content/minit/tablib.js
+++ b/chrome/content/minit/tablib.js
@@ -1112,8 +1112,12 @@ var tablib = { // eslint-disable-line
if (!isValid(linkURL)) {
let json = {
- button: 0, shiftKey: false, ctrlKey: false, metaKey: false,
- altKey: false, target: {},
+ button: 0,
+ shiftKey: false,
+ ctrlKey: false,
+ metaKey: false,
+ altKey: false,
+ target: {},
tabmix_openLinkWithHistory: true
};
// we only get here when it is safe to use contentWindowAsCPOW
diff --git a/chrome/content/preferences/preferences.js b/chrome/content/preferences/preferences.js
index 508fbf6..d28a552 100644
--- a/chrome/content/preferences/preferences.js
+++ b/chrome/content/preferences/preferences.js
@@ -37,7 +37,8 @@ var gPrefWindow = {
// don't use browser.preferences.animateFadeIn
Object.defineProperty(docElt, "_shouldAnimate", {
value: false,
- writable: true, configurable: true
+ writable: true,
+ configurable: true
});
docElt.setAttribute("animated", "false");
@@ -274,7 +275,8 @@ function getPrefByType(prefName) {
function setPrefByType(prefName, newValue, atImport) {
let pref = {
- name: prefName, value: newValue,
+ name: prefName,
+ value: newValue,
type: Services.prefs.getPrefType(prefName)
};
try {
diff --git a/chrome/content/scripts/content.js b/chrome/content/scripts/content.js
index 0264f30..2344a08 100644
--- a/chrome/content/scripts/content.js
+++ b/chrome/content/scripts/content.js
@@ -160,10 +160,13 @@ var TabmixContentHandler = {
let data = {
json: {
dataTransfer: {dropEffect: event.dataTransfer.dropEffect},
- ctrlKey: event.ctrlKey, metaKey: event.metaKey,
- shiftKey: event.shiftKey, altKey: event.altKey
+ ctrlKey: event.ctrlKey,
+ metaKey: event.metaKey,
+ shiftKey: event.shiftKey,
+ altKey: event.altKey
},
- uri: uri, name: name.value
+ uri: uri,
+ name: name.value
};
let result = sendSyncMessage("Tabmix:contentDrop", data);
if (result[0]) {
@@ -222,10 +225,15 @@ TabmixClickEventHandler = {
}
let json = {
- button: event.button, shiftKey: event.shiftKey,
- ctrlKey: event.ctrlKey, metaKey: event.metaKey,
- altKey: event.altKey, href: null, title: null,
- bookmark: false, referrerPolicy: referrerPolicy,
+ button: event.button,
+ shiftKey: event.shiftKey,
+ ctrlKey: event.ctrlKey,
+ metaKey: event.metaKey,
+ altKey: event.altKey,
+ href: null,
+ title: null,
+ bookmark: false,
+ referrerPolicy: referrerPolicy,
originAttributes: principal ? principal.originAttributes : {},
};
diff --git a/chrome/content/session/session.js b/chrome/content/session/session.js
index 9200645..7a748d5 100644
--- a/chrome/content/session/session.js
+++ b/chrome/content/session/session.js
@@ -1519,8 +1519,10 @@ TabmixSessionManager = {
case Tabmix.BUTTON_EXTRA1 :
var trimResult = result.label.replace(/^[\s]+/g, "").replace(/[\s]+$/g, "");
return {
- button: result.button, name: encodeURI(trimResult),
- path: sessionList.path[result.value], saveClosedTabs: result.checked
+ button: result.button,
+ name: encodeURI(trimResult),
+ path: sessionList.path[result.value],
+ saveClosedTabs: result.checked
};
}
return {};
diff --git a/chrome/content/tab/tab.js b/chrome/content/tab/tab.js
index ee045d1..f99b0b0 100644
--- a/chrome/content/tab/tab.js
+++ b/chrome/content/tab/tab.js
@@ -637,8 +637,10 @@ Tabmix.tabsUtils = {
this._keepLastTab = Tabmix.prefs.getBoolPref("keepLastTab");
this.closeButtonsEnabled = Tabmix.prefs.getBoolPref("tabs.closeButtons.enable");
this._tabmixPositionalTabs = {
- beforeSelectedTab: null, afterSelectedTab: null,
- beforeHoveredTab: null, afterHoveredTab: null
+ beforeSelectedTab: null,
+ afterSelectedTab: null,
+ beforeHoveredTab: null,
+ afterHoveredTab: null
};
Tabmix.afterTabsButtonsWidth = [Tabmix.isVersion(280) ? 51.6 : 28];
diff --git a/chrome/content/utils.js b/chrome/content/utils.js
index 49d8173..ae15a6d 100644
--- a/chrome/content/utils.js
+++ b/chrome/content/utils.js
@@ -168,8 +168,10 @@ var Tabmix = {
dialog._callBackFunction = aCallBack;
return {
- button: dpb.GetInt(4), checked: (dpb.GetInt(5) == this.CHECKBOX_CHECKED),
- label: dpb.GetString(5), value: dpb.GetInt(6)
+ button: dpb.GetInt(4),
+ checked: (dpb.GetInt(5) == this.CHECKBOX_CHECKED),
+ label: dpb.GetString(5),
+ value: dpb.GetInt(6)
};
},
diff --git a/modules/DownloadLastDir.jsm b/modules/DownloadLastDir.jsm
index 7c95681..fa96a8d 100644
--- a/modules/DownloadLastDir.jsm
+++ b/modules/DownloadLastDir.jsm
@@ -37,7 +37,8 @@ this.TabmixDownloadLastDir = {
this._window = val;
return val;
},
- configurable: true, enumerable: true
+ configurable: true,
+ enumerable: true
};
let downloadModule = {};
diff --git a/modules/Shortcuts.jsm b/modules/Shortcuts.jsm
index c295559..d75bc07 100644
--- a/modules/Shortcuts.jsm
+++ b/modules/Shortcuts.jsm
@@ -499,7 +499,8 @@ KeyConfig = {
else {
let newKey = {
modifiers: prefValue[0].replace(" ", ","),
- key: prefValue[1], keycode: prefValue[2]
+ key: prefValue[1],
+ keycode: prefValue[2]
};
if (keyData.value.indexOf("accel") > -1)
newKey.modifiers = newKey.modifiers.replace(getPlatformAccel(), "accel");
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-mozext/tabmixplus.git
More information about the Pkg-mozext-commits
mailing list