2017-05-11 15:28:50 +00:00
|
|
|
/* eslint-env node, es6 */
|
2015-06-20 05:17:55 +00:00
|
|
|
module.exports = function ( grunt ) {
|
2017-01-23 14:07:54 +00:00
|
|
|
var conf = grunt.file.readJSON( 'extension.json' );
|
|
|
|
|
2015-06-20 05:17:55 +00:00
|
|
|
grunt.loadNpmTasks( 'grunt-banana-checker' );
|
2017-05-11 15:28:50 +00:00
|
|
|
grunt.loadNpmTasks( 'grunt-eslint' );
|
2017-04-17 21:51:17 +00:00
|
|
|
grunt.loadNpmTasks( 'grunt-stylelint' );
|
2015-06-20 05:17:55 +00:00
|
|
|
|
|
|
|
grunt.initConfig( {
|
2017-05-11 15:28:50 +00:00
|
|
|
eslint: {
|
2019-05-07 17:40:17 +00:00
|
|
|
options: {
|
|
|
|
reportUnusedDisableDirectives: true,
|
|
|
|
extensions: [ '.js', '.json' ],
|
|
|
|
cache: true
|
|
|
|
},
|
2016-02-08 22:39:07 +00:00
|
|
|
all: [
|
2019-05-07 17:40:17 +00:00
|
|
|
'**/*.js{,on}',
|
|
|
|
'!{vendor,node_modules}/**'
|
2016-02-08 22:39:07 +00:00
|
|
|
]
|
2015-06-20 05:17:55 +00:00
|
|
|
},
|
2017-01-23 14:07:54 +00:00
|
|
|
banana: conf.MessagesDirs,
|
2017-04-17 21:51:17 +00:00
|
|
|
stylelint: {
|
|
|
|
all: [
|
|
|
|
'**/*.css',
|
2019-05-07 17:40:17 +00:00
|
|
|
'!{vendor,node_modules}/**'
|
2015-06-20 05:17:55 +00:00
|
|
|
]
|
|
|
|
}
|
|
|
|
} );
|
|
|
|
|
2019-05-07 17:40:17 +00:00
|
|
|
grunt.registerTask( 'test', [ 'eslint', 'banana', 'stylelint' ] );
|
2015-06-20 05:17:55 +00:00
|
|
|
grunt.registerTask( 'default', 'test' );
|
|
|
|
};
|