Skip to content

TagSpaces is an offline, open source, document manager with tagging support

jshinting

uggrock932678bba1ef
diff --git a/data/cordova/cordova.api.js b/data/cordova/cordova.api.js
index bd850af79..16c34dc65 100644
--- a/data/cordova/cordova.api.js
+++ b/data/cordova/cordova.api.js
@@ -79,7 +79,7 @@ define(function(require, exports, module) {
scanDirectory,
function(error) {
console.log("Error reading dir entries: " + error.code);
- });
+ }); // jshint ignore:line
}
}
pendingRecursions--;
@@ -139,7 +139,7 @@ define(function(require, exports, module) {
generateDirectoryTree,
function(error) {
console.log("Error reading dir entries: " + error.code);
- });
+ }); // jshint ignore:line
}
}
pendingCallbacks--;
@@ -268,11 +268,11 @@ define(function(require, exports, module) {
if (pendingCallbacks === 0 && i === entries.length) {
TSPOSTIO.listDirectory(anotatedDirList);
}
- },
+ }, // jshint ignore:line
function(error) { // error get file system
console.log("Getting file meta error: " + error.code);
- }
- );
+ } // jshint ignore:line
+ ); // jshint ignore:line
} else {
normalizedPath = normalizePath(entries[i].fullPath);
anotatedDirList.push({
diff --git a/data/mozilla/ioutils.js b/data/mozilla/ioutils.js
index 9d083705d..5c01c93df 100644
--- a/data/mozilla/ioutils.js
+++ b/data/mozilla/ioutils.js
@@ -5,14 +5,10 @@
/* global exports */
// good source for xpcom api https://developer.mozilla.org/en-US/Add-ons/Code_snippets/File_I_O
-const {
- components, Cc, Ci, Cr, Cu
-} = require("chrome");
+const { components, Cc, Ci, Cr, Cu } = require("chrome"); // jshint ignore:line
var filesIO = require("sdk/io/file"); // file
var runtime = require("sdk/system/runtime"); // runtime
-const {
- getTabs, getTabId, getOwnerWindow
-} = require("sdk/tabs/utils"); // tabs/utils
+const { getTabs, getTabId, getOwnerWindow } = require("sdk/tabs/utils"); // jshint ignore:line
function getWindow(worker) {
let {
diff --git a/data/mozilla/main.js b/data/mozilla/main.js
index 0797e10c0..3e8312228 100644
--- a/data/mozilla/main.js
+++ b/data/mozilla/main.js
@@ -8,7 +8,7 @@ var PRODUCTION = "@@PRODUCTION";
var VERSION = "@@VERSION";
// Disabling all output to console in production mode
if (PRODUCTION == "true") {
- console = console || {};
+ console = console || {}; // jshint ignore:line
console.log = function() {};
console.error = function() {};
}
diff --git a/data/mozilla/settings.js b/data/mozilla/settings.js
index 7897c27be..eb104838c 100644
--- a/data/mozilla/settings.js
+++ b/data/mozilla/settings.js
@@ -9,7 +9,7 @@ const prefs = require('sdk/preferences/service'); // preferences-service
const PREF_PREFIX = 'extensions.tagspaces.';
function save(field, value) {
- if (typeof value != 'undefined' && value != null) {
+ if (value) {
prefs.set(PREF_PREFIX + field, value);
}
}
diff --git a/data/node-webkit/node-webkit.api.js b/data/node-webkit/node-webkit.api.js
index a57a04843..d9bc9736d 100644
--- a/data/node-webkit/node-webkit.api.js
+++ b/data/node-webkit/node-webkit.api.js
@@ -24,15 +24,11 @@ define(function(require, exports, module) {
var menuInitialuzed = false;
process.on("uncaughtException", function(err) {
- //alert("error: " + err);
-
- var msg =
- ' Information | Description \n'
- + '-------------|-----------------------------\n'
- + ' Date | '+ new Date +'\n'
- + ' Type | UncaughtException \n'
- + ' Stack | '+ err.stack +'\n\n';
-
+ //var msg = ' Information | Description \n' +
+ // '-------------|-----------------------------\n' +
+ // ' Date | '+ new Date +'\n' +
+ // ' Type | UncaughtException \n' +
+ // ' Stack | '+ err.stack +'\n\n';
//fs.appendFile(errorLogFile, '---uncaughtException---\n' + msg);
});