[Pkg-mozext-commits] [tabmixplus] 25/73: Update Eslint ECMAScript 6 rules
David Prévot
taffit at moszumanska.debian.org
Mon May 9 02:30:52 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 33713676088848207f89b690f2b1d3905150d3ed
Author: onemen <tabmix.onemen at gmail.com>
Date: Sun Apr 3 15:53:02 2016 +0300
Update Eslint ECMAScript 6 rules
---
.eslintrc.js | 28 ++++++++++++++--------------
chrome/content/minit/minit.js | 2 +-
chrome/content/preferences/preferences.js | 2 +-
chrome/content/tab/tab.js | 2 +-
modules/TabGroupsMigrator.jsm | 4 ++--
5 files changed, 19 insertions(+), 19 deletions(-)
diff --git a/.eslintrc.js b/.eslintrc.js
index 38ea9b4..dbbca16 100644
--- a/.eslintrc.js
+++ b/.eslintrc.js
@@ -25,7 +25,7 @@ module.exports = {
"no-catch-shadow": 2,
"no-class-assign": 2,
"no-cond-assign": 2,
- "no-confusing-arrow": 0,
+ "no-confusing-arrow": [2, {"allowParens": true}],
"no-console": 0,
"no-const-assign": 2,
"no-constant-condition": 2,
@@ -34,11 +34,11 @@ module.exports = {
"no-debugger": 2,
"no-delete-var": 2,
"no-div-regex": 0,
- "no-dupe-class-members": 0,
+ "no-dupe-class-members": 2,
"no-dupe-keys": 2,
"no-dupe-args": 2,
"no-duplicate-case": 2,
- "no-duplicate-imports": 0,
+ "no-duplicate-imports": [2, {"includeExports": true}],
"no-else-return": 2,
// this show error on catch empty block unless there is a comment
"no-empty": 0,
@@ -85,7 +85,7 @@ module.exports = {
"no-new-func": 2,
"no-new-object": 2,
// "no-new-require": 0, // node
- "no-new-symbol": 0,
+ "no-new-symbol": 2,
"no-new-wrappers": 2,
"no-obj-calls": 2,
"no-octal": 2,
@@ -132,7 +132,7 @@ module.exports = {
"no-use-before-define": [2, "nofunc"],
"no-useless-call": 0,
"no-useless-concat": 0,
- "no-useless-constructor": 0,
+ "no-useless-constructor": 2,
"no-useless-escape": 0,
"no-void": 0,
"no-var": 0,
@@ -142,7 +142,7 @@ module.exports = {
"array-bracket-spacing": [2, "never"],
"array-callback-return": 0,
"arrow-body-style": 0,
- "arrow-parens": 0,
+ "arrow-parens": [2, "as-needed"],
"arrow-spacing": [2, {"before": true, "after": true}],
"accessor-pairs": 0,
"block-scoped-var": 2,
@@ -194,18 +194,18 @@ module.exports = {
"newline-before-return": 0,
"newline-per-chained-call": 0,
"object-curly-spacing": [2, "never"],
- "object-shorthand": 0,
+ "object-shorthand": 0, // since Firefox 33
"one-var": 0,
"one-var-declaration-per-line": 0,
"operator-assignment": [0, "always"],
"operator-linebreak": [2, "after"],
"padded-blocks": [0, "never"],
- "prefer-arrow-callback": 0,
- "prefer-const": 0, // TODO many error in old code
- "prefer-reflect": 0, // NOT YET
- "prefer-rest-params": 0,
- "prefer-spread": 0, // since Firefox 34
- "prefer-template": 0,
+ "prefer-arrow-callback": 0, // TODO many errors in old code
+ "prefer-const": 0, // TODO many errors in old code
+ "prefer-reflect": 0, // since Firefox 42
+ "prefer-rest-params": 0, // I don’t want to be notified about arguments variables,
+ "prefer-spread": 0, // Spread operator for function calls (Firefox 27)
+ "prefer-template": 0, // since Firefox 34
// in Firefox i can use properties obj - {default: x, private: y}
"quote-props": [0, "as-needed", {"keywords": true}],
"quotes": [0, "double"],
@@ -228,7 +228,7 @@ module.exports = {
"markers": ["/", "/XXX", "XXX", "****", "***", "**"]
}],
"strict": [2, "global"],
- "template-curly-spacing": 0,
+ "template-curly-spacing": [2, "never"],
"use-isnan": 2,
"valid-jsdoc": 0,
"valid-typeof": 2,
diff --git a/chrome/content/minit/minit.js b/chrome/content/minit/minit.js
index 5ac92ad..56ff726 100644
--- a/chrome/content/minit/minit.js
+++ b/chrome/content/minit/minit.js
@@ -620,7 +620,7 @@ var TMP_tabDNDObserver = {
},
getNewIndex: function(event) {
- let getTabRowNumber = (tab, top) => tab.pinned ? 1 : Tabmix.tabsUtils.getTabRowNumber(tab, top);
+ let getTabRowNumber = (tab, top) => (tab.pinned ? 1 : Tabmix.tabsUtils.getTabRowNumber(tab, top));
// if mX is less then the first tab return 0
// check if mY is below the tab.... if yes go to next row
// in the row find the closest tab by mX,
diff --git a/chrome/content/preferences/preferences.js b/chrome/content/preferences/preferences.js
index a5193e7..06c97ed 100644
--- a/chrome/content/preferences/preferences.js
+++ b/chrome/content/preferences/preferences.js
@@ -431,7 +431,7 @@ function exportData() {
function importData() {
showFilePicker("open").then(file => {
return file && OS.File.read(file.path);
- }).then((input) => {
+ }).then(input => {
if (input) {
let decoder = new TextDecoder();
input = decoder.decode(input);
diff --git a/chrome/content/tab/tab.js b/chrome/content/tab/tab.js
index b5362e7..54d9a25 100644
--- a/chrome/content/tab/tab.js
+++ b/chrome/content/tab/tab.js
@@ -2599,7 +2599,7 @@ gTMPprefObserver = {
showNewVersionTab = true;
else if (shouldAutoUpdate || oldVersion === "") {
let re = /([A-Za-z]*)\d*$/;
- let subs = obj => obj[1] ? obj.input.substring(0, obj.index) : obj.input;
+ let subs = obj => (obj[1] ? obj.input.substring(0, obj.index) : obj.input);
showNewVersionTab = subs(re.exec(currentVersion)) != subs(re.exec(oldVersion));
}
}
diff --git a/modules/TabGroupsMigrator.jsm b/modules/TabGroupsMigrator.jsm
index 1a470f8..941626d 100644
--- a/modules/TabGroupsMigrator.jsm
+++ b/modules/TabGroupsMigrator.jsm
@@ -77,7 +77,7 @@ this.TabmixGroupsMigrator = {
return false;
};
- let bookmarkGroups = (session) => {
+ let bookmarkGroups = session => {
let state = window.TabmixConvertSession.getSessionState(session, true);
let {hiddenTabState, groupData} = this.removeHiddenTabGroupsFromState(state);
if (hiddenTabState.windows.length) {
@@ -180,7 +180,7 @@ this.TabmixGroupsMigrator = {
"chrome://tabmixplus/skin/tmpsmall.png",
notificationBox.PRIORITY_WARNING_MEDIUM,
buttons,
- (aEventType) => {
+ aEventType => {
if (aEventType == "removed") {
TabmixSvc.sm.showMissingTabViewNotification = null;
this.closeNotificationFromAllWindows();
--
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