Browse Source

Grunt: Add JSHint support.

pull/379/head
XhmikosR 11 years ago
parent
commit
f92f8942fa
  1. 20
      Gruntfile.js
  2. 18
      js/.jshintrc

20
Gruntfile.js

@ -4,6 +4,7 @@
* http://opensource.org/licenses/MIT
* ---------------------------------- */
/* jshint node: true */
module.exports = function(grunt) {
'use strict';
@ -148,6 +149,21 @@ module.exports = function(grunt) {
docs: {}
},
jshint: {
options: {
jshintrc: 'js/.jshintrc'
},
grunt: {
src: 'Gruntfile.js'
},
src: {
src: 'js/*.js'
},
docs: {
src: ['docs/assets/js/docs.js', 'docs/assets/js/fingerblast.js']
}
},
validation: {
options: {
charset: 'utf-8',
@ -186,9 +202,9 @@ module.exports = function(grunt) {
grunt.registerTask('dist-js', ['concat', 'uglify']);
grunt.registerTask('dist', ['dist-css', 'dist-js', 'copy']);
grunt.registerTask('validate-html', ['jekyll', 'validation']);
grunt.registerTask('default', ['dist']);
grunt.registerTask('build', ['dist']);
grunt.registerTask('test', ['dist', 'validate-html']);
grunt.registerTask('default', ['dist']);
grunt.registerTask('test', ['dist', 'jshint', 'validate-html']);
// Version numbering task.
// grunt change-version-number --oldver=A.B.C --newver=X.Y.Z

18
js/.jshintrc

@ -0,0 +1,18 @@
{
"boss" : true,
"browser" : true,
"camelcase" : true,
"devel" : true,
"eqeqeq" : true,
"eqnull" : true,
"expr" : true,
"indent" : 2,
"laxbreak" : true,
"nonbsp" : true,
"quotmark" : "single",
"strict" : true,
"trailing" : true,
"undef" : true,
"unused" : true,
"validthis" : true
}
Loading…
Cancel
Save