Преглед изворни кода

Added support for jshint and made it a pure grunt task.

fredck пре 11 година
родитељ
комит
0793fc7ff6
3 измењених фајлова са 12 додато и 1 уклоњено
  1. 0 0
      .jshintrc
  2. 10 0
      gruntfile.js
  3. 2 1
      package.json

+ 10 - 0
gruntfile.js

@@ -2,15 +2,25 @@ module.exports = function( grunt ) {
 	grunt.initConfig( {
 		pkg: grunt.file.readJSON( 'package.json' ),
 
+		jshint: {
+			files: [ '*.js' ],
+			options: jshintConfig
+		},
+
 		jscs: {
 			src: '*.js',
 			options: jscsConfig
 		}
 	} );
 
+	grunt.loadNpmTasks( 'grunt-contrib-jshint' );
 	grunt.loadNpmTasks( 'grunt-jscs' );
 };
 
+// Configurations for JSHint
+var jshintConfig = {
+};
+
 // Configurations for JSCS (JavaScript Code Style checker)
 var jscsConfig = {
 	'excludeFiles': [

+ 2 - 1
package.json

@@ -4,7 +4,8 @@
   "description": "A short description",
   "devDependencies": {
     "grunt": "~0.4.5",
-    "grunt-jscs": "~0.6.2"
+    "grunt-jscs": "~0.6.2",
+    "grunt-contrib-jshint": "~0.10.0"
   },
   "author": "CKSource (http://cksource.com/)",
   "license": "See LICENSE.md",