Activate jshint on JS codebase

This commit is contained in:
grosbouddha 2013-05-27 23:42:16 +02:00
parent 70f46649a8
commit 32d4f1c377
4 changed files with 14 additions and 14 deletions

3
.gitignore vendored
View File

@ -1,6 +1,9 @@
# mac artefacts
*.DS_Store
# nodejs local installs
node_modules
# sublime text stuff (the -project should actually be shared, but then we'd have to share the same disk location)
*.sublime-project
*.sublime-workspace

View File

@ -1,6 +0,0 @@
{
"evil": true,
"asi": true,
"smarttabs": true,
"eqnull": true
}

View File

@ -1,15 +1,17 @@
module.exports = function(grunt) {
grunt.initConfig({
jshint: {
options: {
jshintrc: '.jshintrc'
},
/*options: {
"evil": true,
"asi": true,
"smarttabs": true,
"eqnull": true
},*/
files: [
'Gruntfile.js',
'package.json',
// TODO(grosbouddha): change to js/**/*.js and fix the 10K jshint
// error messages or fine-tune .jshintrc file.
'js/*.js'
'js/**/*.js',
'!js/lib/**/*.js' // Exclude lib folder (note the leading !)
]
},
connect: {
@ -41,6 +43,7 @@ module.exports = function(grunt) {
grunt.loadNpmTasks('grunt-contrib-jshint');
grunt.loadNpmTasks('grunt-ghost');
grunt.registerTask('lint', ['jshint']);
grunt.registerTask('test', ['jshint', 'connect', 'ghost']);
};

View File

@ -12,7 +12,7 @@
"test": "grunt test"
},
"devDependencies": {
"grunt": "0.4.1",
"grunt": "~0.4.1",
"grunt-contrib-connect": "0.3.0",
"grunt-contrib-jshint": "0.5.4",
"grunt-ghost": "1.0.12"