1
0
mirror of https://github.com/JuanCanham/HackMyResume.git synced 2024-11-05 01:56:21 +00:00

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

View File

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