2015-06-15 23:31:25 +00:00
|
|
|
/*!
|
|
|
|
* Grunt file
|
|
|
|
*
|
|
|
|
* @package SpamBlacklist
|
|
|
|
*/
|
|
|
|
|
2018-11-29 17:14:03 +00:00
|
|
|
/* eslint-env node, es6 */
|
2015-06-15 23:31:25 +00:00
|
|
|
module.exports = function ( grunt ) {
|
2018-11-29 17:14:03 +00:00
|
|
|
var conf = grunt.file.readJSON( 'extension.json' );
|
|
|
|
|
2015-06-15 23:31:25 +00:00
|
|
|
grunt.loadNpmTasks( 'grunt-banana-checker' );
|
2018-11-29 17:14:03 +00:00
|
|
|
grunt.loadNpmTasks( 'grunt-eslint' );
|
2015-06-15 23:31:25 +00:00
|
|
|
grunt.loadNpmTasks( 'grunt-jsonlint' );
|
|
|
|
|
|
|
|
grunt.initConfig( {
|
|
|
|
banana: conf.MessagesDirs,
|
2018-11-29 17:14:03 +00:00
|
|
|
eslint: {
|
2019-04-03 23:25:25 +00:00
|
|
|
options: {
|
|
|
|
reportUnusedDisableDirectives: true,
|
|
|
|
cache: true
|
|
|
|
},
|
2017-04-21 15:59:57 +00:00
|
|
|
all: [
|
|
|
|
'**/*.js',
|
|
|
|
'!node_modules/**',
|
|
|
|
'!vendor/**'
|
|
|
|
]
|
|
|
|
},
|
2015-06-15 23:31:25 +00:00
|
|
|
jsonlint: {
|
|
|
|
all: [
|
|
|
|
'**/*.json',
|
2017-11-08 16:55:15 +00:00
|
|
|
'!node_modules/**',
|
|
|
|
'!vendor/**'
|
2015-06-15 23:31:25 +00:00
|
|
|
]
|
|
|
|
}
|
|
|
|
} );
|
|
|
|
|
2018-11-29 17:14:03 +00:00
|
|
|
grunt.registerTask( 'test', [ 'eslint', 'jsonlint', 'banana' ] );
|
2015-06-15 23:31:25 +00:00
|
|
|
grunt.registerTask( 'default', 'test' );
|
|
|
|
};
|