Added coding style linter
This commit is contained in:
parent
de8a385146
commit
d00dc71e13
33
Gruntfile.js
33
Gruntfile.js
@ -1,8 +1,8 @@
|
||||
'use strict';
|
||||
|
||||
module.exports = function(grunt) {
|
||||
grunt.initConfig({
|
||||
|
||||
grunt.initConfig({
|
||||
|
||||
pkg: grunt.file.readJSON('package.json'),
|
||||
|
||||
@ -30,12 +30,43 @@ module.exports = function(grunt) {
|
||||
files: '<%= project.assets %>/sass/{,*/}*.{scss,sass}',
|
||||
tasks: ['sass:dev']
|
||||
}
|
||||
},
|
||||
|
||||
jslint: { // configure the task
|
||||
|
||||
client: {
|
||||
src: [
|
||||
'app/app.js',
|
||||
'app/**/*.js'
|
||||
],
|
||||
exclude: [
|
||||
'app/bower_components/**/*.js',
|
||||
'app/assets/**/*'
|
||||
],
|
||||
directives: { // example directives
|
||||
node: true,
|
||||
todo: true
|
||||
},
|
||||
options: {
|
||||
edition: 'latest', // specify an edition of jslint or use 'dir/mycustom-jslint.js' for own path
|
||||
junit: 'out/client-junit.xml', // write the output to a JUnit XML
|
||||
log: 'out/client-lint.log',
|
||||
jslintXml: 'out/client-jslint.xml',
|
||||
errorsOnly: true, // only display errors
|
||||
failOnError: false, // defaults to true
|
||||
checkstyle: 'out/client-checkstyle.xml' // write a checkstyle-XML
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
grunt.loadNpmTasks('grunt-contrib-sass');
|
||||
grunt.loadNpmTasks('grunt-contrib-watch');
|
||||
grunt.loadNpmTasks('grunt-jslint');
|
||||
|
||||
grunt.registerTask('default', 'jslint');
|
||||
grunt.registerTask('default', [
|
||||
'watch'
|
||||
]);
|
||||
|
||||
};
|
||||
|
Loading…
x
Reference in New Issue
Block a user