Add file LINTing through JSHint.

This commit is contained in:
devlinjd 2015-12-09 21:44:18 -05:00
parent f7a3da0a4d
commit 91aba39050
2 changed files with 19 additions and 9 deletions

View File

@ -1,7 +1,7 @@
'use strict';
module.exports = function (grunt) {
'use strict';
var opts = {
pkg: grunt.file.readJSON('package.json'),
@ -29,19 +29,28 @@ module.exports = function (grunt) {
outdir: 'docs/'
}
}
},
jshint: {
options: {
laxcomma: true,
expr: true
},
all: ['Gruntfile.js', 'src/**/*.js', 'test/**/*.js']
}
};
grunt.initConfig( opts );
grunt.loadNpmTasks('grunt-simple-mocha');
grunt.loadNpmTasks('grunt-contrib-yuidoc');
grunt.registerTask('test', 'Test the FluentCV library.', function( config ) {
grunt.task.run( ['simplemocha:all'] );
});
grunt.registerTask('document', 'Generate FluentCV library documentation.', function( config ) {
grunt.task.run( ['yuidoc'] );
});
grunt.registerTask('default', [ 'test', 'yuidoc' ]);
grunt.loadNpmTasks('grunt-contrib-jshint');
grunt.registerTask('test', 'Test the FluentCV library.',
function( config ) { grunt.task.run( ['simplemocha:all'] ); });
grunt.registerTask('document', 'Generate FluentCV library documentation.',
function( config ) { grunt.task.run( ['yuidoc'] ); });
grunt.registerTask('default', [ 'jshint', 'test', 'yuidoc' ]);
};

View File

@ -53,6 +53,7 @@
"devDependencies": {
"chai": "*",
"grunt": "*",
"grunt-contrib-jshint": "^0.11.3",
"grunt-contrib-yuidoc": "^0.10.0",
"grunt-simple-mocha": "*",
"is-my-json-valid": "^2.12.2",