Browse Source

Moved jshint to dev/tasks.

fredck 11 years ago
parent
commit
739d4a08d7
3 changed files with 22 additions and 8 deletions
  1. 0 1
      dev/tasks/jshint-config.json
  2. 15 0
      dev/tasks/jshint.js
  3. 7 7
      gruntfile.js

+ 0 - 1
dev/tasks/jshint-config.json

@@ -1 +0,0 @@
-{}

+ 15 - 0
dev/tasks/jshint.js

@@ -0,0 +1,15 @@
+'use strict';
+
+module.exports = function( grunt ) {
+	grunt.config.merge( {
+		jshint: {
+			files: [ '**/*.js' ],
+			options: defaultConfig
+		}
+	} );
+
+	grunt.loadNpmTasks( 'grunt-contrib-jshint' );
+};
+
+var defaultConfig = {
+};

+ 7 - 7
gruntfile.js

@@ -5,18 +5,14 @@ module.exports = function( grunt ) {
 		pkg: grunt.file.readJSON( 'package.json' ),
 
 		jshint: {
-			files: [ '*.js' ],
 			options: {
-				jshintrc: 'dev/tasks/jshint-config.json'
+				'ignores': lintIgnores
 			}
 		},
 
 		jscs: {
 			options: {
-				'excludeFiles': [
-					'node_modules/**',
-					'build/**'
-				]
+				'excludeFiles': lintIgnores
 			}
 		},
 
@@ -29,6 +25,10 @@ module.exports = function( grunt ) {
 
 	grunt.loadTasks( 'dev/tasks' );
 
-	// Default tasks.
 	grunt.registerTask( 'default', [ 'jshint', 'jscs' ] );
 };
+
+var lintIgnores = [
+	'node_modules/**',
+	'build/**'
+];