diff options
author | Garren Smith <garren.smith@gmail.com> | 2013-03-19 17:40:38 +0200 |
---|---|---|
committer | Garren Smith <garren.smith@gmail.com> | 2013-03-19 17:40:38 +0200 |
commit | fc09e0187742bc72e23781bf8740a5ce9473eb13 (patch) | |
tree | cc20b40f672527d8838b7a36fbcbd6f1f335c5c4 | |
parent | 70d27386184afc073633f02ecffce18c6fb531f1 (diff) | |
download | couchdb-fc09e0187742bc72e23781bf8740a5ce9473eb13.tar.gz |
update jshint config and lint js files
-rw-r--r-- | src/fauxton/Gruntfile.js | 9 | ||||
-rw-r--r-- | src/fauxton/app/api.js | 3 | ||||
-rw-r--r-- | src/fauxton/tasks/fauxton.js | 6 | ||||
-rw-r--r-- | src/fauxton/tasks/helper.js | 8 |
4 files changed, 14 insertions, 12 deletions
diff --git a/src/fauxton/Gruntfile.js b/src/fauxton/Gruntfile.js index 4c9bbb145..0f03d08d2 100644 --- a/src/fauxton/Gruntfile.js +++ b/src/fauxton/Gruntfile.js @@ -20,7 +20,7 @@ module.exports = function(grunt) { }; var settings_couch_config = helper.readSettingsFile().couch_config; - return settings_couch_config || default_couch_config + return settings_couch_config || default_couch_config; }(); var cleanable = function(){ @@ -60,7 +60,7 @@ module.exports = function(grunt) { lessPath + "/" + addon.name + ".less"; } // Images - var root = addon.path || "app/addons/" + addon.name; + root = addon.path || "app/addons/" + addon.name; var imgPath = root + "/assets/img"; if(path.existsSync(imgPath)){ theAssets.img.push(imgPath + "/**"); @@ -113,6 +113,7 @@ module.exports = function(grunt) { // override inside main.js needs to test for them so as to not accidentally // route. jshint: { + all: ['app/**/*.js', 'Gruntfile.js'], options: { scripturl: true, evil: true @@ -246,13 +247,13 @@ module.exports = function(grunt) { dist:{ files:[ {src: ["**"], dest: "dist/release/js/", cwd:'assets/js/', expand: true}, - {src: assets.img, dest: "dist/debug/img/", flatten: true, expand: true}, + {src: assets.img, dest: "dist/debug/img/", flatten: true, expand: true} ] }, debug:{ files:[ {src: ["**"], dest: "dist/debug/js/", cwd:'assets/js/', expand: true}, - {src: assets.img, dest: "dist/debug/img/", flatten: true, expand: true}, + {src: assets.img, dest: "dist/debug/img/", flatten: true, expand: true} ] } }, diff --git a/src/fauxton/app/api.js b/src/fauxton/app/api.js index 6fbfc6134..52e861183 100644 --- a/src/fauxton/app/api.js +++ b/src/fauxton/app/api.js @@ -96,5 +96,6 @@ function(app, Fauxton) { } }); - return app.fauxtonAPI = FauxtonAPI; + app.fauxtonAPI = FauxtonAPI; + return app.fauxtonAPI; }); diff --git a/src/fauxton/tasks/fauxton.js b/src/fauxton/tasks/fauxton.js index 59a2623b9..b718fea95 100644 --- a/src/fauxton/tasks/fauxton.js +++ b/src/fauxton/tasks/fauxton.js @@ -49,11 +49,11 @@ module.exports = function(grunt) { filename: 'routes.js', template: grunt.file.read('./tasks/templates/route.js.underscore') } - ] + ]; // Create a new task. grunt.registerInitTask('addon', 'Generate a skeleton for an addon"', function() { - var done = this.async() + var done = this.async(); grunt.helper('prompt', {}, prompts, function (err, result) { if (err) { return onErr(err); } grunt.log.writeln(result.assets); @@ -67,7 +67,7 @@ module.exports = function(grunt) { name: 'less', filename: module.toLowerCase()+'.less', template: '//<%= module %> styles' - } + }; lessfile.module = module.charAt(0).toUpperCase() + module.substr(1); var content = grunt.template.process(lessfile.template, lessfile); grunt.file.write(filepath + '/' + lessfile.filename, content); diff --git a/src/fauxton/tasks/helper.js b/src/fauxton/tasks/helper.js index f0a73718c..869782aa0 100644 --- a/src/fauxton/tasks/helper.js +++ b/src/fauxton/tasks/helper.js @@ -5,9 +5,9 @@ exports.init = function(grunt) { return { readSettingsFile: function () { if (fs.existsSync("settings.json")) { - return grunt.file.readJSON("settings.json") + return grunt.file.readJSON("settings.json"); } else if (fs.existsSync("settings.json.default")) { - return grunt.file.readJSON("settings.json.default") + return grunt.file.readJSON("settings.json.default"); } else { return {deps: []}; } @@ -15,6 +15,6 @@ exports.init = function(grunt) { processAddons: function (callback) { this.readSettingsFile().deps.forEach(callback); - }, + } }; -} +}; |