diff --git a/Gruntfile.js b/Gruntfile.js index eade01104..439e90378 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -124,6 +124,7 @@ module.exports = function (grunt) { } }, + // Validate CSS files csslint: { options: { csslintrc: 'build/less/.csslintrc' @@ -133,6 +134,11 @@ module.exports = function (grunt) { ] }, + // Validate Bootstrap HTML + bootlint: { + files: ['pages/**/*.html'] + }, + // Delete images in build directory // After compressing the images in the build/img dir, there is no need // for them @@ -159,6 +165,11 @@ module.exports = function (grunt) { grunt.loadNpmTasks('grunt-contrib-clean'); // Lint CSS grunt.loadNpmTasks('grunt-contrib-csslint'); + // Lint Bootstrap + grunt.loadNpmTasks('grunt-bootlint'); + + // Linting task + grunt.registerTask('lint', ['jshint', 'csslint', 'bootlint']); // The default task (running "grunt" in console) is "watch" grunt.registerTask('default', ['watch']); diff --git a/package.json b/package.json index af7c55bde..ed6f05e85 100644 --- a/package.json +++ b/package.json @@ -9,6 +9,7 @@ "devDependencies": { "R2": "^1.4.3", "grunt": "~0.4.5", + "grunt-bootlint": "^0.9.1", "grunt-contrib-clean": "^0.6.0", "grunt-contrib-csslint": "^0.5.0", "grunt-contrib-cssmin": "^0.12.2",