/*jshint node:true */ module.exports = function ( grunt ) { grunt.loadNpmTasks( 'grunt-banana-checker' ); grunt.loadNpmTasks( 'grunt-jsonlint' ); grunt.loadNpmTasks( 'grunt-contrib-jshint' ); grunt.loadNpmTasks( 'grunt-contrib-watch' ); grunt.loadNpmTasks( 'grunt-jscs' ); grunt.loadNpmTasks( 'grunt-stylelint' ); grunt.initConfig( { banana: { all: 'i18n/' }, jsonlint: { all: [ '**/*.json', '!node_modules/**' ] }, stylelint: { core: { src: [ '**/*.css', '!modules/ve-math/**', '!node_modules/**' ] }, 've-math': { options: { configFile: 'modules/ve-math/.stylelintrc' }, src: [ 'modules/ve-math/**/*.css' ] } }, jshint: { options: { jshintrc: true }, all: [ '*.js', 'modules/**/*.js' ] }, watch: { files: [ '.{stylelintrc,jscsrc,jshintignore,jshintrc}', '<%= jshint.all %>', '<%= stylelint.core.src %>', '<%= stylelint[ "ve-math" ].src %>' ], tasks: 'test' }, jscs: { fix: { options: { fix: true }, src: '<%= jshint.all %>' }, main: { src: '<%= jshint.all %>' } } } ); grunt.registerTask( 'test', [ 'jshint', 'jscs:main', 'stylelint', 'jsonlint', 'banana' ] ); grunt.registerTask( 'default', 'test' ); };