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 # mac artefacts
*.DS_Store *.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 text stuff (the -project should actually be shared, but then we'd have to share the same disk location)
*.sublime-project *.sublime-project
*.sublime-workspace *.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) { module.exports = function(grunt) {
grunt.initConfig({ grunt.initConfig({
jshint: { jshint: {
options: { /*options: {
jshintrc: '.jshintrc' "evil": true,
}, "asi": true,
"smarttabs": true,
"eqnull": true
},*/
files: [ files: [
'Gruntfile.js', 'Gruntfile.js',
'package.json', 'package.json',
// TODO(grosbouddha): change to js/**/*.js and fix the 10K jshint 'js/**/*.js',
// error messages or fine-tune .jshintrc file. '!js/lib/**/*.js' // Exclude lib folder (note the leading !)
'js/*.js'
] ]
}, },
connect: { connect: {
@ -41,6 +43,7 @@ module.exports = function(grunt) {
grunt.loadNpmTasks('grunt-contrib-jshint'); grunt.loadNpmTasks('grunt-contrib-jshint');
grunt.loadNpmTasks('grunt-ghost'); grunt.loadNpmTasks('grunt-ghost');
grunt.registerTask('lint', ['jshint']);
grunt.registerTask('test', ['jshint', 'connect', 'ghost']); grunt.registerTask('test', ['jshint', 'connect', 'ghost']);
}; };

View File

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