diff --git a/js/.jshintrc b/js/.jshintrc index b5379bbb2f..e04ac8f3ba 100644 --- a/js/.jshintrc +++ b/js/.jshintrc @@ -8,13 +8,13 @@ "forin": true, "freeze": true, "immed": true, - "indent": true, + "laxbreak": true, "newcap": true, "noarg": true, "noempty": true, "nonbsp": true, "nonew": true, "undef": true, - "maxlen": 120, - "-W014": true + "indent": 2, + "maxlen": 120 } diff --git a/js/apps/system/aardvark/aardvark.js b/js/apps/system/aardvark/aardvark.js index e388f1c837..eef46205a4 100644 --- a/js/apps/system/aardvark/aardvark.js +++ b/js/apps/system/aardvark/aardvark.js @@ -1,4 +1,3 @@ -/*jslint indent: 2, nomen: true, maxlen: 100, white: true, plusplus: true, unparam: true */ /*global require, applicationContext*/ //////////////////////////////////////////////////////////////////////////////// @@ -427,7 +426,7 @@ controller.get("/query/result/download/:query", function(req, res) { } return string; - } + } var decodeFunction = function (input) { var keyStr = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="; diff --git a/js/apps/system/aardvark/cluster.js b/js/apps/system/aardvark/cluster.js index 1b9d0856fa..2ff83c921b 100644 --- a/js/apps/system/aardvark/cluster.js +++ b/js/apps/system/aardvark/cluster.js @@ -1,4 +1,3 @@ -/*jslint indent: 2, nomen: true, maxlen: 100, white: true, plusplus: true, unparam: true */ /*global require, applicationContext*/ //////////////////////////////////////////////////////////////////////////////// @@ -154,7 +153,7 @@ // only make these functions available in dispatcher mode! controller.post("/plan", startUp); controller.put("/plan", startUp); - + controller.put("/plan/credentials", function(req, res) { var body = req.body(), u = body.user, @@ -202,7 +201,7 @@ controller.get("/upgrade", function(req, res) { //uname pswd - + var k = getStarter(); var u = plans.getCredentials(); var r = k.upgrade(u.name, u.passwd); @@ -214,7 +213,7 @@ plans.replaceRunInfo(r.runInfo); res.json("ok"); } - + }); controller.get("/cleanup", function(req, res) { @@ -259,7 +258,7 @@ * * Returns a string containing the cluster type * Possible anwers: - * - testSetup + * - testSetup * - symmetricalSetup * - asymmetricalSetup * @@ -308,7 +307,7 @@ list = coords.getList(), diffList = diff.Coordinators(), didBeat = beats.didBeat(); - + _.each(list, function(v, k) { v.name = k; resList.push(v); diff --git a/js/apps/system/aardvark/lib/foxxes.js b/js/apps/system/aardvark/lib/foxxes.js index 6258bbf69f..c3422ace18 100644 --- a/js/apps/system/aardvark/lib/foxxes.js +++ b/js/apps/system/aardvark/lib/foxxes.js @@ -1,4 +1,3 @@ -/*jslint indent: 2, nomen: true, maxlen: 100, white: true, plusplus: true, unparam: true */ /*global exports, appCollection*/ //////////////////////////////////////////////////////////////////////////////// diff --git a/js/apps/system/aardvark/lib/swagger.js b/js/apps/system/aardvark/lib/swagger.js index cd3b9d0598..f4a3ebeb13 100644 --- a/js/apps/system/aardvark/lib/swagger.js +++ b/js/apps/system/aardvark/lib/swagger.js @@ -1,4 +1,3 @@ -/*jslint indent: 2, nomen: true, maxlen: 100, white: true, plusplus: true, unparam: true */ /*global exports, appCollection*/ //////////////////////////////////////////////////////////////////////////////// @@ -30,16 +29,16 @@ exports.Swagger = function () { "use strict"; - + var db = require("internal").db, _aal = db._collection("_aal"), _ = require("underscore"), foxx_manager = require("org/arangodb/foxx/manager"); - - + + // Define the functionality to receive the documentation. // And transform it into swagger format. - + // Get the overview of all installed foxxes. this.list = function(basePath) { var result = {}, @@ -51,7 +50,7 @@ exports.Swagger = function () { while (res.hasNext()) { var m = res.next().mount; if (m === "/aardvark") { - + } else { apis.push({ path: m @@ -60,7 +59,7 @@ exports.Swagger = function () { } return result; }, - + this.listOne = function(basePath, key) { var result = {}, res; @@ -81,8 +80,8 @@ exports.Swagger = function () { return result; }, - - // Get details of one specific installed foxx. + + // Get details of one specific installed foxx. this.show = function(mount) { var result = {}, apis = [], diff --git a/js/apps/system/aardvark/repositories/plans.js b/js/apps/system/aardvark/repositories/plans.js index 9d7a768b6b..1d89f9c9ec 100644 --- a/js/apps/system/aardvark/repositories/plans.js +++ b/js/apps/system/aardvark/repositories/plans.js @@ -1,4 +1,3 @@ -/*jslint indent: 2, nomen: true, maxlen: 100 */ /*global require, exports*/ //////////////////////////////////////////////////////////////////////////////// diff --git a/js/apps/system/aardvark/statistics.js b/js/apps/system/aardvark/statistics.js index 39a848061c..c0cc3a2e9b 100644 --- a/js/apps/system/aardvark/statistics.js +++ b/js/apps/system/aardvark/statistics.js @@ -1,4 +1,3 @@ -/*jslint indent: 2, nomen: true, maxlen: 120, white: true, plusplus: true, unparam: true, vars: true, continue: true */ /*global require, applicationContext, ArangoServerState, ArangoClusterInfo, ArangoClusterComm*/ //////////////////////////////////////////////////////////////////////////////// @@ -136,7 +135,7 @@ function computeStatisticsRaw (result, start, clusterId) { + " SORT s.time " + " return s", { start: start - 2 * STATISTICS_INTERVAL, clusterId: clusterId }); - + result.times = []; var key; @@ -268,7 +267,7 @@ function computeStatisticsRaw15M (result, start, clusterId) { + " SORT s.time " + " return s", { start: start - 2 * STATISTICS_HISTORY_INTERVAL, clusterId: clusterId }); - + var lastRaw = null; var lastRaw2 = null; @@ -404,7 +403,7 @@ function computeStatisticsLong (attrs, clusterId) { + " SORT s.time " + " return s", { end: end, clusterId: clusterId }); - + var long = { times: [] }; computeStatisticsValues(long, values, attrs); @@ -534,7 +533,7 @@ controller.get("cluster", function (req, res) { url += sep + "start=" + encodeURIComponent(req.params("start")); sep = "&"; } - + if (req.parameters.hasOwnProperty("filter")) { url += sep + "filter=" + encodeURIComponent(req.params("filter")); sep = "&"; diff --git a/js/apps/system/sessions/app.js b/js/apps/system/sessions/app.js index 851a192d6b..2457785c75 100644 --- a/js/apps/system/sessions/app.js +++ b/js/apps/system/sessions/app.js @@ -1,4 +1,3 @@ -/*jslint indent: 2, nomen: true, maxlen: 120 */ /*global require, applicationContext */ (function () { 'use strict'; diff --git a/js/apps/system/sessions/errors.js b/js/apps/system/sessions/errors.js index e36880b7fe..d7acfe7b12 100644 --- a/js/apps/system/sessions/errors.js +++ b/js/apps/system/sessions/errors.js @@ -1,4 +1,3 @@ -/*jslint indent: 2, nomen: true, maxlen: 120 */ /*global require, exports */ (function () { 'use strict'; diff --git a/js/apps/system/sessions/setup.js b/js/apps/system/sessions/setup.js index f6c04a49f5..f1df9f1195 100644 --- a/js/apps/system/sessions/setup.js +++ b/js/apps/system/sessions/setup.js @@ -1,4 +1,3 @@ -/*jslint indent: 2, nomen: true, maxlen: 120 */ /*global require, applicationContext */ (function () { 'use strict'; diff --git a/js/apps/system/sessions/storage.js b/js/apps/system/sessions/storage.js index 9a666b0df0..1e64e59fc1 100644 --- a/js/apps/system/sessions/storage.js +++ b/js/apps/system/sessions/storage.js @@ -1,4 +1,3 @@ -/*jslint indent: 2, nomen: true, maxlen: 120 */ /*global require, exports, applicationContext */ (function () { 'use strict'; diff --git a/js/apps/system/sessions/test/errors.js b/js/apps/system/sessions/test/errors.js index f9e19af69b..f6f2e6c92a 100644 --- a/js/apps/system/sessions/test/errors.js +++ b/js/apps/system/sessions/test/errors.js @@ -1,4 +1,3 @@ -/*jslint indent: 2, nomen: true, maxlen: 120 */ /*global require, describe, it */ (function () { 'use strict'; diff --git a/js/apps/system/sessions/test/setup.js b/js/apps/system/sessions/test/setup.js index 06bc34e7b9..a8672a319b 100644 --- a/js/apps/system/sessions/test/setup.js +++ b/js/apps/system/sessions/test/setup.js @@ -1,4 +1,3 @@ -/*jslint indent: 2, nomen: true, maxlen: 120 */ /*global require, module, describe, it, beforeEach */ (function () { 'use strict'; diff --git a/js/apps/system/simple-auth/auth.js b/js/apps/system/simple-auth/auth.js index 461929f7ff..32459ca220 100644 --- a/js/apps/system/simple-auth/auth.js +++ b/js/apps/system/simple-auth/auth.js @@ -1,4 +1,3 @@ -/*jslint indent: 2, nomen: true, maxlen: 120 */ /*global require, exports, applicationContext */ (function () { 'use strict'; diff --git a/js/apps/system/simple-auth/test/hashPassword.js b/js/apps/system/simple-auth/test/hashPassword.js index c551035812..d75b4bc012 100644 --- a/js/apps/system/simple-auth/test/hashPassword.js +++ b/js/apps/system/simple-auth/test/hashPassword.js @@ -1,4 +1,3 @@ -/*jslint indent: 2, nomen: true, maxlen: 120 */ /*global require, module, describe, it, beforeEach */ (function () { 'use strict'; diff --git a/js/apps/system/simple-auth/test/verifyPassword.js b/js/apps/system/simple-auth/test/verifyPassword.js index bd7b027191..480b1b170b 100644 --- a/js/apps/system/simple-auth/test/verifyPassword.js +++ b/js/apps/system/simple-auth/test/verifyPassword.js @@ -1,4 +1,3 @@ -/*jslint indent: 2, nomen: true, maxlen: 120 */ /*global require, module, exports, describe, it, beforeEach */ (function () { 'use strict'; diff --git a/js/apps/system/users/errors.js b/js/apps/system/users/errors.js index cb6e38050c..e2a273d76a 100644 --- a/js/apps/system/users/errors.js +++ b/js/apps/system/users/errors.js @@ -1,4 +1,3 @@ -/*jslint indent: 2, nomen: true, maxlen: 120 */ /*global require, exports */ (function () { 'use strict'; diff --git a/js/apps/system/users/setup.js b/js/apps/system/users/setup.js index 9ba4619365..84d9dc1128 100644 --- a/js/apps/system/users/setup.js +++ b/js/apps/system/users/setup.js @@ -1,4 +1,3 @@ -/*jslint indent: 2, nomen: true, maxlen: 120 */ /*global require, applicationContext */ (function () { 'use strict'; diff --git a/js/apps/system/users/storage.js b/js/apps/system/users/storage.js index e41e8e1347..9984cc4e8e 100644 --- a/js/apps/system/users/storage.js +++ b/js/apps/system/users/storage.js @@ -1,4 +1,3 @@ -/*jslint indent: 2, nomen: true, maxlen: 120 */ /*global require, exports, applicationContext */ (function () { 'use strict'; diff --git a/js/apps/system/users/test/errors.js b/js/apps/system/users/test/errors.js index 47992ae7e6..c1d3ba2b1c 100644 --- a/js/apps/system/users/test/errors.js +++ b/js/apps/system/users/test/errors.js @@ -1,4 +1,3 @@ -/*jslint indent: 2, nomen: true, maxlen: 120 */ /*global require, describe, it */ (function () { 'use strict'; diff --git a/js/apps/system/users/test/setup.js b/js/apps/system/users/test/setup.js index 7f7ab1d643..d76138d570 100644 --- a/js/apps/system/users/test/setup.js +++ b/js/apps/system/users/test/setup.js @@ -1,4 +1,3 @@ -/*jslint indent: 2, nomen: true, maxlen: 120 */ /*global require, module, describe, it, beforeEach */ (function () { 'use strict';