1821b5a1 by Adam Heath

Configure jshint, and fix the errors it reported.

1 parent e4b534f3
...@@ -7,6 +7,23 @@ module.exports = function(grunt) { ...@@ -7,6 +7,23 @@ module.exports = function(grunt) {
7 var config = {}; 7 var config = {};
8 config.jshint = { 8 config.jshint = {
9 options: { 9 options: {
10 reporter: require('jshint-stylish'),
11
12 esnext: true,
13 bitwise: true,
14 camelcase: true,
15 curly: true,
16 eqeqeq: true,
17 immed: true,
18 indent: 4,
19 latedef: true,
20 newcap: true,
21 noarg: true,
22 proto: true,
23 quotmark: 'single',
24 undef: true,
25 unused: 'vars',
26 strict: true,
10 }, 27 },
11 all: [ 28 all: [
12 'grunt-monty-python.js', 29 'grunt-monty-python.js',
......
1 /* global module:false */
1 /* 2 /*
2 * grunt-monty-python 3 * grunt-monty-python
3 * 4 *
...@@ -5,6 +6,7 @@ ...@@ -5,6 +6,7 @@
5 6
6 7
7 module.exports = function (grunt) { 8 module.exports = function (grunt) {
9 /* global require:false */
8 'use strict'; 10 'use strict';
9 var _ = require('lodash'); 11 var _ = require('lodash');
10 12
...@@ -87,7 +89,6 @@ module.exports = function (grunt) { ...@@ -87,7 +89,6 @@ module.exports = function (grunt) {
87 ]; 89 ];
88 */ 90 */
89 for (var key in requireModules) { 91 for (var key in requireModules) {
90 var keyS = JSON.stringify(key);
91 var value = requireModules[key]; 92 var value = requireModules[key];
92 var included = []; 93 var included = [];
93 for (var i = 0; i < value.length; i++) { 94 for (var i = 0; i < value.length; i++) {
...@@ -139,7 +140,6 @@ module.exports = function (grunt) { ...@@ -139,7 +140,6 @@ module.exports = function (grunt) {
139 base: 'src', 140 base: 'src',
140 }, mpConfig); 141 }, mpConfig);
141 142
142 var featureFlags = {};
143 var holyGrailTmp = '.grunt/holygrail'; 143 var holyGrailTmp = '.grunt/holygrail';
144 var initConfig = { 144 var initConfig = {
145 clean: { 145 clean: {
...@@ -282,6 +282,7 @@ module.exports = function (grunt) { ...@@ -282,6 +282,7 @@ module.exports = function (grunt) {
282 var htmlSourceDir; 282 var htmlSourceDir;
283 if (mpConfig.punch) { 283 if (mpConfig.punch) {
284 grunt.registerMultiTask('punch', 'run punch externally to create html files', function() { 284 grunt.registerMultiTask('punch', 'run punch externally to create html files', function() {
285 /* jshint camelcase:false */
285 var done = this.async(); 286 var done = this.async();
286 var options = this.options(); 287 var options = this.options();
287 var target = this.target; 288 var target = this.target;
......
...@@ -29,6 +29,7 @@ ...@@ -29,6 +29,7 @@
29 "grunt-rev": "~0", 29 "grunt-rev": "~0",
30 "grunt-svgmin": "~0", 30 "grunt-svgmin": "~0",
31 "grunt-usemin": "~2", 31 "grunt-usemin": "~2",
32 "jshint-stylish": "~0",
32 "load-grunt-tasks": "~0", 33 "load-grunt-tasks": "~0",
33 "lodash": "~2", 34 "lodash": "~2",
34 "punch": "~0.5.46", 35 "punch": "~0.5.46",
......